From a258d9eda87710856ffb938ae844478a9c38c673 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 29 Aug 2025 16:08:10 +0200 Subject: [PATCH] fix: sanitize `stopAfter` Introduced in 0.7.3: https://github.com/ethereum/solidity/releases/tag/v0.7.3 --- crates/artifacts/solc/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/artifacts/solc/src/lib.rs b/crates/artifacts/solc/src/lib.rs index a5e2b2706..d632f158f 100644 --- a/crates/artifacts/solc/src/lib.rs +++ b/crates/artifacts/solc/src/lib.rs @@ -230,7 +230,8 @@ impl From for StandardJsonCompilerInput { #[serde(rename_all = "camelCase")] pub struct Settings { /// Stop compilation after the given stage. - /// since 0.8.11: only "parsing" is valid here + /// + /// Since 0.7.3. Only "parsing" is valid here. #[serde(default, skip_serializing_if = "Option::is_none")] pub stop_after: Option, #[serde(default, skip_serializing_if = "Vec::is_empty")] @@ -297,6 +298,11 @@ impl Settings { self.debug = None; } + if *version < Version::new(0, 7, 3) { + // introduced in 0.7.3 + self.stop_after = None; + } + if *version < Version::new(0, 7, 5) { // introduced in 0.7.5 self.via_ir = None;