Sitelet https://github.com/starkware-libs/cairo/pull/10064
Skip to content

bugfix(plugins): Made compile_error! diag not include "s. - #10064

Merged
orizi merged 1 commit into
mainfrom
orizi/06-08-bugfix_plugins_made_compile_error_diag_not_include_s
Jun 8, 2026
Merged

orizi merged 1 commit into
mainfrom
orizi/06-08-bugfix_plugins_made_compile_error_diag_not_include_s

Conversation

@orizi

@orizi orizi commented Jun 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The compile_error! macro plugin now uses string_value(db) to extract the raw string content from the error message argument, stripping the surrounding quotes from the diagnostic output.


Type of change

Please check one:

  • Bug fix (fixes incorrect behavior)
  • New feature
  • Performance improvement
  • Documentation change with concrete technical impact
  • Style, wording, formatting, or typo-only change

⚠️ Note:
To keep maintainer workload sustainable, we generally do not accept PRs that
are only minor wording, grammar, formatting, or style changes.
Such PRs may be closed without detailed review.


Why is this change needed?

Error messages emitted by compile_error! were being displayed with their surrounding quotes included (e.g., "error message" instead of error message), which is inconsistent with how error messages are typically presented and mirrors the behavior of Rust's compile_error! macro.


What was the behavior or documentation before?

Diagnostics produced by compile_error!("error message") displayed the message as "error message" — with the quotes included as part of the diagnostic text.


What is the behavior or documentation after?

Diagnostics produced by compile_error!("error message") now display the message as error message, without surrounding quotes.


Related issue or discussion (if any)

N/A


Additional context

The change also adds a guard to handle the case where string_value(db) returns None, falling through to the existing error path for invalid arguments.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

orizi commented Jun 8, 2026 •

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@orizi orizi mentioned this pull request Jun 8, 2026
1 of 5 tasks
@orizi
orizi marked this pull request as ready for review June 8, 2026 15:26
@cursor

cursor Bot commented Jun 8, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Localized change to macro plugin diagnostic formatting and test snapshots; no compiler pipeline or runtime behavior beyond error message display.

Overview
compile_error! diagnostics now show the string literal’s decoded content instead of the raw source text, so messages appear as error message rather than "error message".

The CompileErrorPlugin path uses string_value(db) on the string argument (with a fallback to the existing “must be an unnamed string argument” diagnostic when decoding fails). Plugin test expectations were updated to match the new message text.

Reviewed by Cursor Bugbot for commit 62eb1ed. Bugbot is set up for automated code reviews on this repo. Configure here.

@orizi
orizi changed the base branch from orizi/06-08-bugfix_parser_improved_missing_comma_diag to graphite-base/10064 June 8, 2026 15:26
@orizi
orizi force-pushed the graphite-base/10064 branch from 981228d to 422de73 Compare June 8, 2026 15:27
@orizi
orizi force-pushed the orizi/06-08-bugfix_plugins_made_compile_error_diag_not_include_s branch from 3b7a1cf to cbb5748 Compare June 8, 2026 15:27
@orizi
orizi changed the base branch from graphite-base/10064 to main June 8, 2026 15:27
@orizi
orizi force-pushed the orizi/06-08-bugfix_plugins_made_compile_error_diag_not_include_s branch from cbb5748 to 62eb1ed Compare June 8, 2026 16:50
@orizi
orizi enabled auto-merge June 8, 2026 17:53

@TomerStarkware TomerStarkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

:lgtm:

@TomerStarkware reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on eytan-starkware).

@orizi
orizi added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit 37d764e Jun 8, 2026
53 checks passed
@orizi
orizi deleted the orizi/06-08-bugfix_plugins_made_compile_error_diag_not_include_s branch June 9, 2026 08:11
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.

3 participants