-
Notifications
You must be signed in to change notification settings - Fork 11
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
MatchingError output is confusing #50
Comments
Thank you for your suggestions. What information would you like to see in a meaningful compiler error? Pinpointing the exact location might not even need a lot of changes. |
Apart from standard info like line number and spans. I think when designing the errors, the perspective should be "What does the user need to do to fix this?" for example right now this error doesn't tell what is failing to match, do I need fix a type name? It should point at exactly where the problem is and how it can be fixed, e.g. if it's a typo it should tell me whether there's something that closely matches the type name present. |
Another thing that would help with this is adding snapshot testing that adds tests with known bad modules that test what different possible errors look like, that will make it a lot easier to prevent errors from regressing, and make it easy to see when a change improves an error message. |
I like the idea of snapshot testing and I would like to get the |
The error output I get from this error doesn't really give me actionable information. I think it would be good to put some work in including more information to make errors more readable and accessible.
Two libraries that would help a lot here
Another alternative are the Chumsky/Ariadne combo which would require moving away from nom, but adding good errors might require extensive plumbing regardless.
The text was updated successfully, but these errors were encountered: