Skip to content
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

Add an option to specify build plan download address. #1794

Closed
TerrorJack opened this issue Feb 15, 2016 · 7 comments
Closed

Add an option to specify build plan download address. #1794

TerrorJack opened this issue Feb 15, 2016 · 7 comments

Comments

@TerrorJack
Copy link

Currently, stack downloads stackage build plans from s3.amazonaws.com. Unfortunately, in many areas in China, this domain is blocked due to the Great Firewall (national network censoring system).

So I'm proposing that stack add an option to specify build plan download address. This allows us to set up a stackage mirror along existing hackage mirrors in China, and Chinese Haskellers won't have to endure Internet connection issues in their workflow. Thank you!

@mgsloan
Copy link
Contributor

mgsloan commented Feb 18, 2016

Yeah, this would be good. Looks like the following URLs contain amazonaws.com:

2016-02-17-200800_983x54_scrot

So I suppose the solution here would be to allow configuration of something other than https://s3.amazonaws.com. Something like metadata-mirror: ... in yaml configuration.

Is github also affected? We also download things from github.

@TerrorJack
Copy link
Author

Yes, github is also affected.

@mgsloan
Copy link
Contributor

mgsloan commented Feb 20, 2016

I see. I suppose we could have something like:

stack-urls:
    snapshots: https://s3.amazonaws.com/haddock.stackage.org/snapshots.json
    index: https://s3.amazonaws.com/hackage.fpcomplete.com/00-index.tar.gz"
    # etc

Alternatively, we could make it so that you can download some set of files and use those locally (see also #1594 ).

@igrep
Copy link
Contributor

igrep commented Mar 24, 2016

I wonder whether package-indices and latest-snapshot-url is not for you...?

I'm also very interested in this topic.

@TerrorJack
Copy link
Author

@igrep package-indices affects Hackage indices/packages only; latest-snapshot-url won't do much good, since it's only used when stack needs to find a latest LTS/nightly, and does not affect how stack fetches a build plan.

@igrep
Copy link
Contributor

igrep commented Mar 27, 2016

To make it clear, it is rawGithubUrl that you want to make configurable, right?

As long as I checked, it's actually used to download build plans
and any other URLs stack uses seem to be configurable via package-indices, latest-snapshot-url, and --stack-setup-yaml.

@TerrorJack
Copy link
Author

@igrep Right.

igrep added a commit to igrep/stack that referenced this issue Apr 10, 2016
igrep added a commit to igrep/stack that referenced this issue Apr 11, 2016
igrep added a commit to igrep/stack that referenced this issue Apr 12, 2016
mgsloan added a commit that referenced this issue Apr 22, 2016
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

3 participants