[Hackage] #697: Add "cabal install --only-dependencies" flag (was: Add "cabal build-dep" command)

Hackage cvs-ghc at haskell.org
Tue Jun 1 16:07:29 EDT 2010

#697: Add "cabal install --only-dependencies" flag
  Reporter:  igloo               |        Owner:      
      Type:  enhancement         |       Status:  new 
  Priority:  normal              |    Milestone:      
 Component:  cabal-install tool  |      Version:  HEAD
  Severity:  major               |     Keywords:      
Difficulty:  unknown             |   Ghcversion:      
  Platform:                      |  

Comment(by duncan):

 It should not be too hard to add a flag to cabal install that builds just
 the dependencies of the given packages. I was thinking about it the other

 It ought to be relatively straightforward. It would involve modifying the
 install plan before running it. The only question is what behavior we want
 when one target depends directly or indirectly on another.

 The use case is presumably to install all dependencies so that local
 versions can be configured and built. Here are two scenarios:

 packageA -> packageB -> packageC

 cabal install --only-dependencies packageA packageB

 cabal install --only-dependencies packageA packageC

 In the first scenario it is clear that we should just install `packageC`.
 The user can then configure and install the other two. However in the
 second case we have an intermediate dependency `packageB`. We would
 normally want to install this, but that would require that we also install
 `packageC` which is one of the ones we do not want to install, since the
 user wants to do that themselves.

 So one option is to fail in this case, the other is to install `packageB`
 and `packageC`.

 Is it obvious which we should do? Do people need both behaviours in
 different circumstances?

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

More information about the cabal-devel mailing list