[Git][ghc/ghc][master] Check for cabal-install >= 3.12 upfront
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 333df444 by sheaf at 2026-06-10T05:10:25-04:00 Check for cabal-install >= 3.12 upfront Starting with commit 8cb99552f607f6bc4000e45ab32532d50c8bb996, Hadrian requires cabal-install >= 3.12 in order to use the 'cabal path' command that was introduced in version 3.12, as per https://github.com/haskell/cabal/blob/a51c4ee1556d816ad86e90db7e6330dd51b0b6... This was not reflected in the Hadrian build script, causing a delayed build failure instead of enforcing the version requirement upfront, which this patch does. Fixes #27317 - - - - - 2 changed files: - + changelog.d/T27317 - hadrian/build-cabal Changes: ===================================== changelog.d/T27317 ===================================== @@ -0,0 +1,7 @@ +section: packaging +synopsis: Enforce cabal-install >= 3.12 requirement upfront when building Hadrian +issues: #27317 +mrs: !16132 +description: + We now enforce the cabal-install >= 3.12 requirement upfront when building + Hadrian, instead of silently accepting older versions and later failing. ===================================== hadrian/build-cabal ===================================== @@ -23,8 +23,10 @@ fi CABVERSTR=$("$CABAL" --numeric-version) CABVER=( ${CABVERSTR//./ } ) -if [ "${CABVER[0]}" -lt 3 ]; then - echo "Cabal version is too old; you need at least cabal-install 3.0" +# We use 'cabal path', introduced with cabal-install 3.12. +# Check version ahead of time to avoid a surprising failure later (#27317). +if [ "${CABVER[0]}" -lt 3 ] || { [ "${CABVER[0]}" -eq 3 ] && [ "${CABVER[1]}" -lt 12 ]; }; then + echo "Cabal version is too old; you need at least cabal-install 3.12" exit 2 fi View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/333df4449aca3bad8309e828b4f8cdfc... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/333df4449aca3bad8309e828b4f8cdfc... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)