This repository was archived by the owner on Jan 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
setup action fails to set the required ghc version as default #73
Copy link
Copy link
Closed
Description
- Consider this recent workflow: https://github.com/jneira/haskell-language-server/runs/3608526677?check_suite_focus=true
Run haskell/actions/setup@v1
with:
ghc-version: 8.8.4
cabal-version: 3.4
stack-version: latest
Preparing to setup a Haskell environment
Resolved 3.4 to 3.4.0.0
Installing ghc version 8.8.4
Attempting to install ghc 8.8.4 using apt-get
/usr/bin/sudo -- sh -c add-apt-repository -y ppa:hvr/ghc && apt-get update && apt-get -y install ghc-8.8.4
.........
Selecting previously unselected package ghc-8.8.4.
Preparing to unpack .../ghc-8.8.4_8.8.4-17~20.04_amd64.deb ...
Unpacking ghc-8.8.4 (8.8.4-17~20.04) ...
Setting up libncursesw5:amd64 (6.2-0ubuntu2) ...
Setting up ghc-8.8.4 (8.8.4-17~20.04) ...
update-alternatives: using /opt/ghc/bin/ghc-8.8.4 to provide /opt/ghc/bin/ghc (opt-ghc) in auto mode
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Found ghc 8.8.4 in cache at path /opt/ghc/8.8.4/bin. Setup successful.
- And this info about ghc:
Run which cabal
which cabal
cabal --version
which ghc
ghc --version
cabal exec ghc -- --version
shell: /usr/bin/bash -e {0}
/home/runner/.ghcup/bin/cabal
cabal-install version 3.4.0.0
compiled using version 3.4.0.0 of the Cabal library
/home/runner/.ghcup/bin/ghc
The Glorious Glasgow Haskell Compilation System, version 9.0.1
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: ghcide-1.4.2.0 (user goal)
[__1] trying: base-4.15.0.0/installed-4.15.0.0 (dependency of ghcide)
[__2] trying: hls-brittany-plugin-1.0.1.0 (user goal)
[__3] next goal: czipwith (dependency of hls-brittany-plugin)
[__3] rejecting: czipwith-1.0.1.3 (conflict:
base==4.15.0.0/installed-4.15.0.0, czipwith => base>=4.11 && <4.15)
[__3] skipping: czipwith-1.0.1.2, czipwith-1.0.1.1, czipwith-1.0.1.0,
czipwith-1.0.0.0 (has the same characteristics that caused the previous
version to fail: excludes 'base' version 4.15.0.0)
[__3] fail (backjumping, conflict set: base, czipwith, hls-brittany-plugin)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghcide, base, czipwith,
hls-brittany-plugin
Try running with --minimize-conflict-set to improve the error message.
- So although the action is installing/setting ghc-8.8.4 in
/opt/ghc/8.8.4/binthe ghc in path is 9.0.1 from ghcup (/home/runner/.ghcup/bin/ghc) - It seems it could be related with the recent changes in the setup upstream: actions/runner-images@ee69b89
- It dropped hvr/ppp from ghc install and use ghcup exclusively
- The image with this change was released 2 days ago
- I am afraid that it could potentially break all workflows using haskell/actions/setup to set the default ghc 😟
- The fix could be make the action be in sync with upstream and use ghcup as unique or first installation method
- The workaround is add a step to make ghcup set the desired ghc version with
ghcup install ghc ${{ matrix.ghc }} --set(jneira/haskell-language-server@c76c2d0)
Metadata
Metadata
Assignees
Labels
No labels
Activity
jneira commentedon Sep 15, 2021
Not sure about that, other workflows seems to be running with the right ghc version:
jneira commentedon Sep 15, 2021
/home/runner/.ghcup/bin:/opt/ghc/8.8.4/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/runner/.local/bin:/opt/pipx_bin:/usr/share/rust/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/binjneira commentedon Sep 15, 2021
Thanks to @hasufell a possible diagnostic would be:
$PATHalready had/home/runner/.ghcup/binbefore/opt/ghc/${ghcVersion}/binI think
as we had to remove hvr/ppp anyways, as it is no being updated from long time ago
hazelweakly commentedon Sep 15, 2021
Alrighty, this should be fixed now.
(As a note to myself: It's past due to make the bundling part of the CI process instead of the local dev process and make the version bumping a CI thing as well)
hasufell commentedon Sep 15, 2021
Does this fix need a new tag or will it be written to the existing tag?
hazelweakly commentedon Sep 21, 2021
It should be written to v1, v1.2, and v1.2.6
(sorry, I didn't see this message until now)