[Hackage] #649: better warning messages for why dependencies are missing / cannot be selected

Hackage trac at galois.com
Fri Mar 26 18:42:48 EDT 2010

#649: better warning messages for why dependencies are missing / cannot be
  Reporter:  duncan              |        Owner:      
      Type:  enhancement         |       Status:  new 
  Priority:  normal              |    Milestone:      
 Component:  cabal-install tool  |      Version:  HEAD
  Severity:  normal              |     Keywords:      
Difficulty:  unknown             |   Ghcversion:      
  Platform:                      |  
 The cabal-install constraint solver should be given all packages but if
 some are unsable (e.g. due to broken dependencies) then it should be given
 constraints to avoid them. That way when it finds it needed the broken
 package it can give a suitable error message.

 Consider the following (real) confusing scenario:

  * usual core global packages
  * mtl as user package
  * gtk etc in a local package db

 `ghc-pkg list --global -f local gtk` reports that gtk is installed and
 deps are ok.

 `cabal install --global --package-db=local hsclock` reports
 cabal: cannot configure hsclock-1.0. It requires cairo -any and gtk -any
 There is no available version of cairo that satisfies -any
 There is no available version of gtk that satisfies -any

 How can this be? It is because when we use --global and --package-db then
 we are excluding the user package db. But gtk depends on mtl from the user
 package db. Hence Cabal detects gtk as broken. We did not notice because
 `ghc-pkg --global` still includes the `--user` package db. If we use `ghc-
 pkg --global --no-user-package-conf -f local list` then indeed gtk etc are
 reported as broken.

 The point is, cabal should tell us not that gtk isn't installed, but that
 it was excluded because it is broken, missing dependencies.

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

More information about the cabal-devel mailing list