ci: stop requesting the runner's preinstalled cabal - #9
Merged
Conversation
Every run since the merge of thomasmarsh#1 fails in Set up GHC, before anything is compiled, including runs on main: [Error] The version '3.12.1.0' of the tool cabal is not installed. Install error was: cabal-3.12.1.0 is already installed Set error was: The version '3.12.1.0' of the tool cabal is not installed. All install methods for cabal 3.12.1.0 failed ghcup locates the binary (ghcup whereis returns a path) while reporting it as not installed, and then declines to install over it. That is the runner image's preinstalled cabal with ghcup metadata that no longer matches, which 'cabal-version: "3.12"' resolves onto. Requesting an unpinned latest takes the clean install path instead of trying to adopt the image's copy. ghc-version stays exactly pinned.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI has failed on every run since the merge of #1, including runs on
main:It dies in Set up GHC, before anything is compiled, so it is unrelated to
any of the PRs it is failing on:
ghcup contradicts itself:
ghcup whereis cabal 3.12.1.0returns/usr/local/.ghcup/cabal/3.12.1.0/cabal, whileghcup setreports the sameversion as not installed, and the install path then declines because it is
installed. That is the runner image's preinstalled cabal carrying ghcup
metadata that no longer matches — a runner image update, not anything in this
repository.
cabal-version: "3.12"resolves precisely onto that copy.Change
Ask for
latestinstead, so setup takes the clean install path rather thantrying to adopt the image's.
ghc-versionstays exactly pinned at9.10.2.Caveat — I could not test this
The failure only reproduces on GitHub's runners, and workflows are disabled on
forks until enabled by hand, so I have no way to prove the fix from here. The
diagnosis is solid (the log is unambiguous about what fails and why); the
remedy is the standard one for this class of ghcup state mismatch, but it is
reasoning rather than evidence.
If you would rather not merge an untested CI change — entirely reasonable —
the alternatives are pinning an exact newer version instead of
latest, oradding
ghcup install cabal --forceahead of the setup step. Happy to switchto either.
I am also happy to verify it properly if you enable Actions on my fork's
mirror of this branch, or you can push the same one-line change to a branch
here and watch it directly.