Open helanhalvan opened 3 years ago
One of the thing they changed since then is that the app stopped depending on itself (it defined elvis_shell
that would be published as elvis
and it fetched elvis
as an app under the pkg_name elvis_core
). This has now been sorted out, and I have to assume that this is what caused the crash. Just apps named weird compared to what is expected and causing issues when fetching and tagging deps.
Have you tried rebar3_lint
(https://hex.pm/packages/rebar3_lint)? It's elvis_core
under the hood and maintained by the same developers. (and @ferd is right, the name changing was unfortunate; it broke some expectations).
For reference:
elvis_core
),@elbrujohalcon mentioned it here: https://github.com/inaka/elvis/issues/491#issuecomment-423183949.
With the plugin you do
rebar3 lint
and you're good to go.
Yes, we are using rebar3_lint
. I found this when trying top map out all the dependencies of the project, including transitive ones.
Even if the root issue is in the dependency itself, (as I mentioned in the post, this has been resolved in 1.0.0), the way rebar crashes makes it hard to figure out what is even wrong. Like, looking at the output with DIAGNOSTIC and/or DEBUG as well as the crashdump, there is nothing pointing to elvis, the only thing you get to work with is that something went wrong when handling:
/tmp/rebar_core_crash/_build/default/lib/egithub/rebar.config.script
which isn't even a direct dependency.
It is also really strange that rebar3 will crash once and then work. Anyway, mostly opened this issue as this happening was really confusing. I'll use elvis 1.0.0+ from now on, and move on with things. Might be that this weird issue is not worth chasing down.
Environment
rebar3 report
to your message:$rebar3 --version rebar 3.14.3 on Erlang/OTP 22 Erts 10.7.2.7
To replicate, create a new rebar3 project with
rebar3 new app rebar_core_crash
replace rebar.config with:Note that this is an old elvis version interacting with the latest aleppo, and they might not be compatible. This issue goes away with elvis 1.0.0, not sure why, but I still think this is worth reporting as I don't think this problem is caused by the elvis version, merely exposed by this combination of dependencies.
Current behaviour
So, if you run
rebar3 compile
it will crash the first time, output below. However if you run the same command again, it will complete successfully.The first time output:
Second time output:
(The diagnostic one is really long and I am not sure how much it will help, the issue should be easy to reproduce anyway.)
Expected behaviour
Not sure, it is possible that these two dependencies are incompatible in some way which should result in some error, but I don't think rebar3 should crash. It is rather difficult to know why this is happening with a larger rebar.config. Also, this is inconistent, either rebar3 compile should fail every time or succeed every time.