[Hackage] #220: detect inconsistent package dependencies

Hackage trac at galois.com
Sun Jan 27 13:33:35 EST 2008

#220: detect inconsistent package dependencies
  Reporter:  duncan          |        Owner:         
      Type:  enhancement     |       Status:  new    
  Priority:  normal          |    Milestone:         
 Component:  Cabal library   |      Version:
  Severity:  normal          |     Keywords:         
Difficulty:  hard (< 1 day)  |   Ghcversion:  6.8.2  
  Platform:                  |  
 Now that packages are more fine grained and upgradeable we're commonly
 getting situations where we build a package that uses two other packages
 that were built against different versions of another common package.

 The most common example in the wild at the moment is people installing
 `bytestring-` in addition to the `bytestring-` that came
 with ghc-6.8.2 and then half their packages are built against one version
 and half against the other and when they try to use packages built against
 different versions we get a type error about
 `bytestring-` not being the same as

 Cabal could and should detect this situation, and `cabal-install` should
 plan around it in its dependency resolution algorithm. However in both
 cases we require the dependency information of the existing installed

 See http://hackage.haskell.org/trac/ghc/ticket/1839

 The simplest thing is to get the full `InstalledPackageInfo` for all the
 packages in the package databases. From that we can find all the

 When we do find this situation it is not guaranteed to cause a compiler
 error, it's just rather likely. So it's not obvious if Cabal should warn
 or error. `cabal-install` could try to fix up inconsistencies but in
 general only by re-installing existing packages against different versions
 of their dependencies.

 The longer term solution is to allow installing multiple instances of the
 same versions of a package built against different versions of its
 dependencies. This is the functional Nix approach however it would
 probably also require support from ghc.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/220>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list