diff --git a/crates/wasm-pkg-client/src/oci/mod.rs b/crates/wasm-pkg-client/src/oci/mod.rs index cfca937..71ef22c 100644 --- a/crates/wasm-pkg-client/src/oci/mod.rs +++ b/crates/wasm-pkg-client/src/oci/mod.rs @@ -101,6 +101,13 @@ impl OciBackend { Ok(auth) }) .await + .map_err(|e| { + if let Error::RegistryError(anyhow_err) = e { + Error::RegistryError(anyhow_err.context(reference.repository().to_owned())) + } else { + e + } + }) .cloned() } diff --git a/crates/wasm-pkg-core/src/resolver.rs b/crates/wasm-pkg-core/src/resolver.rs index c8cfbca..6a2c7fb 100644 --- a/crates/wasm-pkg-core/src/resolver.rs +++ b/crates/wasm-pkg-core/src/resolver.rs @@ -730,6 +730,11 @@ impl DependencyResolutionMap { package, } => { source_files.extend(package.source_map.source_files().map(Path::to_path_buf)); + // handle cases for a workspace level `wkg.toml` where overrides may reference + // the package being built + if package.main.name == root.main.name { + continue; + } merged.push_group(package).with_context(|| { format!( "failed to merge dependency `{name}`",