diff --git a/Cargo.lock b/Cargo.lock index 002240b..e5301c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4421,7 +4421,7 @@ dependencies = [ [[package]] name = "wasm-pkg-client" -version = "0.7.3" +version = "0.7.4" dependencies = [ "anyhow", "async-trait", @@ -4454,7 +4454,7 @@ dependencies = [ [[package]] name = "wasm-pkg-common" -version = "0.7.3" +version = "0.7.4" dependencies = [ "anyhow", "bytes 1.7.2", @@ -4474,7 +4474,7 @@ dependencies = [ [[package]] name = "wasm-pkg-core" -version = "0.7.3" +version = "0.7.4" dependencies = [ "anyhow", "futures-util", @@ -4922,7 +4922,7 @@ dependencies = [ [[package]] name = "wkg" -version = "0.7.3" +version = "0.7.4" dependencies = [ "anyhow", "base64 0.22.1", diff --git a/Cargo.toml b/Cargo.toml index 384f52c..aa8db1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ resolver = "2" [workspace.package] edition = "2021" -version = "0.7.3" +version = "0.7.4" authors = ["The Wasmtime Project Developers"] license = "Apache-2.0 WITH LLVM-exception" @@ -36,9 +36,9 @@ tracing-subscriber = { version = "0.3.18", default-features = false, features = "fmt", "env-filter", ] } -wasm-pkg-common = { version = "0.7.3", path = "crates/wasm-pkg-common" } -wasm-pkg-client = { version = "0.7.3", path = "crates/wasm-pkg-client" } +wasm-pkg-common = { version = "0.7.4", path = "crates/wasm-pkg-common" } +wasm-pkg-client = { version = "0.7.4", path = "crates/wasm-pkg-client" } wasm-metadata = "0.217" wit-component = "0.217" wit-parser = "0.217" -wasm-pkg-core = { version = "0.7.3", path = "crates/wasm-pkg-core" } +wasm-pkg-core = { version = "0.7.4", path = "crates/wasm-pkg-core" } diff --git a/crates/wasm-pkg-core/src/resolver.rs b/crates/wasm-pkg-core/src/resolver.rs index f027986..f3a8d0e 100644 --- a/crates/wasm-pkg-core/src/resolver.rs +++ b/crates/wasm-pkg-core/src/resolver.rs @@ -407,7 +407,9 @@ impl<'a> DependencyResolver<'a> { _ => None, }; - if !force_override && self.resolutions.contains_key(name) { + if !force_override + && (self.resolutions.contains_key(name) || self.dependencies.contains_key(name)) + { tracing::debug!(%name, "dependency already exists and override is not set, ignoring"); return Ok(()); } @@ -545,6 +547,7 @@ async fn load_package<'b>( } } +#[derive(Debug)] struct RegistryDependency { /// The canonical package name of the registry package. In most cases, this is the same as the /// name but could be different if the given package name has been remapped