diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-03 19:34:31 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-03 19:34:31 +0900 |
| commit | 031b7e0bdf6fc021dbc16fd86d403bda42c90e7b (patch) | |
| tree | afac8612e85ae26a0b1219fe6074d6817d4ab4b0 /crates/mozart-registry/src | |
| parent | d554b62e1b578a88b796f34e6eb82b5c452cd785 (diff) | |
| download | php-mozart-031b7e0bdf6fc021dbc16fd86d403bda42c90e7b.tar.gz php-mozart-031b7e0bdf6fc021dbc16fd86d403bda42c90e7b.tar.zst php-mozart-031b7e0bdf6fc021dbc16fd86d403bda42c90e7b.zip | |
fix(install): skip MarkAliasInstalled when alias was already present
Composer's `Transaction::calculateOperations` only emits a
MarkAliasInstalledOperation when the alias isn't already in
`presentAliasMap`. Mirror that here: walk installed.json for each
package being installed/updated, recover its prior alias set (explicit
`extra.branch-alias` entries plus the synthetic `9999999-dev` alias for
`default-branch: true` dev packages), and suppress the trace line when
the new lock's alias normalized version was already there. Avoids the
spurious "Marking ... as installed" emitted on a same-alias dev ref bump.
Diffstat (limited to 'crates/mozart-registry/src')
| -rw-r--r-- | crates/mozart-registry/src/resolver.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/mozart-registry/src/resolver.rs b/crates/mozart-registry/src/resolver.rs index 0716246..f7feddd 100644 --- a/crates/mozart-registry/src/resolver.rs +++ b/crates/mozart-registry/src/resolver.rs @@ -208,7 +208,7 @@ fn has_numeric_alias_prefix(branch: &str) -> bool { /// This is the form Composer's `Locker::lockPackages` writes into the /// `aliases` block of `composer.lock` and the form `Pool` indexes for /// constraint matching, so Mozart needs to use it too. -pub(crate) fn normalize_branch_alias_target(alias_target: &str) -> Option<String> { +pub fn normalize_branch_alias_target(alias_target: &str) -> Option<String> { let trimmed = alias_target.trim(); let lower = trimmed.to_lowercase(); let base = lower.strip_suffix("-dev")?; |
