Solver: Represent an unknown package with a failure node.
Previously, the solver represented an unknown package with an empty PChoice node, because an unknown package is like a package with no versions. Now that --reject-unconstrained-dependencies also needs to reject whole packages, it is simpler to handle both types of failures similarly, and use a failure node for both. Another advantage of using a failure node now is that the node can store more information about why the package was rejected. The explicit node also simplifies generating the solver log. This commit treats a failure node under a goal choice as a backjump in D.S.Modular.Explore.exploreLog, which fixes #5502.
Showing
- cabal-install/Distribution/Solver/Modular/Builder.hs 2 additions, 6 deletionscabal-install/Distribution/Solver/Modular/Builder.hs
- cabal-install/Distribution/Solver/Modular/Explore.hs 17 additions, 7 deletionscabal-install/Distribution/Solver/Modular/Explore.hs
- cabal-install/Distribution/Solver/Modular/Message.hs 2 additions, 1 deletioncabal-install/Distribution/Solver/Modular/Message.hs
- cabal-install/Distribution/Solver/Modular/Tree.hs 1 addition, 0 deletionscabal-install/Distribution/Solver/Modular/Tree.hs
Loading
Please register or sign in to comment