From f0192390ae1d89981f59395307e885a595f86eef Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 9 May 2026 02:29:35 +0900 Subject: refactor(update): Slice A — align update.rs with Composer's UpdateCommand pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename ChangeKind::Remove → Uninstall, drop Unchanged variant (propagate to remove.rs / require.rs); mirrors Composer's UninstallOperation naming - Fix magic-keyword mirrors detection: use Composer's count-diff semantic (any keyword triggers mirrors mode) instead of all-are-magic; mutex check now fires correctly for mixed lists like `update foo lock` - Add --patch-only pre-solve lock-presence check (previously missing; Composer throws InvalidArgumentException when no lock exists) - Add --patch-only pre-solve constraint injection: inject >=M.N.P.0, tags - Update --no-suggest deprecation wording to match Composer 3 message Co-Authored-By: Claude Sonnet 4.6 --- crates/mozart/src/commands/require.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/mozart/src/commands/require.rs') diff --git a/crates/mozart/src/commands/require.rs b/crates/mozart/src/commands/require.rs index 39b055f..22f7a8d 100644 --- a/crates/mozart/src/commands/require.rs +++ b/crates/mozart/src/commands/require.rs @@ -464,7 +464,7 @@ async fn do_update( .collect(); let removals: Vec<_> = changes .iter() - .filter(|c| matches!(c.kind, super::update::ChangeKind::Remove { .. })) + .filter(|c| matches!(c.kind, super::update::ChangeKind::Uninstall { .. })) .collect(); console.info(&format!( @@ -479,7 +479,7 @@ async fn do_update( for change in &changes { match &change.kind { - super::update::ChangeKind::Remove { old_version } => { + super::update::ChangeKind::Uninstall { old_version } => { if args.dry_run { console.info(&format!(" - Would remove {} ({old_version})", change.name)); } else { @@ -512,7 +512,6 @@ async fn do_update( )); } } - super::update::ChangeKind::Unchanged => {} } } -- cgit v1.3.1