-
Notifications
You must be signed in to change notification settings - Fork 841
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
Optionally go to hackage.haskell.org instead of hackage.fpcomplete.com for source .gz files. #2509
Comments
The docs is unclear enough I had to check the sources and I'm still not sure, but we might be supporting this already. Based on https://github.com/commercialhaskell/stack/blob/master/doc/yaml_configuration.md#package-indices, can you adding to your config in
If that works, this is a documentation bug. |
Hi, Thanks for the info, but no joy yet. I've tried adding that in three places: STACK_ROOT/config.yaml In each, it seems to make no difference to behaviour, so, e.g. "stack install clock" or adding a clock dependency results in a failed trip to s3, as before. |
Can you post a complete log of |
|
Thanks! I fixed formatting using ```. |
Thanks. I could reproduce this, and it basically seems that beyond changing the setting, you'll need to remove To be safer, I'd also rename the package index by changing the snippet to:
You want this only in |
EDIT: that's not enough it seems... I'll try more carefully. |
So I think I managed. The config I needed was the following:
The problem is that the all-cabal-hashes repository already contains two resolved URLs, listing both mirrors (from Amazon and from Hackage). EDIT: the evidence I have is this log entry:
which prints the correct path (hostnames aren't included, see below). Also, sorry @philipcraig for fooling myself so often, I hope I didn't again. Technical detailsFor instance
Of the URLs, stack insists using https://s3.amazonaws.com/hackage.fpcomplete.com/package/clock-0.7.2.tar.gz. The log says |
It works! Thanks so much. I'm not quite good to go yet though -- even with this config, if I want stack to setup ghc via If I give it a ghc that I already have, it's fine. The test is, I was able to I can use However, in general use, I then get bitten by #2248. And I can't do a |
It seems yes, but I'm not sure how it exactly works (ahem, still new here). As long as that's a standard GHC bindist. Looking at Something is explained here, in "Support for custom GHC binary distributions". Maybe that helps? (Alternatively, one could |
BTW, I consider even the part of the "solution" that worked as a hack. |
Thanks. What would you consider not to be a hack? Removing the need to delete the cache file, or something else? Also note that I still have #2248 in real-world use, and that stack upgrade --git when using hackage via the above settings also doesn't work due to, er, #2248. Net result: can't yet use stack. |
Ah thanks, I've just seen that error too. I assume that would also happen if you use
That might have been a shot in the dark—I'm not yet sure of the entire logic, and not sure of which steps are needed. A problem is that, IIUC, you can't use Why? You can't use that repo because it embeds actual URLs (an example is above in https://github.com/commercialhaskell/stack/issues/2509#issuecomment-240844481)—though it contains multiple URLs for each package, both Hackage and FPComplete. And for some reason it picks the FPComplete one, apparently always. One could maybe allow picking between them at least. But that's like a denormalized database, because it hardcodes a list of two mirrors. And that makes me unhappy. Looking at the spec for that repo (https://github.com/commercialhaskell/commercialhaskell/wiki/Git-backed-Hackage-index-signing-and-distribution), It seems we'd want to restrict it to relative URLs. |
You are right on all points. |
So here's an unofficial Stack binary, for Win64, from current master (d5b8c6e), built on a MS Windows 10 VM. I suppose this is not up to code, and it's not signed, but it should avoid #2248 and get you going. You might want to do a Note: I'll take this down soon. Version output:
@sjakobi should we have nightlies instead? (I'm also happy with more common releases). |
Nightly builds might be a good way to get more beta testers who could help us test new features and detect regressions. @borsboom, your thoughts on this as stack's release manager?! |
Thanks @Blaisorblade . That worked. |
Regarding custom GHC URLs, we do have decent docs: |
So, when could we expect nightlies? @borsboom cheers. |
FTR: @snoyberg pointed out we could fallback to Hackage when Stackage downloads fail, without changes in the repos. |
Nightlies would be nice; it's a matter of putting in the effort to get them set up (and decide which platforms they should be built for). A separate issue would make sense. |
I am going to close this given (a) the passage of time and (b) the fact that 'fpcomplete' does not appear in Stack's or Pantry's source code. |
General summary/comments (optional)
Allow stack to use hackage.haskell.org instead of hackage.fpcomplete.com for source files.
The reason is that hackage.haskell.org doesn't mirror / gateway the link into an amazon s3 link, which is banned from big company firewalls. hackage,fpcomplete.com does.
Steps to reproduce
For example:
stack install clock
Wanted
Have an option such that stack downloads clock from https://hackage.haskell.org/package/clock-0.7.2/clock-0.7.2.tar.gz
Actual
Downloads clock from https://hackage.fpcomplete.com/package/clock-0.7.2.tar.gz which turns into an s3 request from amazon, which is banned by big companies.
Stack version
The text was updated successfully, but these errors were encountered: