-
Notifications
You must be signed in to change notification settings - Fork 0
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
EEP 74: Erlang Error Index #1
Conversation
b5ec4e1
to
19ba190
Compare
eeps/eep-0072.md
Outdated
-define(DEFAULT, #{a => 1}). | ||
|
||
updated(Value) -> | ||
?DEFAULT#{a => Value}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a
meant to be timeout
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, fixed.
eeps/eep-0072.md
Outdated
Error cannot be re-used. If a tool stops emitting an error code, the | ||
_deprecated_ error code is still documented in the index, together | ||
with a deprecation notice. This is to avoid re-using a single code for | ||
multiple purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe propose a mechanism to submit new namespaces/codes?
eeps/eep-0072.md
Outdated
|
||
* The `erlc` compiler and the `dialyzer` type-checker would start | ||
emitting error codes together with errors and warnings messags. | ||
* The tools could also expose a `--explain` option from the command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would erlc
fetch the full explanation? How does rustc
do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@garazdawi I had to check. Apparently the Markdown files are actually stored in a crate which is part of the compiler itself:
https://github.com/rust-lang/rust/blob/master/compiler/rustc_error_codes/src/error_codes/
Then they have a registry (a hashmap) which maps each error code to its corresponding description.
When you pass the explain
command they simply try to fetch the description. Not very advanced.
The initial plumbing was introduced here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should remove this as it creates a dependency between what is stored online and what is embedded in the compiler. It is better if everyone just uses the webpage directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at how haskell is doing things and I like it. Simple and effective.
What I think we should do is add https://errors.erlang.org as a github page. That github page will contain errors for the tools part of Erlang/OTP, but it will also contain links to other namespaces so that users can find the errors for elvis, elp, elixir, gradualizer etc etc from that page. I don't think we should make the external errors part of that page as that would mean that the amount of administration needed will increase. Possibly we can make the search index incorporate all namespaces.
I then propose that it will be a joint effort from us and WhatsApp to manage this page, that is we will all have merge/commit rights in that repo.
Maybe we should also create a convention on how errors/warnings are printed so that tools know how to parse them?
eeps/eep-0072.md
Outdated
|
||
* The `erlc` compiler and the `dialyzer` type-checker would start | ||
emitting error codes together with errors and warnings messags. | ||
* The tools could also expose a `--explain` option from the command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should remove this as it creates a dependency between what is stored online and what is embedded in the compiler. It is better if everyone just uses the webpage directly.
86a2335
to
217ce71
Compare
217ce71
to
c4e0325
Compare
Superseded by erlang#70 |
To start the discussion.