Skip to content

[DONT MERGE] feat(semantic tests): add --skip-via-ir and --via-ir flags#183

Merged
cdrappi merged 3 commits intoseismicfrom
ci-via-ir-support
Mar 5, 2026
Merged

[DONT MERGE] feat(semantic tests): add --skip-via-ir and --via-ir flags#183
cdrappi merged 3 commits intoseismicfrom
ci-via-ir-support

Conversation

@cdrappi
Copy link
Contributor

@cdrappi cdrappi commented Feb 6, 2026

No description provided.

Adds a CLI flag to skip semantic tests that require via-IR compilation
(compileViaYul: true). Use this when the solc binary does not support
--via-ir.
Adds a CLI flag to force solc's via-IR compilation pipeline for
semantic tests. Tests that explicitly opt out (compileViaYul: false)
are skipped rather than forced through the incompatible pipeline.
The seismic solc compiler will require --unsafe-via-ir whenever --via-ir
is used, making it explicit that via-IR compilation is experimental.

This commit adds the corresponding --unsafe-via-ir flag to the semantic
tests runner. Key behaviors:

  - --unsafe-via-ir enables via-IR compilation by passing both --via-ir
    and --unsafe-via-ir to the compiler
  - --via-ir now requires --unsafe-via-ir (clap validation)
  - Tests with compileViaYul: true are auto-skipped when --unsafe-via-ir
    is not set, since the compiler would reject them
  - --unsafe-via-ir conflicts with --skip-via-ir
  - compile_solidity() guards against --via-ir without --unsafe-via-ir

Additionally, all test skips are now tracked by reason and printed as a
grouped summary at the end of a run:

    Skipped 63 test file(s):
        42 - via-IR required (use --unsafe-via-ir to enable)
        15 - unsupported: multi-source files (==== Source:)
         3 - unsupported: allowNonExistingFunctions
         2 - unsupported: revertStrings: debug
         1 - EOF required (use --eof to enable)

The full decision matrix is documented in --help on the --via-ir flag.
@cdrappi cdrappi marked this pull request as ready for review March 5, 2026 23:23
@cdrappi cdrappi merged commit 03f561f into seismic Mar 5, 2026
6 checks passed
@cdrappi cdrappi deleted the ci-via-ir-support branch March 5, 2026 23:40
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