Ticket #423 (new enhancement)

Opened 4 years ago

Last modified 15 months ago

add option to fetch a single package without dependencies

Reported by: guest Owned by:
Priority: low Milestone: cabal-install-0.16
Component: cabal-install tool Version: HEAD
Severity: minor Keywords:
Cc: Difficulty: easy (<4 hours)
GHC Version: 6.10.1 Platform:

Description

Right now, cabal fetch fetches all missing dependencies of a package along with its source.

In some cases, in particular when studying code, those dependencies are not useful. It would be nice to have an option, say --no-deps to fetch just the specified packages.

(This is related to cabal unpack -- see #390.)

Change History

Changed 4 years ago by guest

  • ghcversion changed from 6.8.3 to 6.10.1
  • version changed from 1.2.3.0 to HEAD
  • component changed from Cabal library to cabal-install tool
  • severity changed from normal to minor

Hmm, what about packages whose dependencies are not satisfiable?

Changed 4 years ago by duncan

I think we do not need this feature. I think there are basically two use cases:

  • fetch a package so that we can install it later when offline
  • fetch a package so that we can study it, change it, etc

The first case requires dependencies. The second one does not.

The first use case is handled by cabal fetch. The second one should be handled by cabal unpack (see #390) or cabal fetch -o ./ (see #453).

That said, perhaps one way to organise this is with two modes, one that gets deps and one that does not. Then we have the default for the first use case use deps and for the second not do. But reversing the default could be done with a command line arg. I expect it's not necessary though.

Changed 3 years ago by duncan

  • difficulty changed from normal to easy (<4 hours)

Ticket #612 is a duplicate of this.

Would not be too hard for someone to add a helpful message (see #612), and to add the -o parameter.

Changed 3 years ago by duncan

Fri May 28 01:35:08 BST 2010  Duncan Coutts <duncan@haskell.org>
  * Add cabal fetch --no-deps and --dry-run flags
  Allows fetching one or more packages but without fetching their
  dependencies and thus not requiring that a consistent install plan
  can be found. On the other hand --no-deps means that there is no
  guarantee that the fetched packages can actually be installed.

Leaving this open for the moment since it would be nice to add a message to tell people when normal cabal fetch fails that they can avoid the deps, or use cabal unpack etc.

Changed 15 months ago by kosmikus

  • priority changed from normal to low
  • milestone set to cabal-install-0.16
Note: See TracTickets for help on using tickets.