[Hackage] #697: Add "cabal build-dep" command

#697: Add "cabal build-dep" command ---------------------------------+------------------------------------------ Reporter: igloo | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: HEAD Severity: major | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ The [http://hackage.haskell.org/trac/ghc/wiki/HackageTesting hackage testing tool] needs a "cabal build-dep" command to work. I had an inadequate patch that was good enough for my experiments (http://osdir.com/ml/cabal-devel@haskell.org/2010-01/msg00029.html), but lack the familiarity with the cabal-install design necessary to implement it properly. Sadly, the patch no longer applies to cabal-install HEAD, and regardless, it would make things a lot easier if it Just Worked out of the box. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/697 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#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 day. 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

#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): See also suggestion in #411. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/697#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#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 j3h): Please excuse the accidental double form submission, the two attached files are identical. The patch implements an `--only-dependencies` flag for the `install` command. My resolution for the case that Duncan described above, where a user requests dependencies only and then specifies a necessary dependency on the command line, installation fails with an error message. In addition to the options that Duncan mentioned for this case, there is a third option, which is to install only the dependencies that can be satisfied ''without'' installing any explicitly mentioned package. The behavior in this case is not very important to me, because I expect only to use this flag when actively developing a package, so the only excluded package would be the root of the dependency DAG, which can always be safely removed. It occurs to me as well that another sensible interface to this functionality (especially for development purposes) would be {{{ cabal configure --install-missing-dependencies }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/697#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#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 igloo): Thanks for working on this, j3h. I used the patch in my recent hackage regression testing. It seemed to work fine. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/697#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#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: | ---------------------------------+------------------------------------------ Changes (by basvandijk): * cc: v.dijk.bas@… (added) Comment: Just added myself to the CC list to indicate my support for this ticket and the patch by j3h. BTW note that the Gentoo Linux `emerge` command also has a similar flag: {{{ --onlydeps (-o) Only merge (or pretend to merge) the dependencies of the packages specified, not the packages themselves. }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/697#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#697: Add "cabal install --only-dependencies" flag
---------------------------------+------------------------------------------
Reporter: igloo | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone: cabal-install-0.10
Component: cabal-install tool | Version: HEAD
Severity: major | Resolution: fixed
Keywords: | Difficulty: unknown
Ghcversion: | Platform:
---------------------------------+------------------------------------------
Changes (by duncan):
* status: new => closed
* resolution: => fixed
* milestone: => cabal-install-0.10
Comment:
Applied.
{{{
Wed Jun 30 22:37:36 BST 2010 josh.hoyt@galois.com
* Add an --only-dependencies flag to "install" (see ticket #697)
Sun Feb 13 17:19:56 GMT 2011 Duncan Coutts

#697: Add "cabal install --only-dependencies" flag ---------------------------------+------------------------------------------ Reporter: igloo | Owner: Type: enhancement | Status: closed Priority: normal | Milestone: cabal-install-0.10 Component: cabal-install tool | Version: HEAD Severity: major | Resolution: fixed Keywords: | Difficulty: unknown Ghcversion: | Platform: ---------------------------------+------------------------------------------ Comment(by elga): * [http://www.releve-identite-operateur.fr/rio-bouygues.html rio bouygues] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/697#comment:7 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage