From 74c188162886755c380a4696d8b684cb28687402 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 4 May 2026 00:49:40 +0900 Subject: fix(update): preserve locked refs and aliases on partial update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Partial update of a non-allow-listed dev package now resolves and emits the locked-repo entry verbatim, mirroring Composer's `PoolBuilder`. Three coordinated changes: - resolver: `lock_filter_allows` accepts the locked package's branch- alias normalized versions, not just the base. Without this, root constraints like `~2.1` against a `dev-master` locked package whose branch alias is `2.1.x-dev` failed with "no matching package found". - lockfile: new `lock_pinned_names` field on `LockFileGenerationRequest` routes non-allow-listed packages through `previous_lock_lookup` before `inline_lookup`, so the lock's source/dist references survive even when the inline metadata has moved to a newer commit. - update: `apply_partial_update` skips alias entries — re-pinning their pretty `version` to the base would collapse the alias label and emit a self-referential entry in the new lock's `aliases[]` block. Unblocks partial_update_forces_dev_reference_from_lock_for_non_updated_packages. Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/mozart/tests/installer.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crates/mozart/tests/installer.rs') diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index 177decf..955a1ad 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -311,10 +311,7 @@ installer_fixture!(outdated_lock_file_fails_install); installer_fixture!(outdated_lock_file_with_new_platform_reqs_fails); installer_fixture!(partial_update_always_updates_symlinked_path_repos); installer_fixture!(partial_update_downgrades_non_allow_listed_unstable); -installer_fixture!( - partial_update_forces_dev_reference_from_lock_for_non_updated_packages, - ignore -); +installer_fixture!(partial_update_forces_dev_reference_from_lock_for_non_updated_packages); installer_fixture!(partial_update_from_lock); installer_fixture!(partial_update_from_lock_with_root_alias); installer_fixture!(partial_update_installs_from_lock_even_missing, ignore); -- cgit v1.3.1