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

Emit a warning when the cached parser is not used. #204

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

reventlov
Copy link
Collaborator

This change checks to see if the cached parser was discarded due to a mismatch between the cached parser and the grammar specified in module_ir.py, and, if so, emits a warning that the cached parser was not used, along with informational messages on the nature of the mismatch.

Adjusted the "warning" color from magenta to yellow. (This is the first warning in Emboss, so no magenta messages would have ever been emitted.)

Adjusted the "note" color from "bright black" (dark grey) to "white" (light grey), becaused at least some terminals display "bright black" as just black.

This change checks to see if the cached parser was discarded due to a
mismatch between the cached parser and the grammar specified in
module_ir.py, and, if so, emits a warning that the cached parser was not
used, along with informational messages on the nature of the mismatch.

Adjusted the "warning" color from magenta to yellow.  (This is the first
warning in Emboss, so no magenta messages would have ever been emitted.)

Adjusted the "note" color from "bright black" (dark grey) to "white"
(light grey), becaused at least some terminals display "bright black"
as just black.
@reventlov
Copy link
Collaborator Author

An example of the warning, as displayed on my terminal:
parser_cache_warning

Copy link
Collaborator

@jasongraffius jasongraffius left a comment

Choose a reason for hiding this comment

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

LGTM

compiler/front_end/emboss_front_end.py Show resolved Hide resolved
@reventlov reventlov merged commit 46423da into google:master Oct 11, 2024
4 checks passed
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