Code Monkey home page Code Monkey logo

wrangler's People

Contributors

alipiec avatar byaruhaf avatar cjkjellander avatar erszcz avatar fenollp avatar gabisampaio avatar hanssv avatar huiqing avatar kdmnk avatar kostis avatar lauramcastro avatar legoscia avatar leoliu avatar nox avatar oroszgy avatar palas avatar robertoaloi avatar robertobarrosfilho avatar sevmarc avatar simonjohnthompson avatar tdb avatar thomasarts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wrangler's Issues

Using ctrl-chars in erlang code makes wrangler missbehave

If I have character with a ctrl-character in it wrangler will try and strip out part of that character.

Example:

If this exists in the code:
$^k

Wrangler will always try and remove parts of this character like this:
$\k

Since my code is littered with these it becomes quite hard to use wrangler for my code base...:/

High precision numbers seem to be rounded

Processing source files via the API (in smother) seems to round very high precision numbers when they are written back to the file. E.g.:

tt() ->
test([101]),
test([-1]),
test([278]),
test([97]),
test(10.500000000000000000000000000001).

becomes:

tt() ->
smother_server:log(string_paramtest, {{9, 1}, {14, 43}}, []),
test([101]),
test([-1]),
test([278]),
test([97]),
test(10.5).

I'm using the unix pretty printer, so that could be related:

wrangler_prettypr:print_ast('unix',AST2),

error: make all with R15B02 ...

Hi,

When attempting to build with R15B02 on a MAC [Darwin 12.2.0 Darwin Kernel Version 12.2.0:] or on [Ubuntu 12.04.1 LTS], I get the following:

"/usr/local/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/api_refac.erl
src/api_refac.erl:none: error in parse transform 'wrangler_expand_rule': {{badrecord,func},
                                                  [{erl_syntax,function_name,
                                                    1,
                                                    [{file,"erl_syntax.erl"},
                                                     {line,3336}]},
                                                   {erl_syntax,subtrees,1,
                                                    [{file,"erl_syntax.erl"},
                                                     {line,6277}]},
                                                   {wrangler_expand_rule,
                                                    '-transform/4-fun-0-',4,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,507}]},
                                                   {wrangler_expand_rule,map,
                                                    2,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,538}]},
                                                   {wrangler_expand_rule,map,
                                                    2,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,544}]},
                                                   {wrangler_expand_rule,
                                                    parse_transform,4,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,471}]},
                                                   {wrangler_expand_rule,
                                                    parse_transform,2,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,64}]},
                                                   {compile,
                                                    '-foldl_transform/2-anonymous-2-',
                                                    2,
                                                    [{file,"compile.erl"},
                                                     {line,847}]}]}
make: *** [ebin/api_refac.beam] Error 1
rm src/wrangler_parse.erl


This has happened both with a git clone from here as well as the 'stable' release tarball from kent.ac.uk.

Has Wrangler been tested with R15B02?

Cheers,

OTP 21 build failure

HEAD @ aa2330a

==> ./configure --prefix=/usr/local/Cellar/wrangler/HEAD-aa2330a_1
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for erlc... /usr/local/opt/erlang/bin/erlc
checking for erl... /usr/local/opt/erlang/bin/erl
checking for erlc... /usr/local/opt/erlang/bin/erlc
configure: found 64-bit Erlang
checking for Erlang/OTP library installation base directory... ${exec_prefix}/lib/erlang/lib
configure: creating ./config.status
config.status: creating Makefile
config.status: creating c_src/suffixtree/Makefile
config.status: creating c_src/gsuffixtree/Makefile
==> make
"/usr/local/opt/erlang/bin/erlc" -o src src/wrangler_parse.yrl
"/usr/local/opt/erlang/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_parse.erl
"/usr/local/opt/erlang/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_expand_rule.erl
src/wrangler_expand_rule.erl:7: Warning: export_all flag enabled - all functions will be exported
src/wrangler_expand_rule.erl:542: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace
"/usr/local/opt/erlang/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_scan.erl
src/wrangler_scan.erl:28: Warning: export_all flag enabled - all functions will be exported
"/usr/local/opt/erlang/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_epp_dodger.erl
"/usr/local/opt/erlang/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_syntax.erl
"/usr/local/opt/erlang/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_syntax_lib.erl
"/usr/local/opt/erlang/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_misc.erl
"/usr/local/opt/erlang/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/api_ast_traverse.erl
"/usr/local/opt/erlang/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/api_refac.erl
src/api_refac.erl: error in parse transform 'wrangler_expand_rule': {{badrecord,class_qualifier},
                                                  [{erl_syntax,
                                                    class_qualifier_argument,
                                                    1,
                                                    [{file,"erl_syntax.erl"},
                                                     {line,6779}]},
                                                   {erl_syntax,subtrees,1,
                                                    [{file,"erl_syntax.erl"},
                                                     {line,7766}]},
                                                   {wrangler_expand_rule,
                                                    '-transform/4-fun-0-',4,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,527}]},
                                                   {wrangler_expand_rule,map,
                                                    2,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,558}]},
                                                   {wrangler_expand_rule,
                                                    '-transform/4-fun-0-',4,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,532}]},
                                                   {wrangler_expand_rule,map,
                                                    2,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,558}]},
                                                   {wrangler_expand_rule,map,
                                                    2,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,564}]},
                                                   {wrangler_expand_rule,
                                                    '-transform/4-fun-0-',4,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,532}]}]}
make: *** [ebin/api_refac.beam] Error 1
rm src/wrangler_parse.erl

Wrangler gives syntax errors on Erlang 17.0-rc1

It appears that wrangler doesn't yet know about the new Erlang maps syntax. The following line of code:

-type ctx() :: #{wfd => wfd:wfd(), ts => [tk:tk()]}.

yields the following wrangler syntax error:

** {6,17}:["syntax error before: ","'{'"] **

[RPC failure] refactorer needs restarting ...

Mon Feb 27 02:07:29 GMT 2017

When attenpting to rename a function , I get:

Refactoring failed: "The Wrangler application is not started, or is not working properly, please restart the refactorer!"

In *Messages*, I see:

loading = (wrangler_code_search_utils "/usr/local/lib/erlang/lib/wrangler-1.2.0/ebin/wrangler_code_search_utils.beam")
Cannot add wrangler dir ‘/usr/local/lib/erlang/lib/wrangler-1.2.0/ebin’ to load path: [badrpc [EXIT [undef ([distel rpc_entry (code add_path (/usr/local/lib/erlang/lib/wrangler-1.2.0/ebin)) nil] [rpc \
-handle_call_call/6-fun-0- 5 ([file rpc.erl] [line 187])])]]]
loading = (wrangler_code_inspector_lib "/usr/local/lib/erlang/lib/wrangler-1.2.0/ebin/wrangler_code_inspector_lib.beam")

in *trace wrangler575@localhost*:

>> REG_SEND: [TYPE erl-pid distel_6697@mbp 7 0 0] rex [[TYPE erl-pid distel_6697@mbp 7 0 0] [call code ensure_loaded (distel) [TYPE erl-pid distel_6697@mbp 1 0 0]]]
>> REG_SEND: [TYPE erl-pid distel_6697@mbp 6 0 0] rex [[TYPE erl-pid distel_6697@mbp 6 0 0] [call distel rpc_entry (application stop (wrangler)) [TYPE erl-pid distel_6697@mbp 1 0 0]]]
<< SEND: [TYPE erl-pid distel_6697@mbp 7 0 0] [rex [module distel]]
<< SEND: [TYPE erl-pid distel_6697@mbp 6 0 0] [rex [error [not_started wrangler]]]

and in *Wrangler-Erl-Shell*:

(wrangler761@localhost)2>
=ERROR REPORT==== 27-Feb-2017::02:13:42 ===
** Node distel_6697@mbp not responding **
** Removing (timedout) connection **

I've added /usr/local/lib/erlang/lib/wrangler-1.2.0/ebin to load-path before starting Wrangler, however I believe the RPC error is causing other failures so that the distel process is not started.

Any hints in resolving/debugging this issue?

[bug]syntext error when parsing mysql:query

I happened to find out that the refactor doesn't work for my sql wrapper module, so I did some debugging, and I find out that if the file contains the following codes, the parser will results in error like error syntax before query:

case mysql:query(xxx,xxx,xxx) of
  .....

After some more debug, I find out that wrangler has a function called wrangler_syntax:query_expr, and i know that there is some syntax called query syntax for Mnesia, so I believe you are making some assertion that a query must be the begin of query syntax ....

This should be a bug because the mysql mode is working fine so the syntax should be ok for erlang compiler.

Here is the mysql driver. You can see it's using query as a main API.

I am trying to create a patch, but the syntax file is a little complicate ...

Vim Integration

Hi! I just found out about this tool through the erlang user mailing list and I'm wondering if there's any interest on your end to do integrate with vim, a-la Ocaml's merlin.

I'd be more than happy to look into it if you can give me some pointers :)

Don't include distel

There was a time when the distel project had little activity and visibility. but that was many years ago. Now the project is in good hands and sees more active than wrangler itself; see https://github.com/massemanet/distel. The outdated version included in wrangler causes more harm than good. In fact it often gets in the way. Please consider removing distel from wrangler distribution. Thanks.

Using wrangler to fix a mis-spelling bug

Sometimes I get a bug like this

Compiling src/**********.erl failed:
src/**********.erl:92: variable 'Users1' is unbound
src/**********.erl:89: Warning: variable 'Users' is unused

Would it be possible to use emacs and wrangler to just have an option of "Fix this Y/N" in this case?

wrangler doesn't compile on OTP releases >= 22

Running make using OTP 22 (or later):

"/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wls/wls_code_lens_form_refactor.erl
src/wls/wls_code_lens_form_refactor.erl:17: function atom_to_binary/1 undefined
make: *** [Makefile:146: ebin/wls_code_lens_form_refactor.beam] Error 1

Wrangler failed to perform this refactoring

Open src/cow_http.erl from https://github.com/ninenines/cowboy and jump to list/2 function and type C-c C-w r f, and input a new name to get the following error:

Refactoring failed: "Wrangler failed to perform this refactoring, please report error to erlang-refactor<AT>kent.ac.uk.
{function_clause,
    [{wrangler_prettypr,seq,
         [any,
          {float,{text,[1,44]},0,0},
          {ctxt,0,2,4,undefined,none,80,72,undefined,
              [{whitespace,{222,29},'\\n'},
               {whitespace,{223,1},'\\n'},
               {'-',{224,1}},
               {atom,{224,2},spec},
               {whitespace,{224,6},' '},
               {atom,{224,7},match_qs},
               {'(',{224,15}},
               {atom,{224,16},cowboy},
               {':',{224,22}},
               {atom,{224,23},fields},
               {'(',{224,29}},
               {')',{224,30}},
               {',',{224,31}},
               {whitespace,{224,32},' '},
               {atom,{224,33},req},
               {'(',{224,36}},
               {')',{224,37}},
               {')',{224,38}},
               {whitespace,{224,39},' '},
               {'->',{224,40}},
               {whitespace,{224,42},' '},
               {atom,{224,43},map},
               {'(',{224,46}},
               {')',{224,47}},
               {dot,{224,48}}],
              8,false,unix},
          #Fun<wrangler_prettypr.62.949979>],
         [{file,\"src/wrangler_prettypr.erl\"},{line,1791}]},
     {wrangler_prettypr,lay_type_args_1,2,
         [{file,\"src/wrangler_prettypr.erl\"},{line,2760}]},
     {wrangler_prettypr,lay_type,2,
         [{file,\"src/wrangler_prettypr.erl\"},{line,2807}]},
     {wrangler_prettypr,lay_fun_type,2,
         [{file,\"src/wrangler_prettypr.erl\"},{line,2750}]},
     {wrangler_prettypr,lay_spec_clauses,2,
         [{file,\"src/wrangler_prettypr.erl\"},{line,2724}]},
     {wrangler_prettypr,lay_spec_args,2,
         [{file,\"src/wrangler_prettypr.erl\"},{line,2685}]},
     {wrangler_prettypr,lay_2,2,
         [{file,\"src/wrangler_prettypr.erl\"},{line,939}]},
     {wrangler_prettypr,print_form,3,
         [{file,\"src/wrangler_prettypr.erl\"},{line,155}]}]}"

wrangler_syntax:type/1 crash in OTP 19

Replace ROOT_DIR with the value of code:root_dir() of OTP 19:

CMD: wrangler_code_inspector_lib:calls_to_fun("ROOT_DIR/lib/stdlib-3.0/src/erl_parse.erl", 897, 1,["ROOT_DIR/lib/stdlib-3.0/src/"],8).

Searching for caller function of erl_parse:inop_prec/1 ...

Checking client modules in the following paths: 
["ROOT_DIR/lib/stdlib-3.0/src/"]
{error, "Wrangler failed to perform this functionality, please report error to erlang-refactor AT kent.ac.uk."}

Wrangler messes up an opaque term with an abstract representation

The following is a hunk from commit

jlouis/etorrent@ac1310c

The hunk is from some Wrangler refactoring on my code base and it did
an interesting change :)

diff --git a/apps/utp/src/utp_pkt.erl b/apps/utp/src/utp_pkt.erl
index 297ae2a..92aaed9 100644
--- a/apps/utp/src/utp_pkt.erl
+++ b/apps/utp/src/utp_pkt.erl
@@ -13,8 +13,6 @@
mk_random_seq_no/0,
send_fin/2,
send_ack/2,

  •     handle_send_ack/5,
    
  •     trigger_delayed_ack/2,
       handle_packet/4,
       buffer_dequeue/1,
       buffer_putback/2,
    

    @@ -74,7 +72,7 @@
    %% @todo Discover this one
    pkt_size = 1000 :: integer()
    }).
    --opaque t() :: #pkt_buf{}.
    +-opaque({t,{type,{77,16},record,[{atom,{77,17},pkt_buf}]},[]}).

    Note how the opaque term is reinserted as something I'd think is the
    abstract representation (from syntax_tools?) for the type rather than
    its rendering. My guess is that when you re-render the AST back to
    code, it misses a case to handle the opaque term. It is declared
    exactly as the structure of -type, except that the keyword is -opaque.
    The commit before it was

    jlouis/etorrent@f5cb0b4

Wrangler should not assume that it is installed

Eg. calling code:priv_dir(wrangler) in wrangler_side_effect:has_side_effect/2 throws an error when Wrangler is not installed system-wide. This can be a problem when users starts to use Wrangler as an LSP language server.

When $ERL and $ERLC contain some whitespaces...

Hi,

I've just tried Wrangler on a windows+cygwin where the erlang executable files happened to be under "C:\Program Files". This was apparently enough to break the configure/make process.

My guess is that $ERL and $ERLC should be quoted in both the configure script and the Makefile.in skeleton.

Cheers,

Roberto

Building under R16B03 on OSX

I just cloned from git://github.com/RefactoringTools/wrangler.git
followed by ./configure && make but I'm getting a parse_transform error as part of the build...

"/usr/local/bin/erlc" -o src src/wrangler_parse.yrl
"/usr/local/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_parse.erl
"/usr/local/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_expand_rule.erl
"/usr/local/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_scan.erl
"/usr/local/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_epp_dodger.erl
"/usr/local/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_syntax.erl
"/usr/local/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_syntax_lib.erl
"/usr/local/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_misc.erl
"/usr/local/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/api_ast_traverse.erl
"/usr/local/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/api_refac.erl
src/api_refac.erl: error in parse transform 'wrangler_expand_rule': {badarg,
[{erlang,list_to_atom,
[{atom,986,do_subst}],
[]},
{erl_syntax,atom,1,
[{file,"erl_syntax.erl"},
{line,1834}]},
{erl_syntax,
implicit_fun_name,1,
[{file,"erl_syntax.erl"},
{line,5523}]},
{erl_syntax,subtrees,1,
[{file,"erl_syntax.erl"},
{line,6195}]},
{wrangler_expand_rule,
'-transform/4-fun-0-',4,
[{file,
"src/wrangler_expand_rule.erl"},
{line,523}]},
{wrangler_expand_rule,map,
2,
[{file,
"src/wrangler_expand_rule.erl"},
{line,554}]},
{wrangler_expand_rule,map,
2,
[{file,
"src/wrangler_expand_rule.erl"},
{line,560}]},
{wrangler_expand_rule,
'-transform/4-fun-0-',4,
[{file,
"src/wrangler_expand_rule.erl"},
{line,528}]}]}
make: *** [ebin/api_refac.beam] Error 1

Mess up with the client module search_path

Hi,
when I am doing refactoring to change function name.
I am getting this in the notification -

Checking possible client modules in the following search paths: 
["/home/dev"]

I think I have mess up with the default value or something could you recommend me how to fix.

Dev.

Compile error w/ R16B03

~/wrangler $ make
"/usr/bin/erlc" -o src src/wrangler_parse.yrl
"/usr/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_parse.erl
"/usr/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_expand_rule.erl
"/usr/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_scan.erl
"/usr/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_epp_dodger.erl
"/usr/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_syntax.erl
"/usr/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_syntax_lib.erl
"/usr/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/wrangler_misc.erl
"/usr/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/api_ast_traverse.erl
"/usr/bin/erlc" -pa ebin -I include -W -o ebin +debug_info src/api_refac.erl
src/api_refac.erl: error in parse transform 'wrangler_expand_rule': {badarg,
                                                  [{erlang,list_to_atom,
                                                    [{atom,1146,
                                                      remove_funcs_from_export_4}],
                                                    []},
                                                   {erl_syntax,atom,1,
                                                    [{file,"erl_syntax.erl"},
                                                     {line,1834}]},
                                                   {erl_syntax,
                                                    implicit_fun_name,1,
                                                    [{file,"erl_syntax.erl"},
                                                     {line,5523}]},
                                                   {erl_syntax,subtrees,1,
                                                    [{file,"erl_syntax.erl"},
                                                     {line,6195}]},
                                                   {wrangler_expand_rule,
                                                    '-transform/4-fun-0-',4,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,527}]},
                                                   {wrangler_expand_rule,map,
                                                    2,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,558}]},
                                                   {wrangler_expand_rule,map,
                                                    2,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,564}]},
                                                   {wrangler_expand_rule,
                                                    '-transform/4-fun-0-',4,
                                                    [{file,
                                                      "src/wrangler_expand_rule.erl"},
                                                     {line,532}]}]}
make: *** [ebin/api_refac.beam] Error 1
rm src/wrangler_parse.erl

Can not rename atom

I wanna rename an atom , but the it returns invalid variable. I checked the codes, rename_var doesn't allow atom as input. Do you have another function to do that? Or is it a bug?

wrangler mistakenly changed '*' to *

  1. Open src/cow_http.erl from https://github.com/ninenines/cowboy and jump to list/2 function.
  2. Move point to the function's second arg Fun and Type C-c C-w r v and input, for example, Fu and commit the change.
  3. diff the file to see something changed at distance and more alarmingly '*' to *, i.e.:
diff --git a/src/cowboy_http.erl b/src/cowboy_http.erl
index 177787f4..ca045739 100644
--- a/src/cowboy_http.erl
+++ b/src/cowboy_http.erl
@@ -53,8 +53,8 @@ nonempty_list(Data, Fun) ->
    end.

 -spec list(binary(), fun()) -> list() | {error, badarg}.
-list(Data, Fun) ->
-   case list(Data, Fun, []) of
+list(Data, Fu) ->
+   case list(Data, Fu, []) of
        {error, badarg} -> {error, badarg};
        L -> lists:reverse(L)
    end.
@@ -221,7 +221,9 @@ language_range(Data, Fun) ->
                language_range_ret(Rest, Fun, LanguageTag)
        end).

--spec language_range_ret(binary(), fun(), '*' | {binary(), [binary()]}) -> any().
+-spec language_range_ret(binary(), fun(),
+                         *  | {binary(), [binary()]}) -> 
+                            any().
 language_range_ret(Data, Fun, LanguageTag) ->
    maybe_qparam(Data,
        fun (Rest, Quality) ->

Map syntax doesn't fully work

Crashes on this:
State#{ username => Username, player_object => PlayerObject, x => 7, y => 7 }.

with:
{error,{{{{badarg,{map,{68,8},
{var,{68,3},'State'},
[{map_field_assoc,{68,11},
{atom,{68,11},username},
{var,{68,23},'Username'}},
{map_field_assoc,{68,33},
{atom,{68,33},player_object},
{var,{68,50},'PlayerObject'}},
{map_field_assoc,{68,64},
{atom,{68,64},x},
{integer,{68,69},"7"}},
{map_field_assoc,{68,72},
{atom,{68,72},y},
{integer,{68,77},"7"}}]}},
[{wrangler_syntax,type,1,
[{file,"src/wrangler_syntax.erl"},{line,495}]},
{wrangler_syntax,is_leaf,1,
[{file,"src/wrangler_syntax.erl"},{line,536}]},
{wrangler_syntax,subtrees,1,
[{file,"src/wrangler_syntax.erl"},{line,6095}]},
{wrangler_recomment,build_tree,1,
[{file,"src/wrangler_recomment.erl"},{line,475}]},
{wrangler_recomment,build_list,4,
[{file,"src/wrangler_recomment.erl"},{line,511}]},
{wrangler_recomment,build_list_list,4,
[{file,"src/wrangler_recomment.erl"},{line,522}]},
{wrangler_recomment,build_tree,1,
[{file,"src/wrangler_recomment.erl"},{line,481}]},
{wrangler_recomment,build_list,4,
[{file,"src/wrangler_recomment.erl"},{line,511}]}]},
{gen_server,call,
[wrangler_ast_server,
{get,{"/Users/joshua/station/src/client_handler.erl",true,
["/Users/joshua/station/src"],
8,unix}},
500000]}},
{gen_server,call,
[wrangler_modulegraph_server,
{get_client_files,"/Users/joshua/station/src/map_codec.erl",
["/Users/joshua/station/src"]},
5000000]}}}

erlang-xemacs-p removed from erlang-mode, breaks wrangler

erlang/otp#1411 removes the constant erlang-xemacs-p from erlang-mode, causing wrangler to crash on startup.

The quickest fix is for you to just define it yourself before loading wrangler:

(defconst erlang-xemacs-p (string-match "Lucid\\|XEmacs" emacs-version)
  "Non-nil when running under XEmacs or Lucid Emacs.")

According to erlang/otp#1411, xemacs support was removed, so it's probably worthwhile to remove it from wrangler as well. I'm happy to do it, just let me know if you'd like me to before I put the time in.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.