prql: Improving error messages
What’s up?
Some of our error messages could be much better. We now have the Chumsky parser, on top of the ASTs, which should allow us to make these much great. At the moment, they’re anywhere from “much better than SQL” to “a bit worse”…
Here’s an example of a really bad error message:
from film
group
Error:
╭─[:?:?]
│
│
│
│ Help: are you missing `from` statement?
───╯
Probably one-issue-per-error-message is not a good way of managing them — there would be a huge number of issues, and it would be difficult to see what’s current. So instead, I created a file test_bad_error_messages where we can record bad error messages and seeded it with the above.
Two forms of contributions would be very helpful:
- Add bad error messages
- Take a bad error message, make it good, and move the test to
test_error_messages. The messages there are kept up-to-date with tests on every commit, so there’s no risk of wasted effort, and the change can’t regress. I left some quick notes for how to approach this, and it’s also very encouraged to ask questions.- Link back to this issue in the PR, so other folks can we can gradually get a few examples of how these are done
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 15 (15 by maintainers)
@khoa165 Hi, thank you for looking at that.
Playground is based on the last release (currently 0.8.1) and is out of date compared to the latest development version (the main branch).