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

[fea-rs] Add CompilerError::display_verbose #887

Merged
merged 1 commit into from
Aug 2, 2024
Merged

Conversation

cmyr
Copy link
Member

@cmyr cmyr commented Jul 30, 2024

fea-rs collects extensive diagnostic information during parsing and compilation, and is able to report errors associated to specific locations in the input FEA. This wasn't very fine-grained, though, and was causing problems with crater (because sometimes the stderr text for a given error would be extremely long, and include a bunch of ANSI escape codes) and so I turned off this finer-grained reporting.

It would be nice to have it available as an option, though, especially now that I'm trying to add support for new syntax, and would like to see what the actual errors are.

This adds a new method to the CompilerError that will print the error in the old verbose style, and makes it so that when you call the fea-rs binary directly (which is really not useful for debugging) it uses this method when printing the returned error.

fea-rs collects extensive diagnostic information during parsing and
compilation, and is able to report errors associated to specific
locations in the input FEA. This wasn't very fine-grained, though, and
was causing problems with crater (because sometimes the stderr text for
a given error would be extremely long, and include a bunch of ANSI
escape codes) and so I turned off this finer-grained reporting.

It would be nice to have it available as an option, though, especially
now that I'm trying to add support for new syntax, and would like to see
what the actual errors are.

This adds a new method to the CompilerError that will print the error in
the old verbose style, and makes it so that when you call the fea-rs
binary directly (which is really not useful for debugging) it uses this
method when printing the returned error.
Copy link
Member

@dfrg dfrg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems incredibly useful and a good step toward improving our error reporting.

@cmyr cmyr added this pull request to the merge queue Aug 2, 2024
Merged via the queue into main with commit 4cdee64 Aug 2, 2024
10 checks passed
@cmyr cmyr deleted the fea-rs-verbose-error branch August 2, 2024 16:59
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

Successfully merging this pull request may close these issues.

2 participants