Ticket #411 (closed defect: fixed)

Opened 5 years ago

Last modified 17 months ago

Command to install dependencies of a package.

Reported by: mornfall Owned by:
Priority: normal Milestone: cabal-install-0.10
Component: cabal-install tool Version: 1.6.0.1
Severity: normal Keywords:
Cc: Difficulty: easy (<4 hours)
GHC Version: 6.8.3 Platform:

Description

Something like cabal install-deps or install --deps-only or such. We spoke about this with Duncan and this is the proposed solution to my use-case:

I have a project that basically consists of a simple shebang haskell script (go.hs), which happens to have somewhat obscure dependencies. I am not interested in building a binary out of this script, nor installing it: but I'd like to use cabal to track and automatically install the dependencies for it. Hence, I would provide a cabal file, whose main purpose would be for people to run "cabal install-deps", which would enable them to run ./go.hs directly...

Hopefully it is clear what I mean here... Don't hesitate to prod me if you have better suggestions, or, questions...

Attachments

darcs-deps-only.diff Download (1.6 KB) - added by mornfall 4 years ago.

Change History

Changed 4 years ago by duncan

  • milestone set to cabal-install-0.8

Changed 4 years ago by duncan

It's been pointed out that this is the natural thing to suggest to users when cabal configure fails with missing dependencies.

The alternative is to tell users to do something like:

$ cabal configure
Resolving dependencies...
Configuring foo-1.0...
setup: At least the following dependencies are missing:
bar >= 1.0
cabal: You can install these dependencies with:
  cabal install 'bar >= 1.0'

It would have to give the version constraints appropriately and in quotes to prevent bad things with the shell.

Changed 4 years ago by mornfall

Changed 4 years ago by mornfall

The attached diff shows a workaround for the problem (based on darcs.cabal, but the idea should be clear).

Changed 3 years ago by duncan

Patch for this in #697. Above suggestion is interesting too.

Changed 3 years ago by mornfall

The workaround from 11 months ago does not work with current cabal anymore. The script has gotten considerably uglier, see contrib/install-deps.sh in darcs darcs repo (darcs get  http://darcs.net). A patch to cabal-install is of course better, so we can probably close this as superseded by #697?

Changed 2 years ago by duncan

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from cabal-install-0.8 to cabal-install-0.10

This feature is now implemented in cabal-install-0.10. Use:

cabal install blah --only-dependencies

Changed 17 months ago by elga

Changed 17 months ago by edouard

Ce site met a votre disposition toutes les informations dont vous avez besoin pour la migration 100% reussie vers et depuis uns principaux operateurs de telephonie mobiun !  rio bouygues

Note: See TracTickets for help on using tickets.