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 authored and GitHub committed 2025-11-13 10:32:32 +01:00
1 parent 8ee1860f12
commit 79aaca1a85
9 files changed
+96 -2

No files matched your search

+12 -1
View File
@@ -1,8 +1,10 @@
//! The tests for running resolc with standard JSON option.
use revive_solc_json_interface::SolcStandardJsonOutput;
use crate::tests::cli::utils::{
assert_command_success, assert_equal_exit_codes, execute_resolc_with_stdin_input,
execute_solc_with_stdin_input, STANDARD_JSON_CONTRACTS_PATH,
execute_solc_with_stdin_input, STANDARD_JSON_CONTRACTS_PATH, STANDARD_JSON_NO_EVM_CODEGEN_PATH,
};
const JSON_OPTION: &str = "--standard-json";
@@ -21,3 +23,12 @@ fn runs_with_valid_input_file() {
let solc_result = execute_solc_with_stdin_input(arguments, STANDARD_JSON_CONTRACTS_PATH);
assert_equal_exit_codes(&solc_result, &resolc_result);
}
#[test]
fn no_evm_codegen_requested() {
let result = execute_resolc_with_stdin_input(&[JSON_OPTION], STANDARD_JSON_NO_EVM_CODEGEN_PATH);
assert_command_success(&result, "EVM codegen std json input fixture should build");
let output: SolcStandardJsonOutput = serde_json::from_str(&result.stdout).unwrap();
assert!(!output.errors.iter().any(|msg| msg.severity == "error"))
}