Today is my first day trying out an elixir project. I installed elixir and erlang using the latest in Fedora.
I’m getting a compile error when trying to install a mix package (instream) that has a hackney dependency:
$ mix phx.server
===> Compiling hackney
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
** (Mix) Could not compile dependency :hackney, "/home/rando/.mix/rebar3 bare compile --paths "/home/rando/Code/textus/sawmill/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile hackney", update it with "mix deps.update hackney" or clean it with "mix deps.clean hackney"
When trying to compile as it suggests using DEBUG=1
:
$ DEBUG=1 mix deps.compile hackney
===> Expanded command sequence to be run: []
===> Expanded command sequence to be run: [{default,app_discovery},
{bare,compile}]
===> Compiling hackney
===> run_hooks("/home/rando/Code/textus/sawmill/deps/hackney", pre_hooks, compile) -> no hooks defined
===> run_hooks("/home/rando/Code/textus/sawmill/deps/hackney", pre_hooks, erlc_compile) -> no hooks defined
===> erlopts [debug_info,debug_info,{d,namespaced_types}]
===> files to compile ["/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_response.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_manager.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_local_tcp.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_socks5.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_ssl.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_date.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_url.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_tcp.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_headers_new.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_connect.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_sup.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_pool.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_bstr.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_stream.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_http_connect.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_http.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_multipart.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_pool_handler.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_util.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_headers.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_request.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_cookie.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_trace.erl",
"/home/rando/Code/textus/sawmill/deps/hackney/src/hackney_app.erl"]
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: badarg
===> Stack trace to the error location:
[{re,run,[{error,bad_name},"^.*-(?<VER>[^/-]*)$",[{capture,[1],list}]],[]},
{rebar_hooks,re_version,1,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_hooks.erl"},
{line,146}]},
{rebar_hooks,create_env,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_hooks.erl"},
{line,134}]},
{rebar_hooks,run_hooks,5,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_hooks.erl"},
{line,97}]},
{rebar_hooks,run_all_hooks,6,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_hooks.erl"},
{line,17}]},
{rebar_prv_compile,compile,3,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_compile.erl"},
{line,123}]},
{rebar_prv_bare_compile,do,1,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_prv_bare_compile.erl"},
{line,47}]},
{rebar_core,do,2,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_core.erl"},
{line,153}]}]
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
** (Mix) Could not compile dependency :hackney, "/home/rando/.mix/rebar3 bare compile --paths "/home/rando/Code/textus/sawmill/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile hackney", update it with "mix deps.update hackney" or clean it with "mix deps.clean hackney"
Even trying to compile it manually results in the same error:
$ cd deps/hackney; DEBUG=1 ~/.mix/rebar3 compile
...
===> Compiled hackney_app.erl
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> Uncaught error: badarg
===> Stack trace to the error location:
[{re,run,[{error,bad_name},"^.*-(?<VER>[^/-]*)$",[{capture,[1],list}]],[]},
{rebar_hooks,re_version,1,
[{file,"/home/tristan/Devel/rebar3/_build/default/lib/rebar/src/rebar_hooks.erl"},
{line,146}]},
I also grabbed the latest hackeny from github, same error.
$ ~/.mix/rebar3 --version
rebar 3.3.6 on Erlang/OTP 19 Erts 8.3.5.1
It looks like the latest rebar3 on their github releases page is 3.4.3, is that something I need to update? I seems like I have the latest that mix will give me:
$ mix local.rebar
/home/rando/.mix/rebar already exists, overwrite? [Yn]
* creating /home/rando/.mix/rebar
/home/rando/.mix/rebar3 already exists, overwrite? [Yn]
* creating /home/rando/.mix/rebar3
What is this "/home/tristan/Devel/rebar3/..."
stuff I’m seeing in the paths? That’s not my user; is that some artifact from whomever compiled rebar3 that mix is using? Is it related to my issue?