reflection: Hide the `which` error message from inference #64587
All Vouch review confidence checks passed
Residual risk 0.03 = Change Risk (0.10) × (1 − Review Confidence (0.69)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.10 · 2 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.57 · 2 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
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.066
Real PR Conversation Timeline
5 items
Approved
Approved these changes.
Loading a package that adds awrite(::IO, ::Symbol)method invalidatesshowerror(::IO, ::MethodError)
This sounds like the more fundamental fix / issue, but nothing wrong with an extra barrier on a cold path
Approved
Approved these changes.
https://github.com/JuliaLang/julia/pull/64604 should attack more of the root cause to this.
topolarity
KristofferC
which(f, t)builds its error message eagerly withsprint(io -> showerror(io, ::MethodError)), so every caller carries an edge into the wholeMethodErrorprinter. Loading a package that adds awrite(::IO, ::Symbol)method invalidatesshowerror(::IO, ::MethodError), and with itwhich,functionloc,_propertynames_bytype, and package code that callswhich(e.g. ComputePipeline/Makie). Callingsprintthroughinferencebarrier, as@assertdoes for its message, removes the edge. The error message is unchanged.Found while looking for more cases like #64585.
| unique MIs invalidated loading 30 packages¹ | master | PR |
|---|---|---|
| Linux x86_64 (on top of #64585) | 8,181 | 7,329 |
| macOS aarch64 | 6,844 | 6,038 |
<details><summary>¹ package set</summary>
SparseArrays, LinearAlgebra, Statistics, Dates, Random, Printf, Markdown, InteractiveUtils, Test, Serialization, REPL, Pkg, DataFrames, CairoMakie, Distributions, ForwardDiff, StaticArrays, JSON, Revise, Nemo, Interpolations, PrettyTables, Unitful, IntervalArithmetic, ComponentArrays, Ferrite, JuliaInterpreter, DataStructures, OffsetArrays, ProgressMeter. Repeat runs agree within 5 MIs.
</details>
🤖 Generated with Claude Code