mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-21 12:41:02 +00:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user