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

stack setup should not fail if it couldn't download default stack-setup-yaml #2913

Closed
vasiliyl opened this issue Jan 10, 2017 · 1 comment · Fixed by #5031
Closed

stack setup should not fail if it couldn't download default stack-setup-yaml #2913

vasiliyl opened this issue Jan 10, 2017 · 1 comment · Fixed by #5031

Comments

@vasiliyl
Copy link

@vasiliyl vasiliyl commented Jan 10, 2017

Our build environment is isolated from the internet. Recently we've put into service a new
build machine with latest stack (reproduced on 05acb2c) and discovered that stack setup
build step fails with an error (part of output from stack setup -v):

...
2017-01-11 01:56:19.205442: [debug] Using standard GHC build
@(Stack/Setup.hs:612:9)
HostCannotConnect "raw.githubusercontent.com" [connect: does not exist (Network is unreachable)]

Other machines pass this build step because earlier versions of stack cached everything needed.

A small investigation showed that stack always tries to download default stack-setup.yaml
(https://github.com/commercialhaskell/stack/blob/05acb2c/src/Stack/Setup.hs#L735)
and errors if it couldnt.

I think, in case when stack-setup.yaml is unavailable, stack should
issue a warning and continue with processing setup-info from config.

some details

relevant parts of stack.yaml:

compiler: ghc-8.0.1
setup-info:
    ghc:
        linux64:
            8.0.1:
                url: "http://server.local/ghc-8.0.1.tar.xz"
                sha1: 185b114913b1b63b323203c387bf3a5e1b64ff34

stack version

$ stack --version
Version 1.3.3, Git revision 05acb2c0b6f84fe6981e88bebdcd44561aefa8bc (4474 commits) x86_64 hpack-0.15.0
@mgsloan mgsloan added this to the P3: Optional milestone Feb 1, 2017
@mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Feb 1, 2017

Ideally, it wouldn't fetch the stack-setup.yaml if it can find the needed info locally. This would be a bit tricky to implement, as it would require interminging the logic for fetching the setup-info with the logic using it.

The warning could be an ok alternative, as the setup will fail if the requisite info isn't available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants