Skip to content

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

Closed
@vasiliyl

Description

@vasiliyl

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions