-
Notifications
You must be signed in to change notification settings - Fork 842
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
Combine stack-info-yaml argument and config.yaml #2982
Comments
Note that the stack-setup-yaml file is far more convenient (passed on the command line, able to be set in stack.yaml) so would be my preference of the model to follow. |
I'd love when Stack could run totally offline. I'm following the Stack list thread and would like to see this all being made easier. So, those two files are described as:
Could we see an example of the options you need from both files without sensitive info? |
For stack-setup.yaml I take the default, delete 90%+ of it, and then rewrite For config.yaml I take https://github.com/commercialhaskell/stack/blob/master/doc/yaml_configuration.md#package-indices and https://github.com/commercialhaskell/stack/blob/master/doc/yaml_configuration.md#urls, slap them together, and do the same To make it easy, you'd really want to just set "for |
(+1) This should make it easier to configure stack to work in environments where local servers are required. |
I've set up a fully worked example at https://github.com/ndmitchell/offline-stack#readme which is tested to ensure it works. I suggest using that as a template. |
Great setup @ndmitchell |
(+1) This would really help getting stack into work environments where local mirroring of packages are required. |
“Using Stack offline” would also probably help with bad connections (#3088, just closed as duplicate), and with people behind firewalls that block S3 (I forget which is the issue, should also be merged here). |
BTW, beyhond the topic of this issue, it’d be great to support mirroring with a less cumbersome procedure if possible, or at least to integrate or link to instructions from the Stack docs. Not sure if this is the correct issue to track all that, sorry if I got this wrong (should look at all this more closely if I get time). |
@Blaisorblade, try https://github.com/AleXoundOS/haskell-stack-mirror-script |
@AleXoundOS Thank you for this, it sounds like what we need. One question -- will it also download GHC, so that when we run stack-setup on a host with no GHC it can automatically download/build it from the local server? Or is there another way to do that? |
@dpacbach, yes it mirrors all executables required for stack setup to operate. |
There are two config files that Stack uses for the global URL settings, namely config.yaml (typically in
$STACK_ROOT
) and the arguments passed tostack-setup-yaml
. The typical reason to modify either seems to be that you want to make Stack always hit a local mirror (either for caching, reproducibility, or due to network blocks). If you want to modify one, you probably want to modify the other. They are both set in different ways, sourced from different places, and have different non-overlapping subsets of information. Combining them into one would simplify lives for people who need to modify these things.The text was updated successfully, but these errors were encountered: