Skip to content

Commit

Permalink
PVF: Remove artifact persistence across restarts (paritytech#2895)
Browse files Browse the repository at this point in the history
Considering the complexity of
paritytech#2871 and the discussion
therein, as well as the further complexity introduced by the hardening
in paritytech#2742, as well as the
eventual replacement of wasmtime by PolkaVM, it seems best to remove
this persistence as it is creating more problems than it solves.

## Related

Closes paritytech#2863
  • Loading branch information
mrcnski committed Jan 10, 2024
1 parent d1e8e33 commit 83bf499
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions substrate/utils/build-script-utils/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,34 +59,3 @@ fn get_version(impl_commit: &str) -> String {
impl_commit
)
}

/// Generate `SUBSTRATE_WASMTIME_VERSION`
pub fn generate_wasmtime_version() {
generate_dependency_version("wasmtime", "SUBSTRATE_WASMTIME_VERSION");
}

fn generate_dependency_version(dep: &str, env_var: &str) {
// we only care about the root
match std::process::Command::new("cargo")
.args(["tree", "--depth=0", "--locked", "--package", dep])
.output()
{
Ok(output) if output.status.success() => {
let version = String::from_utf8_lossy(&output.stdout);

// <DEP> vX.X.X
if let Some(ver) = version.strip_prefix(&format!("{} v", dep)) {
println!("cargo:rustc-env={}={}", env_var, ver);
} else {
println!("cargo:warning=Unexpected result {}", version);
}
},

// command errors out when it could not find the given dependency
// or when having multiple versions of it
Ok(output) =>
println!("cargo:warning=`cargo tree` {}", String::from_utf8_lossy(&output.stderr)),

Err(err) => println!("cargo:warning=Could not run `cargo tree`: {}", err),
}
}

0 comments on commit 83bf499

Please sign in to comment.