RefactoringTools / wrangler

Wrangler -- An Erlang Refactorer
https://refactoringtools.github.io/wrangler/
Other
165 stars 45 forks source link

Wrangler failed to perform this refactoring #63

Closed leoliu closed 8 years ago

leoliu commented 9 years ago

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}]}]}"
simonjohnthompson commented 9 years ago

Thanks for the mail … we’re looking into it.

S.

On 1 Dec 2014, at 22:25, Leo Liu notifications@github.com wrote:

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-refactorkent.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],

     [{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}]}]}"

— Reply to this email directly or view it on GitHub https://github.com/RefactoringTools/wrangler/issues/63.

Simon Thompson | Professor of Logic and Computation School of Computing | University of Kent | Canterbury, CT2 7NF, UK s.j.thompson@kent.ac.uk | M +44 7986 085754 | W www.cs.kent.ac.uk/~sjt