fix(resolver): use new aliases when reusing lockfile deps

This commit is contained in:
daimond113 2024-10-15 23:52:00 +02:00
parent beaf143679
commit 87a45c0429
No known key found for this signature in database
GPG key ID: 3A8ECE51328B513C
2 changed files with 10 additions and 6 deletions

View file

@ -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/), 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). 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 ## [0.5.0-rc.6] - 2024-10-14
### Added ### Added
- Support full version requirements in workspace version field by @daimond113 - Support full version requirements in workspace version field by @daimond113

View file

@ -44,22 +44,22 @@ impl Project {
continue; continue;
} }
if all_specifiers let Some(alias) = all_specifiers.remove(&(specifier.clone(), node.ty)) else {
.remove(&(specifier.clone(), node.ty))
.is_none()
{
log::debug!( log::debug!(
"dependency {name}@{version} from old dependency graph is no longer in the manifest", "dependency {name}@{version} from old dependency graph is no longer in the manifest",
); );
continue; continue;
} };
log::debug!("resolved {}@{} from old dependency graph", name, version); log::debug!("resolved {}@{} from old dependency graph", name, version);
insert_node( insert_node(
&mut graph, &mut graph,
name.clone(), name.clone(),
version.clone(), version.clone(),
node.clone(), DependencyGraphNode {
direct: Some((alias.clone(), specifier.clone())),
..node.clone()
},
true, true,
); );