From 9a2cee2532e5d28d5cea5726f35ab3c7046e7c0d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 19 Jul 2026 19:41:15 +0900 Subject: fix(root-package-loader): un-ignore 4 tests by fixing stability-flag isset() port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit extract_stability_flags ported PHP's `isset($stabilityFlags[$name]) && $stabilityFlags[$name] > $stability` as `unwrap_or(i64::MAX) > stability`, so the check always short-circuited to "already more unstable" and no flag (e.g. from an explicit `*@dev` requirement) was ever recorded. Fixed using Option::is_some_and, a direct translation of PHP's isset() && ... check. Also fixes tests/common/test_case.rs's shared installation_manager() helper, which built a real InstallationManager::new instead of the __new_mock constructor (mirroring PHP's FactoryMock::createInstallationManager()), so it always had zero installers registered and wrote install-path: null into fixture installed.json files. Un-ignores test_reinstall_command, test_locally_modified_packages_from_source/ _from_dist, and test_package_still_present_error_when_no_install_flag_used — the first three were already passing (their #[ignore] reasons were stale), the last is fixed by the test_case.rs change above. Updates the #[ignore] reasons on installer_test.rs's three fixture-driven integration tests to reflect their current state: the install pipeline now runs end-to-end, but the ~189-fixture installer/ set still hits several independent, unrelated bugs/gaps that need case-by-case triage rather than a single fix. Co-Authored-By: Claude Sonnet 5 --- crates/shirabe/tests/installer_test.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/shirabe/tests/installer_test.rs') diff --git a/crates/shirabe/tests/installer_test.rs b/crates/shirabe/tests/installer_test.rs index c9e0cf63..6c2ef63c 100644 --- a/crates/shirabe/tests/installer_test.rs +++ b/crates/shirabe/tests/installer_test.rs @@ -1225,7 +1225,7 @@ fn php_mixed_map_to_json(map: &IndexMap) -> serde_json::Value } #[test] -#[ignore = "ported; exercises the full install pipeline which is not yet executable end-to-end (execute_batch / repository / autoload stubs), so cases are expected to fail at runtime"] +#[ignore = "ported; loops over every installer-slow/ fixture and panics at the first mismatch. The install pipeline itself now runs end-to-end (execute_batch/InstallationManager are implemented), but individual fixtures still hit independent, unrelated bugs/gaps (solver stability-flag handling, funding-notice output, lock-file exit codes, at least one todo!() in shirabe-php-shim's runtime), so the full fixture set doesn't pass yet. Needs case-by-case triage rather than one fix"] fn test_slow_integration() { let _tear_down = TearDown; for case in load_integration_tests("installer-slow/") { @@ -1237,7 +1237,7 @@ fn test_slow_integration() { } #[test] -#[ignore = "ported; exercises the full install pipeline which is not yet executable end-to-end (execute_batch / repository / autoload stubs), so cases are expected to fail at runtime"] +#[ignore = "ported; loops over every installer/ fixture (189+) and panics at the first mismatch. The install pipeline itself now runs end-to-end (execute_batch/InstallationManager are implemented), but individual fixtures still hit independent, unrelated bugs/gaps (solver stability-flag handling, funding-notice output, lock-file exit codes, at least one todo!() in shirabe-php-shim's runtime), so the full fixture set doesn't pass yet. Needs case-by-case triage rather than one fix"] fn test_integration_with_pool_optimizer() { let _tear_down = TearDown; for case in load_integration_tests("installer/") { @@ -1253,7 +1253,7 @@ fn test_integration_with_pool_optimizer() { } #[test] -#[ignore = "ported; exercises the full install pipeline which is not yet executable end-to-end (execute_batch / repository / autoload stubs), so cases are expected to fail at runtime"] +#[ignore = "ported; loops over every installer/ fixture (189+) and panics at the first mismatch. The install pipeline itself now runs end-to-end (execute_batch/InstallationManager are implemented), but individual fixtures still hit independent, unrelated bugs/gaps (solver stability-flag handling, funding-notice output, lock-file exit codes, at least one todo!() in shirabe-php-shim's runtime), so the full fixture set doesn't pass yet. Needs case-by-case triage rather than one fix"] fn test_integration_with_raw_pool() { let _tear_down = TearDown; for case in load_integration_tests("installer/") { -- cgit v1.3.1