Skip to content

Commit 3c34508

Browse files
fix(resolver): Make sure things don't override
We were only checking resolved deps instead of both it and unresolved deps in the resolver. Signed-off-by: Taylor Thomas <taylor@cosmonic.com>
1 parent f0b0108 commit 3c34508

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "2"
44

55
[workspace.package]
66
edition = "2021"
7-
version = "0.7.3"
7+
version = "0.7.4"
88
authors = ["The Wasmtime Project Developers"]
99
license = "Apache-2.0 WITH LLVM-exception"
1010

@@ -36,9 +36,9 @@ tracing-subscriber = { version = "0.3.18", default-features = false, features =
3636
"fmt",
3737
"env-filter",
3838
] }
39-
wasm-pkg-common = { version = "0.7.3", path = "crates/wasm-pkg-common" }
40-
wasm-pkg-client = { version = "0.7.3", path = "crates/wasm-pkg-client" }
39+
wasm-pkg-common = { version = "0.7.4", path = "crates/wasm-pkg-common" }
40+
wasm-pkg-client = { version = "0.7.4", path = "crates/wasm-pkg-client" }
4141
wasm-metadata = "0.217"
4242
wit-component = "0.217"
4343
wit-parser = "0.217"
44-
wasm-pkg-core = { version = "0.7.3", path = "crates/wasm-pkg-core" }
44+
wasm-pkg-core = { version = "0.7.4", path = "crates/wasm-pkg-core" }

crates/wasm-pkg-core/src/resolver.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,9 @@ impl<'a> DependencyResolver<'a> {
407407
_ => None,
408408
};
409409

410-
if !force_override && self.resolutions.contains_key(name) {
410+
if !force_override
411+
&& (self.resolutions.contains_key(name) || self.dependencies.contains_key(name))
412+
{
411413
tracing::debug!(%name, "dependency already exists and override is not set, ignoring");
412414
return Ok(());
413415
}
@@ -545,6 +547,7 @@ async fn load_package<'b>(
545547
}
546548
}
547549

550+
#[derive(Debug)]
548551
struct RegistryDependency {
549552
/// The canonical package name of the registry package. In most cases, this is the same as the
550553
/// name but could be different if the given package name has been remapped

0 commit comments

Comments
 (0)