aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/commands/create_project.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-04 00:49:40 +0900
committernsfisis <nsfisis@gmail.com>2026-05-04 00:49:40 +0900
commit74c188162886755c380a4696d8b684cb28687402 (patch)
tree4a33b20c6ceef51d3720f169918c077c1cb06376 /crates/mozart/src/commands/create_project.rs
parent6449a15de90fe8252fb288bd5eacb99dc2cd699a (diff)
downloadphp-mozart-74c188162886755c380a4696d8b684cb28687402.tar.gz
php-mozart-74c188162886755c380a4696d8b684cb28687402.tar.zst
php-mozart-74c188162886755c380a4696d8b684cb28687402.zip
fix(update): preserve locked refs and aliases on partial update
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/commands/create_project.rs')
-rw-r--r--crates/mozart/src/commands/create_project.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/mozart/src/commands/create_project.rs b/crates/mozart/src/commands/create_project.rs
index 61cb886..6674ccc 100644
--- a/crates/mozart/src/commands/create_project.rs
+++ b/crates/mozart/src/commands/create_project.rs
@@ -468,6 +468,7 @@ pub async fn execute(
mozart_registry::repository::RepositorySet::with_packagist(repo_cache.clone()),
),
previous_lock: None,
+ lock_pinned_names: indexmap::IndexSet::new(),
})
.await?;