Open marco-m opened 7 years ago
If the error is given with the path from rebar3 then that fix is likely a thing we need to address in rebar3; we've done it for the compiler and dialyzer (only in master for now), but not all paths have been properly rewritten. Not sure all of them can either.
Ahh, I didn't even think about trying rebar3 itself from the command-line! Here is what happens (using the steps to create the directory outlined in my original post):
$ rebar3 eunit
===> Verifying dependencies...
===> Compiling pizza
===> Performing EUnit tests...
F
Failures:
1) pizza_test:failing_test/0: module 'pizza_test'
Failure/Error: ?assert(false)
expected: true
got: false
%% /path/to/pizza/_build/test/lib/pizza/test/pizza_test.erl:6:in `pizza_test:-failing_test/0-fun-0-/0`
This happens on Mac OS X with a fresh (yesterday) rebar3 from git.
So it seems to be a problem of rebar3 itself as you mention, ferd?
Yeah. If you can open an issue there, we've got somewhat more generic code for that kind of error, we'll just have to see if we can hook EUnit in any way to print better paths for us or if it's hopeless.
Opened https://github.com/erlang/rebar3/issues/1464 on the rebar3 project. Thanks!
It looks like it will be difficult to fix the problem on rebar3 side, and in addition it is not considered a serious bug (see above mentioned bug on rebar3). I think the only pragmatic approach is to workaround from the intellij-erlang part.
With the latest plugin (0.9.930):
How to reproduce:
If now you click on that line, it will open the wrong file in the editor window (the one below
_build
)This means that you will edit the wrong file, re-run the tests, see again the error, re-open the wrong file and your changes have disappeared (because the real sources have been copied again below
_build
)Same problem will happen if the test file contains a compilation error, instead than a test failure.