From 65993be1b2ecdc590f566b2bcfea803d0d08b5e6 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 3 May 2026 23:44:47 +0900 Subject: fix(resolver): cap inline package loads by root require constraint Mirror Composer's PoolBuilder::markPackageNameForLoading: when the root requires a name with a version constraint, loads of that name (seed and transitive) are filtered down to candidates whose own version (or any emitted branch-alias version) satisfies the constraint. Without this, the actual package at a non-matching version slips into the pool alongside a provider satisfying the root require, masking what should be a conflict (provider-gets-picked-together-with-other-version-of- provided-conflict.test). Also restore the Composer v1 compat path in inline_package: when the JSON sets version_normalized to the legacy 9999999-dev sentinel, re-normalize from the human-readable version field so a root require for `dev-master` matches the loaded package. 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') diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index d22f2a0..00964d7 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -338,10 +338,7 @@ installer_fixture!(provider_conflicts2); installer_fixture!(provider_conflicts3); 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, - ignore -); +installer_fixture!(provider_gets_picked_together_with_other_version_of_provided_conflict); installer_fixture!(provider_gets_picked_together_with_other_version_of_provided_indirect); installer_fixture!(provider_packages_can_be_installed_if_selected); installer_fixture!(provider_packages_can_be_installed_together_with_provided_if_both_installable); -- cgit v1.3.1