aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/tests/installer.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-03 12:15:02 +0900
committernsfisis <nsfisis@gmail.com>2026-05-03 12:15:02 +0900
commit7badb54195131da9c3561c351138c0ba083e38e4 (patch)
tree0498ab8c3bfcf90e01fcecf451a10ad3844514ff /crates/mozart/tests/installer.rs
parentdffb6244ebb432477b83631d68584bbc7186dd94 (diff)
downloadphp-mozart-7badb54195131da9c3561c351138c0ba083e38e4.tar.gz
php-mozart-7badb54195131da9c3561c351138c0ba083e38e4.tar.zst
php-mozart-7badb54195131da9c3561c351138c0ba083e38e4.zip
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/tests/installer.rs')
-rw-r--r--crates/mozart/tests/installer.rs4
1 files changed, 2 insertions, 2 deletions
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);