From 4453aaddb071515e4b2c263864bd00fe7fa2eee6 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 1 May 2026 21:32:01 +0900 Subject: feat(install): verify lock file satisfies composer.json requires Mirrors Composer's Installer::doInstall() check: before installing from an existing composer.lock, walk every root require (and require-dev in dev mode) and confirm the lock contains a satisfying package. If any are missing or fail the constraint, print the standard bullet-list diagnostic and exit with LOCK_FILE_INVALID (4) instead of blindly attempting to install and failing later with a misleading "no dist or source information" error. Closes the gap exercised by the outdated-lock-file-fails-install installer fixture. Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/mozart/tests/installer.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crates/mozart/tests') diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index 0520108..af38c9e 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -297,10 +297,7 @@ installer_fixture!( load_replaced_package_if_replacer_dropped, ignore = "mozart binary cannot yet run this fixture" ); -installer_fixture!( - outdated_lock_file_fails_install, - ignore = "mozart binary cannot yet run this fixture" -); +installer_fixture!(outdated_lock_file_fails_install); installer_fixture!( outdated_lock_file_with_new_platform_reqs_fails, ignore = "mozart binary cannot yet run this fixture" -- cgit v1.3.1