Closed eviltak closed 3 months ago
Sorry, Im a bit busy with other things atm! Will get back to this PR as soon as I can.
I'll do this in the next few hours, so it should be ready for you to merge tomorrow. Thanks for your help!
Rebased onto main
with all conflicts fixed.
Thank you!
Adds a new
Solver::solve_with_additional
method, that solves for the providedroot_requirements
androot_constraints
, along with a set of additional (optional) solvables. Unless the corresponding package has been requested by a version set in another solvable's clauses, each additional solvable is not subject to the package-level clauses introduced inDependencyProvider::get_candidates
since the solvables have been requested specifically (and not through a version set).This feature is useful for situations where you want to ensure that particular solvables (for example, previously installed solvables) are compatible with the solution to the root requirements and constraints.
The implementation is facilitated by making the
run_sat
method solve for arbitrary solvables at arbitrary levels, not just the root solvable. This allows the solver to solve for the additional solvables after solving for the root solvable while taking into account the clauses and decisions introduced in the solving process.Breaking changes
problem
module and its container structs toconflict
, since they are used to inspect an unsatisfiable conflictsolver::Problem
struct as an input for theSolver::solve
method to allow for flexibility in solver input argumentsExisting users will have to change the code that calls
Solver::solve
to pass in an instance of theProblem
struct rather than passing in theroot_requirements
androot_constraints
directly as arguments to the method.