From 031b7e0bdf6fc021dbc16fd86d403bda42c90e7b Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 3 May 2026 19:34:31 +0900 Subject: 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. --- crates/mozart-registry/src/resolver.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/mozart-registry/src') 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 { +pub fn normalize_branch_alias_target(alias_target: &str) -> Option { let trimmed = alias_target.trim(); let lower = trimmed.to_lowercase(); let base = lower.strip_suffix("-dev")?; -- cgit v1.3.1