-
Notifications
You must be signed in to change notification settings - Fork 140
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
Warning/error messages mismatching #2852
Comments
It seems pretty expected to have multiple syntax errors returned if the parser is used as a tool. But wondering how CRuby will (or already does) decide on which error message to use. And we are supposed to use the same approach in TruffleRuby to be compatible. |
For the first one, yeah I suppose I'm returning the Ruby 3.4 error message and not the Ruby 3.3 error message, so I can fix that. For the second one, yeah I would concatenate them before you check, it's not always going to be the first error. |
Got it, thank you! So feel free to close this issue if it isn't needed to track any planned changing. |
For the first one I think it's alright to use the clearer 3.4 error message even with version 3.3, we can just adapt specs to accept both, it doesn't seem worth adding a condition in Prism for this. |
Right, the ruby/spec's tests were changed to expect Prism-specific messages as well. |
Perfect, thanks! |
After recent update to the latest Prism we have two new failures in ruby/spec tests suite, related to a bit different warning/exception messages. So wondering if it's a known issue and 100% matching is supposed at all.
#1
Prism returns
"'when' clause on line 4 duplicates 'when' clause on line 2 and is ignored"
#2
Prism returns two errors:
"expected a delimiter after the patterns of an
inclause"
"unexpected '+', ignoring it"
CRuby returns the following error message:
The text was updated successfully, but these errors were encountered: