-
Notifications
You must be signed in to change notification settings - Fork 510
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
Improved compile messages #2782
Comments
This isn't really hard and I wanted to give it a try for a partial implementation to see the style, it looks like this so far: -module(rebar_fake).
-export([diagnostic/1]).
diagnostic(A) ->
X = add(5 / 0),
{X,X}.
add(X) -> X.
add(X, Y) -> X + Y. Calling
Seems to be okay-ish. See #2783 |
(this draft PR is likely to look like garbage on errors on long long lines I guess, but it shows a very easy way to get improvements) |
What we have in eqwalizer is actually not available in regular Erlang. We not only have line + column, but we actually have full start/end range for every construct in AST (the price is that the AST format is not backwards compatible). This allows the reported ranges to be precise, rather than just the single point information that Erlang compiler has - that said, this is still better than just line information. |
Ah, I thought it did the range based on the error itself. Like if the error says there is an issue at |
I hadn't thought about the fact that we have all the info (column numbers) these days to output those fancy error messages like you see in Elm or Rust until I saw it with eqwalizer when running it on code which didn't compile:
vs
It isn't that useful but opening this to track it and say hey, 'if someone sees this and wants to implement it that'd be nice' :)
The text was updated successfully, but these errors were encountered: