Jammy is not compatible with GHC versions `<= 8.8`
Closed this issue · 3 comments
I just used the current version from master to generate a new CI config for ghc-events
in this pull request: haskell/ghc-events#105
The generated CI configuration doesn't seem to work for GHC versions <= 8.8
. The build failure in the logs looks like this:
E: The repository 'https://ppa.launchpadcontent.net/hvr/ghc/ubuntu jammy Release' does not have a Release file.
Repository: 'deb https://ppa.launchpadcontent.net/hvr/ghc/ubuntu/ jammy main'
I'm confused. The haskell-ci
uses ghcup
by default on jammy, see e.g. https://github.com/haskell-unordered-containers/hashable/blob/7837d1d54799a03794d0868cff49f99663048256/.github/workflows/haskell-ci.yml which doesn't has any particular configuration related which installed method to use.
In particular, when distribution is jammy, we force to use ghcup for all fjobs:
haskell-ci/src/HaskellCI/Config.hs
Line 273 in 28aae7d
As the linked issue moved to use a haskell-ci
fork (so I cannot see what they did, why the issue failed), I'll close this as invalid if no further information is provided.
Sorry, I forgot that force-pushing on that branch prohibits you from seeing the last version.
Here are the steps to reproduce:
- Use the
haskell-ci
binary compiled from the master branch ofgithub.com/haskell-CI/haskell-ci/
- Checkout the latest commit from the master-branch of
github.com/haskell/ghc-events
- run
haskell-ci regenerate
This results in the following output on the command line:
No haskell-ci.sh, skipping bash regeneration
*INFO* Generating GitHub config for testing for GHC versions: 8.0.2 8.2.2 8.4.4 8.6.5 8.8.4 8.10.7 9.0.2 9.2.4 9.4.2 9.6.1 9.8.1
And the following diff:
--- a/.github/workflows/haskell-ci.yml
+++ b/.github/workflows/haskell-ci.yml
@@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
-# version: 0.17.20231203
+# version: 0.19.20240514
#
-# REGENDATA ("0.17.20231203",["github","ghc-events.cabal"])
+# REGENDATA ("0.19.20240514",["github","ghc-events.cabal"])
#
name: Haskell-CI
on:
@@ -23,7 +23,7 @@ jobs:
timeout-minutes:
60
container:
- image: buildpack-deps:bionic
+ image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
@@ -187,7 +187,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
with:
path: source
- name: initial cabal.project for sdist
@@ -215,7 +215,7 @@ jobs:
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
cat >> cabal.project <<EOF
EOF
- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(ghc-events)$/; }' >> cabal.project.local
+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(ghc-events)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
@@ -223,7 +223,7 @@ jobs:
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
- uses: actions/cache/restore@v3
+ uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
@@ -253,7 +253,7 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
- uses: actions/cache/save@v3
+ uses: actions/cache/save@v4
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
The previous version of the script already used the setup-method: hvr-ppa
option. Using haskell-ci
regenerate then replaced the image by jammy
, but didn't change the setup-method to ghcup
. This leaves the regenerated build script in a state which doesn't work.
Ok. I see, the bug is that the code i linked is not run if cabal.haskell-ci
config file doesn't exist. If you add (even an empty cabal.haskell-ci
file), the diff will have things like
@@ -61,49 +61,39 @@ jobs:
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
- setup-method: hvr-ppa
+ setup-method: ghcup
allow-failure: false
I have to investigate why the no-config file and config file case differs; but the "workaround" isn't too bad for now.