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

Hackage cvs-ghc at haskell.org
Mon Apr 9 16:39:28 CEST 2012


#649: better warning messages for why dependencies are missing / cannot be
selected
---------------------------------+------------------------------------------
  Reporter:  duncan              |        Owner:  kosmikus          
      Type:  enhancement         |       Status:  closed            
  Priority:  normal              |    Milestone:  cabal-install-0.14
 Component:  cabal-install tool  |      Version:  HEAD              
  Severity:  normal              |   Resolution:  fixed             
  Keywords:  solver              |   Difficulty:  unknown           
Ghcversion:                      |     Platform:                    
---------------------------------+------------------------------------------
Changes (by kosmikus):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Here's the error message the modular solver reports in a similar
 situation. I added a number of flags to prevent other solutions from being
 found:
 {{{
 $ cabal install --global --package-db=local aeson-0.6.0.2 --constraint
 ="unordered-containers installed" --dry-run
 cabal: Could not resolve dependencies:
 trying: aeson-0.6.0.2 (user goal)
 next goal: unordered-containers (dependency of aeson-0.6.0.2)
 rejecting: unordered-containers-0.2.1.0/installed-171... (package is
 broken)
 rejecting: unordered-containers-0.2.1.0, 0.2.0.1, 0.2.0.0, 0.1.4.6,
 0.1.4.5,
 0.1.4.4, 0.1.4.3, 0.1.4.2, 0.1.4.1, 0.1.4.0, 0.1.3.0, 0.1.2.0, 0.1.1.0,
 0.1.0.0 (global constraint requires installed instance)
 }}}
 The `unordered-containers-0.2.1.0` version is installed in the local
 package DB, but depends on `hashable` which is installed in the user DB.

 If we add the `--user` flag, it works:
 {{{
 $ cabal install --global --user --package-db=local aeson-0.6.0.2
 --constraint="unordered-containers installed" --dry-run
 Resolving dependencies...
 In order, the following would be installed (use -v for more details):
 blaze-builder-0.3.1.0
 primitive-0.4.1
 vector-0.9.1
 aeson-0.6.0.2
 }}}

 The error message for the installed constraint is implicitly shown above
 as well. Here's another example:
 {{{
 $ ~/.cabal/bin/cabal install repa-3.1.0.1 --dry-run
 Resolving dependencies...
 cabal: Could not resolve dependencies:
 trying: repa-3.1.0.1 (user goal)
 next goal: base (dependency of repa-3.1.0.1)
 rejecting: base-3.0.3.2, 3.0.3.1 (global constraint requires installed
 instance)
 rejecting: base-4.3.1.0/installed-20f... (conflict: repa => base==4.5.*)
 rejecting: base-4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2,
 4.2.0.1,
 4.2.0.0, 4.1.0.0, 4.0.0.0 (global constraint requires installed instance)
 }}}
 This still lists all versions of `base`, but lists very clearly that we
 can't use any version but 4.3.1.0 because they're not installed, and we
 can't use 4.3.1.0 because repa requires 4.5.

 Closing this bug.

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



More information about the cabal-devel mailing list