Skip to content

Commit

Permalink
print file information as well on wasm-validate warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
danleh committed Jul 27, 2024
1 parent 1841fd5 commit d5b763e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/test_utilities/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ pub fn wasm_validate(path: impl AsRef<Path>) -> Result<(), WasmValidateError> {
assert!(validate_output.stdout.is_empty());
// Warnings don't make validation fail but _are_ printed on stderr.
let stderr = String::from_utf8_lossy(&validate_output.stderr);
let stderr = stderr.trim();
if !stderr.is_empty() {
eprintln!("wasm-validate warning: {stderr}");
let file_info = WasmFileInfo::new(path);
eprintln!("wasm-validate warning on {file_info}: {stderr}");
}
Ok(())
},
Expand Down

0 comments on commit d5b763e

Please sign in to comment.