bugfix(plugins): Made compile_error! diag not include "s. - #10064
Conversation
PR SummaryLow Risk Overview The Reviewed by Cursor Bugbot for commit 62eb1ed. Bugbot is set up for automated code reviews on this repo. Configure here. |
981228d to
422de73
Compare
3b7a1cf to
cbb5748
Compare
cbb5748 to
62eb1ed
Compare
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on eytan-starkware).

Summary
The
compile_error!macro plugin now usesstring_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:
Why is this change needed?
Error messages emitted by
compile_error!were being displayed with their surrounding quotes included (e.g.,"error message"instead oferror message), which is inconsistent with how error messages are typically presented and mirrors the behavior of Rust'scompile_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 aserror 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)returnsNone, falling through to the existing error path for invalid arguments.