[Hackage] #782: When building a plan, use installed package dependencies in preference to those from Hackage

Hackage cvs-ghc at haskell.org
Wed Dec 22 10:22:06 CET 2010


#782: When building a plan, use installed package dependencies in preference to
those from Hackage
---------------------------------+------------------------------------------
  Reporter:  batterseapower      |        Owner:      
      Type:  enhancement         |       Status:  new 
  Priority:  normal              |    Milestone:      
 Component:  cabal-install tool  |      Version:  HEAD
  Severity:  normal              |     Keywords:      
Difficulty:  unknown             |   Ghcversion:      
  Platform:                      |  
---------------------------------+------------------------------------------
 I was installing a package, let us call it foo.

 This package depended on a package foo', which in turn depended on bar,
 which in turn depended on baz < 0.3, but baz 0.3 was the default that came
 with the newer version of GHC I had just installed.

 Thus, I cabal-unpacked bar and bumped the baz dependency to < 0.4,
 **without changing the baz version number** since this was just a private
 change. This built and installed just fine with the new baz.

 I then went back to cabal install foo. I expected that cabal-install would
 just install foo' and then foo in that order. Instead, it tried to install
 baz 0.2, then bar, then foo', then foo.

 This seems stupid because I already had a perfectly acceptable bar
 installed. Why didn't Cabal just reuse that? It seems as if it is
 resolving dependencies by looking at the dependency information for bar
 **from the Hackage database** rather than the dependencies **from the
 installed bar**.

 The workaround is to go back to the unpacked bar and bump the version
 number, then reinstall it. Now when you install foo the installed baz is
 used as expected.

 It would be cool if this worked as expected without bumping the version
 number, because having to bump the version number even if not making a
 Hackage release is tiresome.

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



More information about the cabal-devel mailing list