Skip to content

Commit a258d9e

Browse files
committed
fix: sanitize stopAfter
Introduced in 0.7.3: https://github.com/ethereum/solidity/releases/tag/v0.7.3
1 parent 7638a8d commit a258d9e

File tree

1 file changed

+7
-1
lines changed
  • crates/artifacts/solc/src

1 file changed

+7
-1
lines changed

crates/artifacts/solc/src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ impl From<SolcInput> for StandardJsonCompilerInput {
230230
#[serde(rename_all = "camelCase")]
231231
pub struct Settings {
232232
/// Stop compilation after the given stage.
233-
/// since 0.8.11: only "parsing" is valid here
233+
///
234+
/// Since 0.7.3. Only "parsing" is valid here.
234235
#[serde(default, skip_serializing_if = "Option::is_none")]
235236
pub stop_after: Option<String>,
236237
#[serde(default, skip_serializing_if = "Vec::is_empty")]
@@ -297,6 +298,11 @@ impl Settings {
297298
self.debug = None;
298299
}
299300

301+
if *version < Version::new(0, 7, 3) {
302+
// introduced in 0.7.3 <https://github.com/ethereum/solidity/releases/tag/v0.7.3>
303+
self.stop_after = None;
304+
}
305+
300306
if *version < Version::new(0, 7, 5) {
301307
// introduced in 0.7.5 <https://github.com/ethereum/solidity/releases/tag/v0.7.5>
302308
self.via_ir = None;

0 commit comments

Comments
 (0)