Skip to content

[DEV] autosetup: detect the via-ir-required family by its remediation hint - #146

Merged
shellygr merged 3 commits into
devfrom
shelly/dev-pr-135
Aug 10, 2026
Merged

[DEV] autosetup: detect the via-ir-required family by its remediation hint#146
shellygr merged 3 commits into
devfrom
shelly/dev-pr-135

Conversation

@shellygr

Copy link
Copy Markdown
Contributor

Mirror of #135 onto the dev bleeding-edge branch.

Source branch: shelly/via-ir-detect-family. This branch is that head merged forward with dev; #135 itself is untouched and still targets master.

Per the dev branch policy this merges without review once pyright and pytest are green.

shellygr and others added 3 commits August 8, 2026 18:01
A diagnostic requires the IR pipeline when solc attaches the hint naming
that pipeline or its flag (`--via-ir`, `viaIR: true`, "via-ir pipeline",
"IR pipeline"), whatever the diagnostic itself is called. The hint is
matched on whitespace-normalized text and tolerates a wrap inside a
hyphenated token; the conf key `solc_via_ir` stays outside the family
since it belongs to the error calling for the opposite fix.

The affected file comes from the compiled unit's `Compiling <path>...`
line when there is one, and otherwise from the first `-->` source
location under the hint, so whole-project compiles are attributed too.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The via-ir hint is read per diagnostic, delimited by solc's own labels
(Warning:/<Kind>Error:/YulException:) and the Compiling progress lines.
A hint counts only inside a diagnostic that offers no alternative remedy:
stack-too-deep and YulException carry the same hint while also offering
the optimizer and fewer locals, and stay with stack_too_deep_via_ir and
the yul rungs so their ladder is climbed in order.

Attribution by `-->` source location is confined to the diagnostic that
asked for via-ir, so a neighbouring diagnostic's file is never enabled.
The bare `IR pipeline` spelling requires a word boundary, keeping prose
in quoted source lines out of the family.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both sides add module-level definitions at the same point of
compilation_workarounds.py: the via-ir hint regexes here, _flatten_conf and
_conf_delta on dev. They are independent, so both are kept.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@shellygr
shellygr merged commit 507fb60 into dev Aug 10, 2026
2 checks passed
@shellygr
shellygr deleted the shelly/dev-pr-135 branch August 10, 2026 13:51
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.

1 participant