From 7badb54195131da9c3561c351138c0ba083e38e4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 3 May 2026 12:15:02 +0900 Subject: fix(install): switch update trace to dist-ref mode when source refs match Composer's UpdateOperation::format renders the from/to versions through DISPLAY_SOURCE_REF_IF_DEV first, but if both sides come out identical it re-renders in DISPLAY_SOURCE_REF (when source refs differ) or DISPLAY_DIST_REF (when only dist refs differ) so the trace doesn't show a useless `pkg (X => X)` line. Mozart skipped the switch and emitted the default form on both halves, so a same-version-different-dist-ref update showed up as `dev-master def000 => dev-master def000` instead of `dev-master def000 => dev-master`. Add format_update_pretty_versions to render the pair Composer's way and plumb the resolved to_full_pretty through PackageOperation::Update so the trace recorder uses it verbatim. Unblocks update_installed_reference and update_picks_up_change_of_vcs_type installer fixtures. Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/mozart/tests/installer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/mozart/tests/installer.rs') diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index 93c3496..c680764 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -404,7 +404,7 @@ installer_fixture!(update_ignore_platform_package_requirement_wildcard); installer_fixture!(update_ignore_platform_package_requirements); installer_fixture!(update_installed_alias); installer_fixture!(update_installed_alias_dry_run); -installer_fixture!(update_installed_reference, ignore); +installer_fixture!(update_installed_reference); installer_fixture!(update_installed_reference_dry_run); installer_fixture!(update_mirrors_changes_url, ignore); installer_fixture!(update_mirrors_fails_with_new_req, ignore); @@ -414,7 +414,7 @@ installer_fixture!(update_package_present_in_lock_but_not_at_all_in_remote); installer_fixture!(update_package_present_in_lock_but_not_in_remote); installer_fixture!(update_package_present_in_lock_but_not_in_remote_due_to_min_stability); installer_fixture!(update_package_present_in_lower_repo_prio_but_not_main_due_to_min_stability); -installer_fixture!(update_picks_up_change_of_vcs_type, ignore); +installer_fixture!(update_picks_up_change_of_vcs_type); installer_fixture!(update_prefer_lowest_stable); installer_fixture!(update_reference); installer_fixture!(update_reference_picks_latest); -- cgit v1.3.1