Wasm-builder-runner unset CARGO_TARGET_DIR and release 1.0.4 (#3893)

* Wasm-builder-runner unset `CARGO_TARGET_DIR` and release 1.0.4

`CARGO_TARGET_DIR` needs to be unset or otherwise cargo deadlocks,
because cargo always holds an exclusive lock on target dir.

* Commit missing version up

* Lock file
This commit is contained in:
Bastian Köcher
2019-10-23 10:28:44 +02:00
committed by GitHub
parent 70fd47e209
commit 5e889431d3
7 changed files with 18 additions and 13 deletions
@@ -227,6 +227,11 @@ fn run_project(project_folder: &Path) {
cmd.arg("--release");
}
// Unset the `CARGO_TARGET_DIR` to prevent a cargo deadlock (cargo locks a target dir exclusive).
// The runner project is created in `CARGO_TARGET_DIR` and executing it will create a sub target
// directory inside of `CARGO_TARGET_DIR`.
cmd.env_remove("CARGO_TARGET_DIR");
if !cmd.status().map(|s| s.success()).unwrap_or(false) {
// Don't spam the output with backtraces when a build failed!
process::exit(1);
@@ -255,7 +260,7 @@ fn check_provide_dummy_wasm_binary() -> bool {
fn provide_dummy_wasm_binary(file_path: &Path) {
fs::write(
file_path,
"pub const WASM_BINARY: &[u8] = &[]; pub const WASM_BINARY_BLOATY: &[u8] = &[];"
"pub const WASM_BINARY: &[u8] = &[]; pub const WASM_BINARY_BLOATY: &[u8] = &[];",
).expect("Writing dummy WASM binary should not fail");
}