PVF: Remove artifact persistence across restarts (#2895)

Considering the complexity of
https://github.com/paritytech/polkadot-sdk/pull/2871 and the discussion
therein, as well as the further complexity introduced by the hardening
in https://github.com/paritytech/polkadot-sdk/pull/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 https://github.com/paritytech/polkadot-sdk/issues/2863
This commit is contained in:
Marcin S
2024-01-10 16:50:55 +01:00
committed by GitHub
parent f2a750ee86
commit 6a80c10a6f
11 changed files with 113 additions and 375 deletions
@@ -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),
}
}