ramsay-t/Smother

OTP21

Opened this issue · 3 comments

This does not build on OTP21. Also it'd be better if dependencies were pinned, maybe using rebar3.

0 Smother.git master (21.0) λ rebar3 compile
===> Dependency option list [raw] in jsx is not supported and will be ignored
===> Dependency option list [raw] in wrangler is not supported and will be ignored
===> Verifying dependencies...
===> Fetching jsx ({git,"https://github.com/talentdeficit/jsx.git",
                               {branch,"master"}})
===> Fetching wrangler ({git,"https://github.com/RefactoringTools/wrangler.git",
                                    {branch,"master"}})
===> Compiling wrangler
_build/default/deps/wrangler/src/wrangler_expand_rule.erl:7: Warning: export_all flag enabled - all functions will be exported
_build/default/deps/wrangler/src/wrangler_expand_rule.erl:542: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace

===> Compiling _build/default/deps/wrangler/src/gen_composite_refac.erl failed
_build/default/deps/wrangler/src/gen_composite_refac.erl:none: error in parse transform 'wrangler_expand_rule': {undef,
                                                  [{wrangler_syntax_lib,
                                                    annotate_bindings,
                                                    [{function,282,
                                                      input_par_prompts,1,
                                                      [{clause,282,
                                                        [{var,282,
                                                          'CallBackMod'}],
                                                        [],
                                                        [{match,283,
                                                          {var,283,'Res'},
                                                          {call,283,
                                                           {atom,283,
                                                            input_pars_1},
                                                           [{var,283,
                                                             'CallBackMod'}]}},
                                                         {tuple,284,
                                                          [{atom,284,ok},
                                                           {var,284,
                                                            'Res'}]}]}]}],
                                                    []},
                                                   {wrangler_expand_rule,
                                                    '-annotate_forms/1-lc$^0/1-0-',
                                                    1,
                                                    [{file,
                                                      "/Users/pete/wefwefwef/Smother.git/_build/default/deps/wrangler/src/wrangler_expand_rule.erl"},
                                                     {line,87}]},
                                                   {wrangler_expand_rule,
                                                    '-annotate_forms/1-lc$^0/1-0-',
                                                    1,
                                                    [{file,
                                                      "/Users/pete/wefwefwef/Smother.git/_build/default/deps/wrangler/src/wrangler_expand_rule.erl"},
                                                     {line,89}]},
                                                   {wrangler_expand_rule,
                                                    parse_transform,2,
                                                    [{file,
                                                      "/Users/pete/wefwefwef/Smother.git/_build/default/deps/wrangler/src/wrangler_expand_rule.erl"},
                                                     {line,69}]},
                                                   {compile,
                                                    '-foldl_transform/3-anonymous-2-',
                                                    3,
                                                    [{file,"compile.erl"},
                                                     {line,1050}]},
                                                   {compile,foldl_transform,
                                                    3,
                                                    [{file,"compile.erl"},
                                                     {line,1053}]},
                                                   {compile,
                                                    '-internal_comp/5-anonymous-1-',
                                                    3,
                                                    [{file,"compile.erl"},
                                                     {line,349}]},
                                                   {compile,fold_comp,4,
                                                    [{file,"compile.erl"},
                                                     {line,376}]}]}

Looks like Wrangler's wrangler_syntax_lib:annotate_bindings/1 is no longer in master.

The wrangler build script for Smother was always a bit of a hack, and I'm not a rebar expert. If you are I'd love to see a pull request :) Otherwise I can try to find some time to look into it.

Scratch that, using my r3 branch now it compiles but tests fail with this path issue:

module 'abiftest'
  abiftest: zero1_test...*failed*
in function wrangler_misc:file_format/1 (/home/travis/build/fenollp/Smother/_build/default/lib/wrangler/src/wrangler_misc.erl, line 508)
in call from wrangler_ast_server:parse_annotate_file/4 (/home/travis/build/fenollp/Smother/_build/default/lib/wrangler/src/wrangler_ast_server.erl, line 299)
in call from api_refac:get_module_info/1 (/home/travis/build/fenollp/Smother/_build/default/lib/wrangler/src/api_refac.erl, line 678)
in call from smother:compile/2 (/home/travis/build/fenollp/Smother/_build/test/lib/smother/src/smother.erl, line 36)
in call from abtest:do_tests/2 (/home/travis/build/fenollp/Smother/_build/test/lib/smother/test/abtest.erl, line 13)
in call from abiftest:zero1_test/0 (/home/travis/build/fenollp/Smother/_build/test/lib/smother/test/abiftest.erl, line 15)
in call from eunit_test:'-mf_wrapper/2-fun-0-'/2 (eunit_test.erl, line 273)
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71)
**throw:{error,"Wrangler could not read file ../test/abiftest.erl; reason: enoent \n"}
  output:<<"">>

Build logs: https://travis-ci.org/fenollp/Smother/jobs/416838928
Any idea how that could be solved?