Building with extra verbosity (-vv) can cause aborts with extra prints in build.rs file
Closed this issue · 1 comments
When debugging a build script, I noticed that building with cargo wasi build -vv
can error out when encountering extra print statements in build.rs
. For example, with the wasi-hello-world
project, adding a build.rs
file with:
fn main() {
println!("the build is going great!");
}
leads to an error with the message: error: failed to parse [wasi-hello-world 0.1.0] the build is going great!: expected value at line 1 column 2
because this line aborts the program when parsing fails. Changing that line to print a warning and continue seems like a straightforward fix.
Building with just a single -v
doesn't trigger issue because Cargo suppresses the print statements at that level of verbosity (commit rust-lang/cargo@2c0d6af)
Thansk for the report! Definitely a bug nad should be fixed in #86