[Hackage] #405: cabal-install finds non-existent conflict due
to picking base 3
Hackage
trac at galois.com
Thu Nov 13 09:08:36 EST 2008
#405: cabal-install finds non-existent conflict due to picking base 3
---------------------------------+------------------------------------------
Reporter: dreixel | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: cabal-install tool | Version: 1.6.0.1
Severity: normal | Resolution:
Keywords: | Difficulty: hard (< 1 day)
Ghcversion: 6.10.1 | Platform:
---------------------------------+------------------------------------------
Changes (by duncan):
* difficulty: normal => hard (< 1 day)
* version: HEAD => 1.6.0.1
Comment:
The problem here is the subtleties of the constraint solver and the
modifications we made to enable it to work in the presence of base 3 and
4.
The solver is specifically designed to avoid picking two versions of any
package. However the presence of base 3 and 4 messes all that up. The hack
was to pretend to some degree that base 3 and 4 are really the same thing.
So whenever we select one, we select the other. They get included or
excluded from a solution as a pair. Then in a pass at the end we work out
for each individual package if its dependency on base should be on base 3
or on 4. At that stage we obviously use any constraints that package
specifies like `base >= 4`.
Normally this works, but in this case adding base 3 into the solution
causes a conflict that would not be there if we avoided adding base 3. In
particular base 3 pulls in the older version of syb.
It's not clear to me if it's possible to salvage the constraint solver in
its current form. We may need to move directly to a proper solver based on
SAT or more general constraint programming.
Note: for people who wonder if this problem is really that hard; yes it
is, it's NP-complete. Fortunately most instances of the problem are 'easy'
though some instances (like installing all of hackage) are rather large.
--
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/405#comment:2>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects
More information about the cabal-devel
mailing list