Skip to content

Offer install flag: do not download dependencies #2566

Closed

Description

@snoyberg

There are times where we would like to prevent cabal-install from downloading dependencies, such as when bandwidth is limited or when using an external tool to download tarballs. It would be good to have a flag to the install command (strawman: --no-download) to prevent it from trying to perform downloads.

Activity

  1. 23Skidoo commented on Apr 29, 2015

    @23Skidoo
    Member

    I actually implemented this some time ago because I (thought that I) needed it for sandboxes. The sandbox issue was solved in a different way, so the offline mode patch wasn't merged. Should be easy to resurrect it.

  2. 23Skidoo commented on Apr 29, 2015

    @23Skidoo
    Member

    My patch is a bit simplistic, though: it works by rejecting install plans that contain non-local packages. This could be also implemented by modifying the solver to not consider such packages.

  3. snoyberg commented on Apr 29, 2015

    @snoyberg
    CollaboratorAuthor

    For my specific use case, failing would be acceptable, though I can certainly imagine other use cases that would have different requirements.

  4. snoyberg commented on Apr 29, 2015

    @snoyberg
    CollaboratorAuthor

    (And thanks for the quick reply!)

  5. kosmikus commented on Apr 29, 2015

    @kosmikus
    Contributor

    I would like this too.

  6. hvr commented on Apr 29, 2015

    @hvr
    Member

    Btw, I've been wanting a related feature that allows to limit the solver to only consider an explicitly specified set of additional dependencies for computing the install-plan. Right now I have to repeatedly call cabal install --dry and find out if the solver picked up any additional build-dep I didn't allow/specify, and add a respective --constraint flag, and repeat this process until a fixpoint is reached.

  7. added this to the milestone on Apr 29, 2015
  8. kosmikus commented on Apr 29, 2015

    @kosmikus
    Contributor

    @hvr Could you open a separate ticket for that request? As I see it, @snoyberg's request doesn't affect the solver at all. Your request would, but the feature should be extremely easy to add, modulo bikeshedding about the name and syntax of the flag.

  9. kosmikus commented on Apr 29, 2015

    @kosmikus
    Contributor

    Ah, sorry, I've not read the discussion in detail. Ok, a solution affecting the solver for the original change has also been discussed, even though that's not how I originally understood the request. I'm open to add solver-changing flags for this (in particular as this is only about adding additional preferences, which is very easy to do), if that's what people would prefer.

  10. added 2 commits that reference this issue on May 5, 2015
    cf5604d
    993a008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions