`rebar3 ct` fails at rebar_prv_escriptize, find_deps_of_deps
slaykachu opened this issue · 5 comments
I've freshly cloned the repo.
rebar3 ct
returns:
===> Uncaught error in rebar_core. Run with DIAGNOSTIC=1 to see stacktrace or consult rebar3.crashdump
The crashdump:
Error: {badmatch,error}
[{rebar_prv_escriptize,find_deps_of_deps,3,
[{file,"/private/tmp/rebar3-20201203-11494-1h6smf7/rebar3-3.14.3/src/rebar_prv_escriptize.erl"},
{line,256}]},
{rebar_prv_escriptize,find_deps,2,
[{file,"/private/tmp/rebar3-20201203-11494-1h6smf7/rebar3-3.14.3/src/rebar_prv_escriptize.erl"},
{line,250}]},
{rebar_prv_escriptize,escriptize,2,
[{file,"/private/tmp/rebar3-20201203-11494-1h6smf7/rebar3-3.14.3/src/rebar_prv_escriptize.erl"},
{line,110}]},
{rebar_prv_escriptize,do,1,
[{file,"/private/tmp/rebar3-20201203-11494-1h6smf7/rebar3-3.14.3/src/rebar_prv_escriptize.erl"},
{line,89}]},
{rebar_core,do,2,
[{file,"/private/tmp/rebar3-20201203-11494-1h6smf7/rebar3-3.14.3/src/rebar_core.erl"},
{line,155}]},
{rebar_hooks,run_provider_hooks_,6,
[{file,"/private/tmp/rebar3-20201203-11494-1h6smf7/rebar3-3.14.3/src/rebar_hooks.erl"},
{line,65}]},
{rebar_hooks,run_all_hooks,6,
[{file,"/private/tmp/rebar3-20201203-11494-1h6smf7/rebar3-3.14.3/src/rebar_hooks.erl"},
{line,18}]},
{rebar_hooks,'-run_project_and_app_hooks/5-lc$^0/1-0-',6,
[{file,"/private/tmp/rebar3-20201203-11494-1h6smf7/rebar3-3.14.3/src/rebar_hooks.erl"},
{line,30}]}]
I will re-try with the latest rebar3 version.
New rebar3 installed, other issue :)
% rebar3 --version
rebar 3.15.1 on Erlang/OTP 23 Erts 11.2.2
% rm -rf _build
% rebar3 ct
===> Verifying dependencies...
===> Fetching proper (from {git,"https://github.com/proper-testing/proper.git",
{branch,"master"}})
===> Fetching covertool v2.0.3
===> Analyzing applications...
===> Compiling covertool
===> Analyzing applications...
===> Compiling proper
===> Analyzing applications...
===> Compiling erlfmt
===> Running Common Test suites...
===> Building escript for erlfmt...
===> Unable to run pre hooks for 'ct', command '{bad_app,getopt}' in namespace 'rebar_prv_escriptize' not found.
Next step: google that!
When you run erl
what do you get?
$ erl
Erlang/OTP 23 [erts-11.1.8] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe] [dtrace]
The pre hooks for 'ct' fails on mac book pro (don't judge me!).
On centos8, I get:
===> Verifying dependencies...
===> Failed to update package getopt from repo hexpm
===> Package not found in any repo: getopt
So the problem is becoming pretty clear! The solution not so much.
I also do my development for erlfmt
on my macbook.
If erl
fails on macbook this is probably the problem.
Maybe try:
$ brew install erlang
Ok, thanks to Walter I isolated the culprit: it was my ~/.config/rebar3/rebar.config
:
{plugins, [rebar3_auto,
rebar3_proper]}.
%% The PropEr dependency is required to compile the test cases
%% and will be used to run the tests as well.
{profiles,
[{test, [
{deps, [
%% hex
%% {proper, "1.3.0"}
%% newest from master
{proper, {git, "https://github.com/proper-testing/proper.git",
{branch, "master"}}}
]}
]}
]}.
By discarding it it fixes the issue.
So, as a temporary workaround, I will put proper
and auto
plugins in the projects were I use them rather than globally.
Closing this issue (which doesn't seem to be erlfmt specific), might revisit this plugins vs getopt conflict later.