From 209f9f8b7f8556f0056f553d4c15f0c4c46694ce Mon Sep 17 00:00:00 2001 From: Jimmy Kirk Date: Sun, 16 Aug 2026 17:16:30 -0500 Subject: [PATCH] ci: stop requesting the runner's preinstalled cabal Every run since the merge of #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. --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d9a35c9..4566a7af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,14 @@ jobs: uses: haskell-actions/setup@v2 with: ghc-version: "9.10.2" - cabal-version: "3.12" + # Deliberately not pinned to the runner image's preinstalled cabal. + # "3.12" resolves to 3.12.1.0, which ships in the image with ghcup + # metadata that disagrees with itself -- `ghcup whereis` finds the + # binary while `ghcup set` reports it as not installed, and the + # install path then refuses because it is "already installed". + # Asking for a version that is not preinstalled takes the clean + # install path instead. + cabal-version: "latest" - name: Cache cabal store uses: actions/cache@v4