Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with elixir dependencies for an escript #21

Open
PragTob opened this issue May 21, 2017 · 0 comments
Open

Working with elixir dependencies for an escript #21

PragTob opened this issue May 21, 2017 · 0 comments

Comments

@PragTob
Copy link

PragTob commented May 21, 2017

馃憢

Me again. So, say - is there a way to make this work with an escript/rebar3 escriptize (Dislaimer: I might also be using escript wrong).

I used rebar3 to create an escript project: https://github.com/PragTob/benchee_erlang_try

Now generating the script failed:

tobi@speedy ~/github/benchee_erlang $ ./_build/default/bin/benchee_erlang 
escript: exception error: undefined function 'Elixir.Benchee':run/1
  in function  benchee_erlang:main/1 (/home/tobi/github/benchee_erlang/_build/default/lib/benchee_erlang/src/benchee_erlang.erl, line 16)
  in call from escript:run/2 (escript.erl, line 757)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1 
  in call from init:do_boot/3 

Of course, though! Haven't added benchee to the applications. But when I add benchee to the applications this happens:

tobi@speedy ~/github/benchee_erlang $ DEBUG=1 rebar3 escriptize
# lots of stuff that I'll spare you...

===> Building escript...
===> Creating escript file /home/tobi/github/benchee_erlang/_build/default/bin/benchee_erlang
===> processing <<"benchee_erlang">>
===> new deps of <<"benchee_erlang">> found to be [<<"benchee">>]
===> processing <<"benchee">>
===> new deps of <<"benchee">> found to be [<<"elixir">>,<<"logger">>,
                                                   <<"deep_merge">>]
===> processing <<"elixir">>
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: {badmatch,error}
===> Stack trace to the error location:
[{rebar_prv_escriptize,find_deps_of_deps,3,
                       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,246}]},
 {rebar_prv_escriptize,find_deps,2,
                       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,240}]},
 {rebar_prv_escriptize,escriptize,2,
                       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,104}]},
 {rebar_prv_escriptize,do,1,
                       [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_escriptize.erl"},
                        {line,80}]},
 {rebar_core,do,2,
             [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
              {line,153}]},
 {rebar3,main,1,
         [{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar3.erl"},
          {line,66}]},
 {escript,run,2,[{file,"escript.erl"},{line,757}]},
 {escript,start,1,[{file,"escript.erl"},{line,277}]}]

Seems it doesn't like the transitive elixir dependency there?

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant