Skip to content

Add http support to cabal sandbox add-source #2769

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

Closed
hvr opened this issue Aug 16, 2015 · 5 comments
Closed

Add http support to cabal sandbox add-source #2769

hvr opened this issue Aug 16, 2015 · 5 comments

Comments

@hvr
Copy link
Member

hvr commented Aug 16, 2015

This would be particularly convenient in combination with Hackage's candidate feature, as then you could e.g.

cabal sandbox add-source http://hackage.haskell.org/package/lzma-0.0.0.0/candidate/lzma-0.0.0.0.tar.gz

and then cabal could keep track of the etag to detect if the package needs to be redownloaded and rebuilt...

@23Skidoo
Copy link
Member

So you suggest that it should do a HTTP request for each remote add-source package on each cabal build?

@hvr
Copy link
Member Author

hvr commented Aug 16, 2015

Yes. This may sound weird at first, but otoh if one doesn't want that behaviour, there's the add-source --snapshot flag already available to decouple from filesystem based "upstream" locations. So it'd be only consistent with the existing UI to have http-based tested source-deps tested for freshness as well, IMO.

@23Skidoo
Copy link
Member

OK, understood. I considered implementing this for git:// URLs, but then decided that standard add-source and submodules/manual git pull work better.

@hvr
Copy link
Member Author

hvr commented Aug 17, 2015

In fact, this reminds me about adding some kind of syntax-sugar to cabal for Hackage candidates. Specifically something like a candidate:-prefix that would expand to a http URL, then one could conveniently say:

cabal install candidate:lzma-0.0.0.0

or

cabal sandbox add-source candidate:lzma-0.0.0.0

etc... I think this would increase the value of the package candidate feature. As right I don't think many users are aware of the package candidate feature, nor that it can be used as a staging area for packages quite easily.

/cc @dcoutts

@phadej
Copy link
Collaborator

phadej commented Aug 31, 2020

sandbox functionality is removed.

@phadej phadej closed this as completed Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants