From 38706a6f0ceb773d473c4f5ddebf49e8e5ae46dc Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 3 May 2026 22:07:34 +0900 Subject: fix(update): apply --minimal-changes via policy preferred versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous implementation pinned every resolved package back to its locked version after the resolve, which discarded the new versions the solver had to pick when a root constraint moved off the lock (e.g. a require bumped from `1.*` to `2.*`). The lock effectively never moved, so transitive cascades from a forced root-level update were lost. Mirror Composer's `Installer::createPolicy(forUpdate=true, minimalUpdate=true)` instead: thread the lock's `name → normalized version` map through the policy as `preferred_versions`. The solver now picks the locked version as a tiebreaker when it still satisfies the active constraints, but moves freely when a constraint forces a different version. Drop the post-process hook entirely. --- crates/mozart/src/commands/create_project.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/mozart/src/commands/create_project.rs') diff --git a/crates/mozart/src/commands/create_project.rs b/crates/mozart/src/commands/create_project.rs index 89b3e4f..a7964ae 100644 --- a/crates/mozart/src/commands/create_project.rs +++ b/crates/mozart/src/commands/create_project.rs @@ -444,6 +444,7 @@ pub async fn execute( locked_packages: Vec::new(), block_abandoned: false, root_branch_alias: None, + preferred_versions: indexmap::IndexMap::new(), }; console.info("Resolving dependencies..."); -- cgit v1.3.1