Skip to content

Commit

Permalink
Fix feasibility check not considering pins
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Aug 13, 2024
1 parent 16b2172 commit a27a0dc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/alire/alire-solver.adb
Original file line number Diff line number Diff line change
Expand Up @@ -900,13 +900,19 @@ package body Alire.Solver is
function Feasible return Boolean is
begin
return not
-- Unfeasibility check
-- Unfeasibility check: some remaining dependency, which is not
-- solved via pin, is already incompatible with a release in the
-- solution. TODO: some pin, known since the very beginning, may
-- provide crates which evade this check. To be implemented down
-- the road (this was missing also in the old solver).
(for some Dep of Conditional.Dependencies'
(This.Target and This.Remaining)
=>
Dep.Is_Value
and then
This.Solution.Contains_Release (Dep.Value.Crate)
not Pins.Depends_On (Dep.Value.Crate)
and then
This.Solution.Contains_Release (Dep.Value.Crate)
and then not This.Solution.State
(Dep.Value.Crate).Release.Satisfies (Dep.Value));
end Feasible;
Expand Down

0 comments on commit a27a0dc

Please sign in to comment.