Skip to content

Make https://get.haskellstack.org/ work on Travis/Windows #4535

Closed

Description

@ndmitchell

Using Travis, you can write a .travis.yml which targets Windows. That has enough to run curl and sh. However, the script at get.ehaskellstack.org doesn't have branches for Windows. I think if they were added it should work.

Activity

  1. borsboom commented on Jan 23, 2019

    @borsboom
    Contributor

    Oh, interesting. We actually don't recommend using the get.haskellstack.org script to install Stack on CI systems, since we make no guarantees about its stability and you may end up with a newer version of stack that breaks your build when you're not expecting it.

    But in principle, nothing against updating the script to support Windows when running in a bash environment.

  2. ndmitchell commented on Jan 24, 2019

    @ndmitchell
    ContributorAuthor

    I wrote a version that does work on Windows through Travis, https://github.com/ndmitchell/travis-check/blob/master/install-stack.sh, and a test at https://travis-ci.org/ndmitchell/travis-check/jobs/483804082#L48. Any chance of that being lifted into the main script? It's probably not going to work anywhere but on Travis - but the old one didn't work there - so it's strictly improving.

    I know you don't recommend using it on CI, and I know you recommend testing a pinned version, and recommend LTS. I disagree with all of those recommendations 😄

  3. borsboom commented on Jan 25, 2019

    @borsboom
    Contributor

    I had a look at the script, and overall looks OK, but couple of questions:

    1. Does it fail somewhat gracefully (with a useful error) if you're trying it in a Windows environment that isn't supported? E.g. what does it do if it can't find 7z.

    2. It appears to install to /bin; is that the right place in this environment? No support for e.g. /usr/local/bin? It also doesn't appear to use the -d DESTDIR argument.

    Can you make a PR with your changes?

  4. ndmitchell commented on Jan 26, 2019

    @ndmitchell
    ContributorAuthor
    1. I don't have any idea. I'll try and get it slightly working or erroring well in those situations.
    2. On Travis, only /bin and /usr/bin are on $PATH. As a result, I'd have to have a different default -d depending on which OS you were using. Or is there a nicer way around?

    Will PR against etc/scripts/get-stack.sh one we figure out what it should do around 2.

  5. borsboom commented on Jan 28, 2019

    @borsboom
    Contributor

    I do think supporting -d would be good, and it seems reasonable to have a different default -d depending on the OS. I have no idea what the best practice is for installing binaries on the PATH on Windows sh environments, so I'll leave the default to your discretion (/bin is fine with me).

  6. ndmitchell commented on Feb 3, 2019

    @ndmitchell
    ContributorAuthor

    Thanks, raised a PR #4555. As a bonus, I made it work on Travis, Appveyor and Azure Pipelines.

  7. borsboom commented on Feb 6, 2019

    @borsboom
    Contributor

    #4555 merged.

  8. ndmitchell commented on Feb 13, 2019

    @ndmitchell
    ContributorAuthor

    Thanks! Any chance of deploying the updated script to the https://get.haskellstack.org now? It means I could simplify my CI scripts. @borsboom

  9. borsboom commented on Feb 14, 2019

    @borsboom
    Contributor

    I've cherry-picked the changes into the stable branch. It should automatically propagate to https://get.haskellstack.org soon (let me know if it doesn't).

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions