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

Allow DownloadInfo be a file #2224

Closed
cblp opened this issue Jun 1, 2016 · 8 comments
Closed

Allow DownloadInfo be a file #2224

cblp opened this issue Jun 1, 2016 · 8 comments

Comments

@cblp
Copy link
Contributor

cblp commented Jun 1, 2016

I'm trying to make fully offline environment for building a stack project.

I've managed to substitute all parts of stack, except GHC download source. It would be nice if it may be a local file instead of HTTP URL.

Bad solution: run a local web server.

Ugly solution: setup stack in /opt/stack, copy all bazillion files on other machine at /opt/stack, and use it as STACK_ROOT.

Good solution: copy ghc.tar.xz and give it to stack with stack-setup.yaml.

@mgsloan
Copy link
Contributor

mgsloan commented Jun 1, 2016

I've managed to substitute all parts of stack, except GHC download source.

What's that look like? Ideally we'd have this in stack itself. I would love to have a better offline mode: #1594

Good solution: copy ghc.tar.xz and give it to stack with stack-setup.yaml.

Definitely feasible. It should be a straightforward change here which skips doing the download and instead provides the file directly to the install step.

PRs appreciated! :D

@mgsloan mgsloan added this to the P2: Should milestone Jun 1, 2016
@cblp
Copy link
Contributor Author

cblp commented Jun 1, 2016

If I understand right, #1594 is about not building in case if connectivity is needed. My goal is to do build even if there will be no connectivity.

What's that look like?

It will be in https://github.com/cblp/stack-offline soon.

@mgsloan
Copy link
Contributor

mgsloan commented Jun 1, 2016

The goal of #1594 is to have a flag to skip attempts at internet access. It is true that most of the time when stack tries to download things, it needs to. In the event that we add some stuff to check for a more recent stack version, then the offline flag will be more relevant.

We do want to have full support for offline use. Stack does not rely on internet availability, but it is required in many workflows. That's not due to any intentional decision to have it that way, I just haven't been on a long airplane trip recently ;)

Would you be keen on merging this with stack, or deprecating it once stack has direct support? That way more people will benefit rather than needing to know about stack-offline.

@cblp
Copy link
Contributor Author

cblp commented Jun 2, 2016

My first milestone is a stand-alone utility, and the second milestone is to integrate it to the stack.

@mgsloan
Copy link
Contributor

mgsloan commented Jun 2, 2016

Awesome, sounds good! Thanks for working on this!

@cblp
Copy link
Contributor Author

cblp commented Jun 3, 2016

#2232

@Blaisorblade
Copy link
Collaborator

Should this be closed now that #2232 is merged, or do we still have sth. to track?

@mgsloan
Copy link
Contributor

mgsloan commented Aug 10, 2016

I think it's done!

@mgsloan mgsloan closed this as completed Aug 10, 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