Skip to content
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

Normalize error messages from ANTLR #598

Open
2 of 3 tasks
TristonianJones opened this issue Oct 28, 2022 · 0 comments
Open
2 of 3 tasks

Normalize error messages from ANTLR #598

TristonianJones opened this issue Oct 28, 2022 · 0 comments

Comments

@TristonianJones
Copy link
Collaborator

Feature request checklist

  • There are no issues that match the desired change
  • The change is large enough it can't be addressed with a simple Pull Request
  • If this is a bug, please file a Bug Report.

Change
Currently, when parse errors are detected, the ANTLR error message is passed through from CEL to the caller with some additional formatting to highlight where the error occurs. A recent update to the CEL grammar resulted in a shift in the
error information from ANTLR which has the potential to break upstream tests relying on the exact contents of the original
error from ANTLR.

Example
Introduce a flag-guarded change to normalize error messages from ANTLR in order to ensure that errors can be kept consistent
even in the face of grammar updates.

Alternatives considered
Strip all ANTLR error messages and replace them with a general "invalid syntax" message since the error from ANTLR itself
is not always easy to comprehend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant