From 577bd35f97fd46ad5f296980c86f5fcc51413f5c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 3 May 2026 21:23:37 +0900 Subject: fix(update): mirror Composer's always-include-dev resolution path Composer's `Installer::doUpdate` hardcodes `includeDevRequires=true` for the first solve, so a `--no-dev` update still considers require-dev during resolution and writes a complete lock file (the flag only gates what gets installed). Mozart was passing `include_dev: dev_mode`, dropping require-dev from both the resolver pool and the lock when `--no-dev` was set, which broke fixtures where a non-dev requirement was satisfied by a package pulled in transitively through require-dev (e.g. `provided/pkg` provided by a require-dev metapackage). Also extend `classify_dev_packages` to walk `provide`/`replace` edges so the production BFS reaches packages that satisfy a `require` virtually, matching what Composer's `extractDevPackages` second-Solver run achieves through a real solve. --- crates/mozart/tests/installer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/mozart/tests') diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index 06c7581..fd8ab73 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -311,7 +311,7 @@ installer_fixture!(provider_can_coexist_with_other_version_of_provided); installer_fixture!(provider_conflicts); installer_fixture!(provider_conflicts2); installer_fixture!(provider_conflicts3); -installer_fixture!(provider_dev_require_can_satisfy_require, ignore); +installer_fixture!(provider_dev_require_can_satisfy_require); installer_fixture!(provider_gets_picked_together_with_other_version_of_provided); installer_fixture!( provider_gets_picked_together_with_other_version_of_provided_conflict, -- cgit v1.3.1