-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add GHC, Cabal, and Stack to macOS and Windows #645
Comments
I'm not sure where to put this, but currently for Haskell on Linux, there's a lot more installed than seems to be necessary. Is that something you're interested in changing at all? It seems excessive to have 11 versions of GHC when common projects will only use 1 (or 3 at most). Culturally, Haskell has a convention of supporting the last 3-4 major compiler releases, so at the time of writing that would suggest only needing GHC 8.10.1, 8.8.3, and 8.6.5. As for Cabal, having only versions 3.0.1.0 and 2.4.1.0 is sufficient (even then, Cabal 2.4.1.0 is only necessary for people who need backwards compatibility with old shell scripts). Because the revamped |
I'm 👍 on supporting just the last 3-4 major releases (there are way too many ghc's installed by default here). I'm also 👍 to add Stack as part of this. |
Any update on this? |
@jared-w , it is on the our backlog but we don't have updates or ETA for now. |
Thanks! Would a PR help speed up the process? (I'd imagine probably not because the mac builder code doesn't seem to be in the repo?); this isn't blocking any work I have either way, but I know many projects would benefit from it. |
Hello @jared-w , |
@maxim-lobanov there's actually a subtle reason for why I did things that way although it ultimately boiled down to a trade-off between code complexity and speed. tl;dr yes it installs stack every time on linux, but it doesn't have to. On Linux, stack is preinstalled, but not to a versioned directory. As such, the only reliable way of making sure the right version of stack is on the path is checking for the version of stack using something like I could've special cased the behavior for stack but it was a wall clock time difference of less than 5 seconds between installing stack and not and I was reluctant to add a complex bit of logic to a rarely used codepath. With tool-cache, i can version the downloads which avoids the issue. Cabal and ghc both were accessible on all operating systems either through a tool that supported versions (ghcup, chocolatey), or a versioned path (ubuntu), which also avoided the issue. |
@jared-w , that sounds good to me. |
https://hub.zhox.com/posts/introducing-haskell-dev/ contains relevant information. With #919 it seems that even |
The failing jobs in #919 both do seem to install To answer myself: Looks like it's isntalled manually https://github.com/actions/virtual-environments/blob/master/images/win/scripts/Installers/Install-Msys2.ps1 so chocolatey itself won't detect that it's installed. Have to check whether |
Also I should ask, how your image deployment works. May I assume that once a job in a repository (cabal in this case) gets a new version of an image all other new jobs will get the new image version as well. Or is it arbitrary?
In short, can I already change cabal CI scripts to assume that msys2 is installed? As it seems that (some) jobs run using newer image version.
…
|
@phadej , yep, we don't put MSYS2 on PATH for now because it will override some default tools and break existing customers so we just install it to the separate directory. We deploy images by rings (the whole ring at a time) and your repository is attached to one particular ring. It means that if your job got new image version, all next jobs will consume new image version too. |
@maxim-lobanov that clarifies and sounds good. Thanks for the explanations! |
I relaying a message from haskell/cabal#6829 (comment)
|
We have added GHC, Cabal, and Stack to macOS and Windows images. Changes were merged and will be delivered to all VMs in a week. |
All changes are delivered to VMs. Feel free to open the thread if you have any concerns. |
Tool information
Area for Triage: Haskell
Question, Bug, or Feature?: Feature
Virtual environments affected
Can this tool be installed during the build?
Yes. Download and install takes approximately 2-3 minutes per GHC version.
Are you willing to submit a PR?
Yes
Further information:
While building cross-platform support for actions/setup-haskell, I've gone through and figured out how to install GHC, Stack and Cabal on Linux, Windows, and macOS as uniformly as possible. It would be really nice to have the most common 3 versions of GHC available on all 3 platforms so that most CI pipelines could shave off 1-3 minutes per run.
For the PR, how would you like GHC to be installed on macOS and Windows? The most reliable way to do so on windows is through
chocolatey
, and through macOS it'sghcup
(which is how I've set it up in the action currently).I'm happy to split the Stack tool request into a separate issue if desired.
The text was updated successfully, but these errors were encountered: