You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make https://get.haskellstack.org/ work on Travis/Windows #4535
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.
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.
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 😄
I had a look at the script, and overall looks OK, but couple of questions:
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.
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.
I don't have any idea. I'll try and get it slightly working or erroring well in those situations.
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.
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).
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).
Activity
borsboom commentedon Jan 23, 2019
Oh, interesting. We actually don't recommend using the
get.haskellstack.orgscript 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
bashenvironment.ndmitchell commentedon Jan 24, 2019
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 😄
borsboom commentedon Jan 25, 2019
I had a look at the script, and overall looks OK, but couple of questions:
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.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 DESTDIRargument.Can you make a PR with your changes?
ndmitchell commentedon Jan 26, 2019
/binand/usr/binare on$PATH. As a result, I'd have to have a different default-ddepending 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.
borsboom commentedon Jan 28, 2019
I do think supporting
-dwould be good, and it seems reasonable to have a different default-ddepending on the OS. I have no idea what the best practice is for installing binaries on the PATH on Windowsshenvironments, so I'll leave the default to your discretion (/binis fine with me).ndmitchell commentedon Feb 3, 2019
Thanks, raised a PR #4555. As a bonus, I made it work on Travis, Appveyor and Azure Pipelines.
borsboom commentedon Feb 6, 2019
#4555 merged.
ndmitchell commentedon Feb 13, 2019
Thanks! Any chance of deploying the updated script to the
https://get.haskellstack.orgnow? It means I could simplify my CI scripts. @borsboomborsboom commentedon Feb 14, 2019
I've cherry-picked the changes into the
stablebranch. It should automatically propagate to https://get.haskellstack.org soon (let me know if it doesn't).