diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b624a5..cc37429 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] +### Fixed +- Use updated aliases when reusing lockfile dependencies by @daimond113 + ## [0.5.0-rc.6] - 2024-10-14 ### Added - Support full version requirements in workspace version field by @daimond113 diff --git a/src/resolver.rs b/src/resolver.rs index dedae81..9d5a5ef 100644 --- a/src/resolver.rs +++ b/src/resolver.rs @@ -44,22 +44,22 @@ impl Project { continue; } - if all_specifiers - .remove(&(specifier.clone(), node.ty)) - .is_none() - { + let Some(alias) = all_specifiers.remove(&(specifier.clone(), node.ty)) else { log::debug!( "dependency {name}@{version} from old dependency graph is no longer in the manifest", ); continue; - } + }; log::debug!("resolved {}@{} from old dependency graph", name, version); insert_node( &mut graph, name.clone(), version.clone(), - node.clone(), + DependencyGraphNode { + direct: Some((alias.clone(), specifier.clone())), + ..node.clone() + }, true, );