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

Improve haskell ghcup #4016

Closed
wants to merge 3 commits into from
Closed

Conversation

hasufell
Copy link
Contributor

@hasufell hasufell commented Sep 3, 2021

Description

Improve ghcup handling on linux and mac, freeing up disk space. Add ghcup to windows (yes, it's supported).

This isn't tested manually (I don't know how).

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

@@ -33,3 +33,7 @@ Write-Host 'Installing cabal...'
Choco-Install -PackageName cabal

Invoke-PesterTests -TestFile 'Haskell'

# install minimal ghcup, utilizing pre-installed msys2 at C:\msys64
Set-ExecutionPolicy Bypass -Scope Process -Force;[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;Invoke-Command -ScriptBlock ([ScriptBlock]::Create((Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing))) -ArgumentList $false, $true, $true, $false, $false, $false, $false, C:\, "", C:\msys64, C:\cabal
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miketimofeev
Copy link
Contributor

Hi @hasufell!
Thanks for the proposed changes! A few questions\notes:

  • Could you please create a separate PR for each OS? It will be much easier to test them and make changes.
  • Are there any drawbacks in deleting docs and profiling libs?
  • What are the benefits of switching Haskell installation to ghcup for windows and ubuntu? I'm asking because we recommend using the following action to setup Haskell, which can be broken when using different installation paths https://github.com/actions/setup-haskell

@hasufell
Copy link
Contributor Author

hasufell commented Sep 6, 2021

Could you please create a separate PR for each OS? It will be much easier to test them and make changes.

Sure

Are there any drawbacks in deleting docs and profiling libs?

For CI, I don't think so. In fact, you're already doing that implicitly when using the ubuntu ppa:

https://github.com/actions/virtual-environments/blob/19717dd75837cd8c0a877f78cb270505af1b1702/images/linux/scripts/installers/haskell.sh#L37

What are the benefits of switching Haskell installation to ghcup for windows and ubuntu?

Some of the reasons have been discussed here: haskell/actions#70

The main reason is that you get a consistent set of GHC versions across all platforms. Using 3 different methods (ghcup, ubuntu ppa and chocolatey) means you rely on 3 different release schedules of maintainers. On linux, ghcup is very well tested. Windows support is recent and may be discussed separately.

@Kleidukos
Copy link

@hasufell I seem to recall that there was a disk space penalty when coming from the PPA to ghcup, do you think this is something ghcup can optimise, or will we have to wait for non-profiled bindists from GHCHQ?

@Kleidukos
Copy link

Kleidukos commented Sep 7, 2021

  • What are the benefits of switching Haskell installation to ghcup for windows and ubuntu?
    I'm asking because we recommend using the following action to setup Haskell, which can be broken when using different installation paths https://github.com/actions/setup-haskell

@miketimofeev This repo is abandoned, nowadays everyone uses https://github.com/haskell/actions instead :)

@hasufell
Copy link
Contributor Author

hasufell commented Sep 7, 2021

I seem to recall that there was a disk space penalty when coming from the PPA to ghcup, do you think this is something ghcup can optimise, or will we have to wait for non-profiled bindists from GHCHQ?

See the PR: https://github.com/actions/virtual-environments/pull/4016/files#diff-be47a081552c94d85c52955897f314f7f38270b6444a776f793397e440fa0c85R38

@Kleidukos
Copy link

@hasufell ah beautiful, I had missed that part. :)

@hazelweakly
Copy link

Hi @hasufell!
Thanks for the proposed changes! A few questions\notes:

* Could you please create a separate PR for each OS? It will be much easier to test them and make changes.

* Are there any drawbacks in deleting docs and profiling libs?

* What are the benefits of switching Haskell installation to ghcup for windows and ubuntu? I'm asking because we recommend using the following action to setup Haskell, which can be broken when using different installation paths https://github.com/actions/setup-haskell
  • What are the benefits of switching Haskell installation to ghcup for windows and ubuntu?
    I'm asking because we recommend using the following action to setup Haskell, which can be broken when using different installation paths https://github.com/actions/setup-haskell

@miketimofeev This repo is abandoned, nowadays everyone uses https://github.com/haskell/actions instead :)

In addition to everyone using haskell/actions instead, that repo is something that tries to always correctly follow whatever actions/virtual-environments does so that the github provided runners will always work and always correctly utilize pre-installed resources whenever possible. So don't worry about breaking things for the action; but a little heads-up before doing so is always nice. That said, the action is also intended to be robust to missing binaries, setup, etc., as much as reasonable so that it can be used on self hosted runners as well; so changing things in actions/virtual-environments shouldn't break anything in the haskell/actions repo.

@Bodigrim
Copy link

Bodigrim commented Sep 7, 2021

@miketimofeev
https://github.com/actions/virtual-environments/blob/4394e4414f48c6acaf0272add56b97a802826591/images/linux/scripts/installers/haskell.sh#L17-L21
Note that this PPA is no longer updated and already misses three last releases of GHC (8.10.5, 8.10.6 and 8.10.7). Because of this I strongly support switching to ghcup as a source.

@miketimofeev
Copy link
Contributor

@Bodigrim thanks for the explanation!

@miketimofeev
Copy link
Contributor

@hasufell I'm going to close this PR, please create separate ones for Ubuntu and Windows and we will take care of macOS as, unfortunately, we don't accept macOS contributions at the moment.

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

Successfully merging this pull request may close these issues.

5 participants