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

Install ghcup on windows #4044

Merged
merged 1 commit into from
Sep 10, 2021

Conversation

hasufell
Copy link
Contributor

@hasufell hasufell commented Sep 8, 2021

See #4016 for discussion and reasoning.

This just adds ghcup the binary to the installation. It still uses chocolatey for installation. I leave it open for discussion whether chocolatey or ghcup should be used. However, there have been some reports of chocolatey issues: haskell/actions#70 (comment)

I can't comment on the nature of them. I believe chocolatey is quite robust. It lacks a little bit behind in adding new GHC versions, but not significantly.

The main (or maybe only) difference between ghcup and chocolatey is the shimgen wrapper they use for emulating symlinks to ghc.exe:

  1. Chocolatey uses a proprietary shimgen: https://github.com/chocolatey/shimgen#why-is-shimgen-closed-source
  2. ghcup uses an open source shimgen: https://github.com/71/scoop-better-shimexe

Which one of those makes less problems, I don't know.

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: I think we should split this command.

$bootstrapHaskell = Invoke-WebRequest https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1 -UseBasicParsing
Invoke-Command -ScriptBlock ([ScriptBlock]::Create($bootstrapHaskell)) -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.

Done

@hasufell hasufell force-pushed the hasufell/PR/ghcup-windows branch from 5a1d02c to 3466491 Compare September 8, 2021 11:04
@miketimofeev
Copy link
Contributor

/azp run windows2016, windows2019, windows2022

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@miketimofeev miketimofeev merged commit a9ac553 into actions:main Sep 10, 2021
@miketimofeev
Copy link
Contributor

@hasufell thanks for your contribution! The changes will be available next week.

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.

3 participants