[DEV] autosetup: detect the via-ir-required family by its remediation hint - #146
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror of #135 onto the
devbleeding-edge branch.Source branch:
shelly/via-ir-detect-family. This branch is that head merged forward withdev; #135 itself is untouched and still targetsmaster.Per the
devbranch policy this merges without review oncepyrightandpytestare green.