From 2f857cc1ddfde54553829ea5b3a3ac8b59f7f63a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 1 May 2026 21:43:19 +0900 Subject: feat(install): verify platform requirements before install_from_lock Mirrors Composer's platform-requirements check during Installer::doInstall(): merge platform requires from the lock's platform/platform-dev fields with the root composer.json require/require-dev (composer.json wins on duplicate keys), then verify them against the detected runtime platform. If any are missing or unsatisfied, print the standard "Your lock file does not contain a compatible set of packages" message followed by Problem 1..N entries and exit with DEPENDENCY_RESOLUTION_FAILED (2) instead of silently proceeding to "Nothing to install" with exit 0. Closes the gap exercised by the outdated-lock-file-with-new-platform-reqs-fails 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/installer.rs') diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index af38c9e..f3eeabc 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -298,10 +298,7 @@ installer_fixture!( 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" -); +installer_fixture!(outdated_lock_file_with_new_platform_reqs_fails); installer_fixture!( partial_update_always_updates_symlinked_path_repos, ignore = "mozart binary cannot yet run this fixture" -- cgit v1.3.1