-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(solver)!: Solve for optional solvables in addition to the root solvable #54
feat(solver)!: Solve for optional solvables in addition to the root solvable #54
Conversation
fabe12e
to
5f2e596
Compare
42beae0
to
adc770e
Compare
Sorry, Im a bit busy with other things atm! Will get back to this PR as soon as I can. |
adc770e
to
97f69da
Compare
9d8d069
to
e46328a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging your other PR has yielded a number of conflicts here. Would you be able to resolve those? Ill merge right after! 👍
The requirement of ensuring that no decisions are made for any candidate before the clauses for a package are added is unnecessary, since we now perform propagation every time after adding any new clauses.
I'll do this in the next few hours, so it should be ready for you to merge tomorrow. Thanks for your help! |
9de74c9
to
f3f886d
Compare
Rebased onto |
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.