actions icon indicating copy to clipboard operation
actions copied to clipboard

Unable to install GHC error

Open parsonsmatt opened this issue 3 years ago • 6 comments

I'm getting this error when running CI:

https://github.com/parsonsmatt/some-dict-of/runs/3657365243?check_suite_focus=true

Installing ghc version 8.10.4
  Warning: ghc 8.10.4 was not found in the cache. It will be downloaded.
  If this is unexpected, please check if version 8.10.4 is pre-installed.
  The list of pre-installed versions is available here: https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
  The above list follows a common haskell convention that the three latest major releases of ghc are commonly supported.
  If the list is outdated, please file an issue here: https://github.com/actions/virtual-environments
  by using the appropriate tool request template: https://github.com/actions/virtual-environments/issues/new/choose
  Attempting to install ghc 8.10.4 using apt-get
  /usr/bin/sudo -- sh -c apt-get -y install ghc-8.10.4
  Reading package lists...
  Building dependency tree...
  Reading state information...
  E: Unable to locate package ghc-8.10.4
  E: Couldn't find any package by glob 'ghc-8.10.4'
  E: Couldn't find any package by regex 'ghc-8.10.4'
  Attempting to install ghc 8.10.4 using ghcup
  /opt/hostedtoolcache/ghcup/0.1.8/x64/ghcup install 8.10.4
  [ Warn  ] New GHCup version available: 0.1.16.2. To upgrade, run 'ghcup upgrade'
  [ Warn  ] This is an old-style command for installing GHC. Use 'ghcup install ghc' instead.
  [ Error ] No available GHC version for 8.10.4
Error: All install methods for ghc 8.10.4 failed

https://github.com/parsonsmatt/some-dict-of/blob/master/.github/workflows/haskell.yml is the config

any idea what's going on here?

parsonsmatt avatar Sep 20 '21 23:09 parsonsmatt

Run actions/[email protected]

@parsonsmatt: Could it be that your are requesting an outdated version? v1.1.4 was released in Nov 2020 when GHC 8.10.4 didn't exist yet, as far as I remember.

I am using the v1 tag instead which is always the latest of the v1.x.y releases.

See https://github.com/haskell/actions/releases and #18.

andreasabel avatar Sep 21 '21 07:09 andreasabel

The CI run completed fine 28 days ago, pulling GHC 8.10.4 from the cache.

Updating to v1 tag does not fix it https://github.com/parsonsmatt/some-dict-of/pull/2/checks?check_run_id=3663835881

parsonsmatt avatar Sep 21 '21 13:09 parsonsmatt

Your latest CI run says:

Attempting to install ghc 8.10.4 using ghcup
  /opt/hostedtoolcache/ghcup/0.1.8/x64/ghcup install 8.10.4
  [ Warn  ] New GHCup version available: 0.1.16.2. To upgrade, run 'ghcup upgrade'
  [ Warn  ] This is an old-style command for installing GHC. Use 'ghcup install ghc' instead.
  [ Error ] No available GHC version for 8.10.4

ghcup-0.1.8 is maybe too old. Don't know.

It could be that your CI failed because the hosted runner dropped 8.10.4, and the ghcup method for 8.10.4 never worked for your CI.

Dunno, how about upgrading to 8.10.7? Is there a reason to stick to 8.10.4?

andreasabel avatar Sep 21 '21 15:09 andreasabel

Try replacing actions/setup-haskell@v1 with haskell/actions/setup@v1. I do really wish I had been able to add a migration warning before the actions repo archived the old haskell action... I've been bit myself by this and I wrote it

hazelweakly avatar Sep 21 '21 23:09 hazelweakly

Ah, puzzle solved. I wouldn't have been able to spot this subtlety! Maybe update the issue title to something more specific so that others can find the solution more easily?

andreasabel avatar Sep 22 '21 06:09 andreasabel

Yeah, that did it! Thanks.

Man, I wonder if there's some way to poison-pill the original repo? Looks like they'd need to un-archive it for any changes to be made.

parsonsmatt avatar Sep 22 '21 13:09 parsonsmatt

The OP has been solved. Closing.

andreasabel avatar Dec 28 '22 19:12 andreasabel