[JuliaLowering] Require `Syntax` from new macros and generated fns #65277
All Vouch review confidence checks passed
Residual risk 0.04 = Change Risk (0.39) × (1 − Review Confidence (0.89)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 96 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.89 · 2 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.274
Real PR Conversation Timeline
4 items
@pkgeval runtests()
@mlechu: PkgEval run gh-7177406394 finished: possible new issues: 10 packages ❌; 37 passed on a re-run
Compute cost: about $33.78 (EC2 spot).
Approved
In favor - seems like a sensible restriction and the exception for interpolation "feels" right to me (for now)
I think @generated still needs implicit return handling:
@generated f(x) = return 1 # errored =)
@generated f(x) = 1 # allowed =(
topolarity
mlechu
Be stricter about always returning Syntax, and not, e.g.
Int, from "new" macros and generated functions. Converting the return value to a single syntax node shouldn't be cumbersome by the time this stuff becomes public. We can loosen these restrictions at any time.Also fix the "implicit expr->syntaxtree" message that only makes sense to me. The new error message should explain that either a new macro returned the wrong value, or as is more likely today, a macro or generated function definition is being parsed with the wrong edition.
TODO:
$due to generated functions and@eval. This shouldn't pose the same risk since changing the parser's edition won't change quoted Expr to quoted Syntax, and Racket also allows interpolation of raw lists into their syntax type, but ping me if you foresee any problems with this.Test diff by Claude
Assisted-by: Claude Fable 5.2