std json: do not request EVM bytecode (#410)

These compiler outputs are irrelevant for the `resolc` compilation
pipeline. It can also break the compilation pipeline. For example, solc
may reject the code without via-ir or fail during the EVM codegen phase
with stack too deep errors - which is not relevant to us.

---------

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2025-11-13 10:32:32 +01:00
committed by GitHub
parent 8ee1860f12
commit 79aaca1a85
9 changed files with 96 additions and 2 deletions
@@ -56,6 +56,14 @@ impl PerFileSelection {
pub fn is_empty(&self) -> bool {
self.files.is_empty()
}
/// Removes unneeded selections.
pub fn retain(&mut self) {
for file in self.files.values_mut() {
file.per_contract.retain(Flag::is_required_for_codegen);
file.per_file.retain(Flag::is_required_for_codegen);
}
}
}
/// The `solc --standard-json` output selection.
@@ -125,4 +133,11 @@ impl Selection {
.contains(path, flag)
.unwrap_or(self.all.contains(flag))
}
/// Removes unneeded selections.
pub fn retain(&mut self) {
self.all.per_file.retain(Flag::is_required_for_codegen);
self.all.per_contract.retain(Flag::is_required_for_codegen);
self.files.retain();
}
}