From b922f2c7c98496564745435db5cf8d0608a52820 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 3 May 2026 23:56:14 +0900 Subject: fix(resolver): extract aliases from complex root-require constraints Mirror Composer's RootPackageLoader::extractAliases regex so root requires like `1.*||dev-feature-foo as 1.0.2||^2` and `dev-feature-foo, dev-feature-foo as 1.0.2` get every ` as ` clause stripped in place and recorded as a separate root alias entry. The previous single-atom strip left the alias inline, where the parser then took the RIGHT side per atom and never matched the actual dev-branch package. Also fix split_and so a comma-separated AND group like `dev-foo, dev-bar` splits into two atoms. The space-only operator-glue heuristic was collapsing it into a single atom because neither half starts with an operator or digit. Splitting on commas first preserves the unambiguous separator while keeping `>= 1.0.0` glued within each comma-part. Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/mozart/tests/installer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/mozart') diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index 00964d7..728b820 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -244,7 +244,7 @@ macro_rules! installer_fixture { } installer_fixture!(abandoned_listed); -installer_fixture!(alias_in_complex_constraints, ignore); +installer_fixture!(alias_in_complex_constraints); installer_fixture!(alias_in_lock); installer_fixture!(alias_in_lock2); installer_fixture!(alias_on_unloadable_package); -- cgit v1.3.1