Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

GHC version on Windows is not selected correctly #245

@ulysses4ever

Description

@ulysses4ever

Consider this run on Cabal CI and in particular the step where haskell/action tries to setup GHC 9.4.4.

Installing ghc version 9.4.4
  C:\ghcup\bin\ghcup.exe whereis ghc 9.4.4
  [ Error ] [�
  
  
  Attempting to access tool ghc at location <not-found>
  Failed to access tool ghc at location <not-found>
  Attempting to access tool ghc at location C:/ghcup/bin
  Succeeded accessing tool ghc at location C:/ghcup/bin
  C:\ghcup\bin\ghcup.exe set ghc 9.4.4
  [ Info  ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.7.yaml as file C:\ghcup\cache\ghcup-0.0.7.yaml
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  [ Info  ] verifying digest of: gs.exe
  [ Error ] [�
  Attempting to install ghc 9.4.4 using chocolatey
  ::stop-commands::***
  C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe choco install ghc --version 9.4.4 --allow-multiple-versions --ignore-dependencies --no-progress --limit-output
  Installing the same package with multiple versions is deprecated and will be removed in v2.0.0.
  Installing the following packages:
  ghc
  By installing, you accept licenses for the packages.
  
  ghc v9.4.4 [Approved]
  ghc package files install completed. Performing other installation steps.
  Downloading ghc 64 bit
    from 'https://downloads.haskell.org/~ghc/9.4.4/ghc-9.4.4-x86_64-unknown-mingw32.tar.xz'
  
  Download of ghcInstall (265.92 MB) completed.
  Hashes match.
  C:\tools\ghc-9.4.4\tmp\ghcInstall
  Extracting C:\tools\ghc-9.4.4\tmp\ghcInstall to C:\tools...
  C:\tools
  Extracting C:\tools\ghcInstall~ to C:\tools...
  C:\tools
  Renamed C:\tools\ghc-9.4.4-x86_64-unknown-mingw32 to C:\tools\ghc-9.4.4
  PATH environment variable does not have C:\tools\ghc-9.4.4\bin in it. Adding...
  Hiding shims for 'C:\tools'.
  Environment Vars (like PATH) have changed. Close/reopen your shell to
   see the changes (or in powershell/cmd.exe just type `refreshenv`).
   The install of ghc was successful.
    Software installed to 'C:\tools'
  
  Chocolatey installed 1/1 packages. 
   See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
  ::***::
  C:\ghcup\bin\ghcup.exe whereis ghc 9.4.4
  [ Error ] [�
  
  
  Attempting to access tool ghc at location C:\tools\ghc-9.4.4\bin
  Succeeded accessing tool ghc at location C:\tools\ghc-9.4.4\bin
  Found ghc 9.4.4 in cache at path C:\tools\ghc-9.4.4\bin. Setup successful.

So,

  1. ghcup spits some errors (is it expected?) and then calls choco to install 9.4.4
  2. choco seems to succeed in installing GHC 9.4.4
  3. as seen in a later step where we print versions of tools, we end up with GHC 9.6.1 in the path. Presumably that's what ghcup installed by default. This is wrong (we asked for 9.4.4)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingplatform: windowsre: chocoConcerning installation via chocolatey (windows)re: ghcupConcerning setup using ghcup

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions