-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offer install flag: do not download dependencies #2566
Comments
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. |
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. |
For my specific use case, failing would be acceptable, though I can certainly imagine other use cases that would have different requirements. |
(And thanks for the quick reply!) |
I would like this too. |
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 |
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. |
When in offline mode, 'cabal install' only installs packages from the local tarball cache. Offline mode can be enabled with the '--offline' flag. Fixes haskell#2566.
When in offline mode, 'cabal install' only installs packages from the local tarball cache. Offline mode can be enabled with the '--offline' flag. Fixes haskell#2566.
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 theinstall
command (strawman:--no-download
) to prevent it from trying to perform downloads.The text was updated successfully, but these errors were encountered: