-
Notifications
You must be signed in to change notification settings - Fork 30
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cryptic error message #48
Comments
A minor update: The issue persists in d61310a |
Hi, thanks for the report. Yes, we indeed do not check that the module annotation matches the name of the file in eqWAlizer. We usually run eqWAlizer alongside Dialyzer, meaning this would be caught properly by Dialyzer. Nevertheless, such a check would be a nice addition. I think the best place to add it would be right into mini-elp, probably in the parse server so that checking fails properly before eqWAlizer even runs. |
I have already looked at that folder. It is nice to get a confirmation that I was looking at the right place. I'm struggling to start the parser on it's own. If i run I have tried to look for documentation, this repo mainly has documentation related to how to use eqwalizer and design choices, not much about the architecture of the code-base itself. There is obviously a relation to https://github.com/WhatsApp/erlang-language-platform - but I am not sure where mini-elp and elp differs... If I'm understanding it correctly the parse server is more or less a copy of the parser from the official Erlang source code that has been adjusted to the needs you have. But it still seems to be using erlang? I'm not sure where what happens Thank you for your time. |
Hi
I have medium sized project that I used to check potential edge-cases in Eqwalizer. I've discovered a very cryptic error message when certain conditions are met. One of them is that the module name does not match the file name.
I got a file
app_a/src/app_a.erl
that starts with-module(app_y).
which is obviously wrong.If I use erlang or dialyzer I get a nice error message saying what's wrong:
Here Erlang:
Dialyzer:
However with eqwalizer I get this cryptic message:
Version info:
elp 0.17.16
(or at least that is what it says, see #47 )I have tried to determine what goes wrong and have determined that the parse error relate to some IPC. The mini-elp requests that eqwalizer should do something, and it fails - most likely to parse the app_a.erl. Mini-elp does not know how to parse a java error message, therefore the code fails with a parse error.
To debug further I have tried to run
strace -f
, but I get a lot of data (1.5+ million lines of logs) which is not easy for me to filter since I have only very limited knowledge of both eqwalizer and erlang. I have tried to search the source code, but I've not been able to determine where the error originate from. I'm not even sure in which file the fault lies, since it looks like the fault is carried along from somewhere else...I think the root of the issue has to do with how the .erl files are parsed, however that may happen. I suppose Erlang is used (maybe
erl -compile
?), but again I'm not sure where to find the initialization of the parsing process. I have some vague guesses, but I want to avoid making this issue report too long. Eqwalizer and/or mini-elp must do at least some parsing on it's own since it is checking the content of comments.TL;DR: I would argue a simple parse error should make the application blow up like it is doing right now.
I would be happy to help in whatever way I can to resolve this issue. If I can learn more about how eqwalizer works in the process then it would be fantastic.
Thank you in advance.
The text was updated successfully, but these errors were encountered: