From 489d00ca3f096f69f3b05f9564b23bb70a2475c7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 3 May 2026 11:17:02 +0900 Subject: fix(resolver): fail when a root require has no matching providers Mirror Composer's `Solver::checkForRootRequireProblems`: a root require that resolves to zero pool providers produces no SAT rule, so the solver previously succeeded with an empty plan instead of reporting the unresolvable requirement. `RuleSetGenerator::generate` now returns those misses alongside the rule set, and `resolve()` short-circuits into `ResolveError::NoSolution` so install/update exit with code 2 to match Composer. Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/mozart/tests/installer.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/mozart') diff --git a/crates/mozart/tests/installer.rs b/crates/mozart/tests/installer.rs index 7ba53a8..a13e8e6 100644 --- a/crates/mozart/tests/installer.rs +++ b/crates/mozart/tests/installer.rs @@ -219,7 +219,7 @@ installer_fixture!(abandoned_listed); installer_fixture!(alias_in_complex_constraints, ignore); installer_fixture!(alias_in_lock, ignore); installer_fixture!(alias_in_lock2, ignore); -installer_fixture!(alias_on_unloadable_package, ignore); +installer_fixture!(alias_on_unloadable_package); installer_fixture!(alias_solver_problems); installer_fixture!(alias_solver_problems2); installer_fixture!(alias_with_reference, ignore); @@ -257,7 +257,7 @@ installer_fixture!(github_issues_8902); installer_fixture!(github_issues_8903, ignore); installer_fixture!(github_issues_9012, ignore); installer_fixture!(github_issues_9290, ignore); -installer_fixture!(hint_main_rename, ignore); +installer_fixture!(hint_main_rename); installer_fixture!(install_aliased_alias, ignore); installer_fixture!(install_branch_alias_composer_repo); installer_fixture!(install_dev); @@ -304,7 +304,7 @@ installer_fixture!( installer_fixture!(partial_update_with_dependencies_provide, ignore); installer_fixture!(partial_update_with_dependencies_replace, ignore); installer_fixture!(partial_update_with_deps_warns_root, ignore); -installer_fixture!(partial_update_with_symlinked_path_repos, ignore); +installer_fixture!(partial_update_with_symlinked_path_repos); installer_fixture!(partial_update_without_lock); installer_fixture!(platform_ext_solver_problems); installer_fixture!(plugins_are_installed_first); @@ -343,15 +343,15 @@ installer_fixture!( ignore ); installer_fixture!(replacer_satisfies_its_own_requirement); -installer_fixture!(repositories_priorities, ignore); +installer_fixture!(repositories_priorities); installer_fixture!(repositories_priorities2); installer_fixture!(repositories_priorities3, ignore); installer_fixture!(repositories_priorities4); -installer_fixture!(repositories_priorities5, ignore); +installer_fixture!(repositories_priorities5); installer_fixture!(root_alias_change_with_circular_dep, ignore); installer_fixture!(root_alias_gets_loaded_for_locked_pkgs); installer_fixture!(root_requirements_do_not_affect_locked_versions); -installer_fixture!(solver_problem_with_hash_in_branch, ignore); +installer_fixture!(solver_problem_with_hash_in_branch); installer_fixture!(solver_problems); installer_fixture!(solver_problems_with_disabled_platform); installer_fixture!(suggest_installed); -- cgit v1.3.1