Skip to content

ci: stop requesting the runner's preinstalled cabal - #9

Merged
thomasmarsh merged 1 commit into
thomasmarsh:mainfrom
jimmykirk:ci-fix-cabal-setup
Aug 16, 2026
Merged

ci: stop requesting the runner's preinstalled cabal#9
thomasmarsh merged 1 commit into
thomasmarsh:mainfrom
jimmykirk:ci-fix-cabal-setup

Conversation

@jimmykirk

Copy link
Copy Markdown
Contributor

Unverified — please read the caveat at the bottom before merging.

Problem

CI has failed on every run since the merge of #1, including runs on main:

failure   diagram-focus-search            (#8)
failure   main                            (merge of #7)
failure   fix-coslice-output-sensitive    (#7)
failure   main                            (merge of #5)
failure   fix-coslice-crossproduct        (#5)
success   main                            (merge of #1)

It dies in Set up GHC, before anything is compiled, so it is unrelated to
any of the PRs it is failing on:

[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; if you really want to
                   reinstall it, you may want to run 'ghcup install cabal --force 3.12.1.0'
Set error was: The version '3.12.1.0' of the tool cabal is not installed.
##[error]All install methods for cabal 3.12.1.0 failed

ghcup contradicts itself: ghcup whereis cabal 3.12.1.0 returns
/usr/local/.ghcup/cabal/3.12.1.0/cabal, while ghcup set reports the same
version 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 latest instead, so setup takes the clean install path rather than
trying to adopt the image's. ghc-version stays exactly pinned at 9.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, or
adding ghcup install cabal --force ahead of the setup step. Happy to switch
to 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.

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.
@thomasmarsh
thomasmarsh merged commit cb36cfb into thomasmarsh:main Aug 16, 2026
1 check failed
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.

2 participants