From 9a467625ff8d135c650c7fefacfa0358002ce4d2 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 3 May 2026 22:14:28 +0900 Subject: fix(update): apply --minimal-changes preferred versions on partial update The previous --minimal-changes wiring only populated the policy's preferred-version map when no packages were named on the CLI, so a partial update like `update foo --with-all-dependencies --minimal-changes` saw an empty map and the resolver picked the highest matching version for transitive deps that should have stayed at their lock version. Mirror Composer's `Installer::createPolicy(minimalUpdate=true)` directly: build the map from the lock and skip only the packages explicitly named by the user (the `updateAllowList`), so deps unlocked transitively by `--with-(all-)dependencies` still prefer their lock version when the constraint allows it. --- crates/mozart/tests/installer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/mozart/tests/installer.rs') diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index c3e1f7d..5133167 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -358,7 +358,7 @@ installer_fixture!(update_all); installer_fixture!(update_all_dry_run); installer_fixture!(update_allow_list); installer_fixture!(update_allow_list_locked_require); -installer_fixture!(update_allow_list_minimal_changes, ignore); +installer_fixture!(update_allow_list_minimal_changes); installer_fixture!(update_allow_list_patterns, ignore); installer_fixture!(update_allow_list_patterns_with_all_dependencies); installer_fixture!(update_allow_list_patterns_with_dependencies); -- cgit v1.3.1