From 1ec3a5479e2245836babfe672c410ec50414ef2e Mon Sep 17 00:00:00 2001 From: Artem Pelenitsyn Date: Sun, 21 Apr 2024 20:29:39 +0000 Subject: [PATCH] CI: add GHC 9.10 --- .github/workflows/validate.yml | 3 ++- .../src/Distribution/Client/TargetSelector.hs | 7 ++++++- .../Distribution/Client/Init/NonInteractive.hs | 3 +++ project-cabal/ghc-latest.config | 16 ++++++++++++++-- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index bc765b59ba9..62eb124ca19 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -70,7 +70,7 @@ jobs: # If you remove something from here, then add it to the old-ghcs job. # Also a removed GHC from here means that we are actually dropping # support, so the PR *must* have a changelog entry. - ghc: ['9.8.2', '9.6.4', '9.4.8', '9.2.8', '9.0.2', '8.10.7', '8.8.4', '8.6.5'] + ghc: ['9.10.0.20240426', '9.8.2', '9.6.4', '9.4.8', '9.2.8', '9.0.2', '8.10.7', '8.8.4', '8.6.5'] exclude: # corrupts GHA cache or the fabric of reality itself, see https://github.com/haskell/cabal/issues/8356 - os: windows-latest @@ -104,6 +104,7 @@ jobs: with: ghc-version: ${{ matrix.ghc }} cabal-version: latest # latest is mandatory for cabal-testsuite, see https://github.com/haskell/cabal/issues/8133 + ghcup-release-channel: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml # See the following link for a breakdown of the following step # https://github.com/haskell/actions/issues/7#issuecomment-745697160 diff --git a/cabal-install/src/Distribution/Client/TargetSelector.hs b/cabal-install/src/Distribution/Client/TargetSelector.hs index f287400e1e1..8dabe33f22a 100644 --- a/cabal-install/src/Distribution/Client/TargetSelector.hs +++ b/cabal-install/src/Distribution/Client/TargetSelector.hs @@ -101,6 +101,11 @@ import Control.Arrow ((&&&)) import Control.Monad hiding ( mfilter ) +#if MIN_VERSION_base(4,20,0) +import Data.Functor as UZ (unzip) +#else +import qualified Data.List.NonEmpty as UZ (unzip) +#endif import Data.List ( stripPrefix ) @@ -585,7 +590,7 @@ resolveTargetSelector knowntargets@KnownTargets{..} mfilter targetStrStatus = classifyMatchErrors errs | Just expectedNE <- NE.nonEmpty expected = - let (things, got :| _) = NE.unzip expectedNE + let (things, got :| _) = UZ.unzip expectedNE in TargetSelectorExpected targetStr (NE.toList things) got | not (null nosuch) = TargetSelectorNoSuch targetStr nosuch diff --git a/cabal-install/tests/UnitTests/Distribution/Client/Init/NonInteractive.hs b/cabal-install/tests/UnitTests/Distribution/Client/Init/NonInteractive.hs index d35ab35a659..cd618622201 100644 --- a/cabal-install/tests/UnitTests/Distribution/Client/Init/NonInteractive.hs +++ b/cabal-install/tests/UnitTests/Distribution/Client/Init/NonInteractive.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} module UnitTests.Distribution.Client.Init.NonInteractive @@ -12,7 +13,9 @@ import UnitTests.Distribution.Client.Init.Utils import qualified Data.List.NonEmpty as NEL import qualified Distribution.SPDX as SPDX +#if !MIN_VERSION_base(4,20,0) import Data.List (foldl') +#endif import qualified Data.Set as Set import Distribution.CabalSpecVersion import Distribution.Client.Init.Defaults diff --git a/project-cabal/ghc-latest.config b/project-cabal/ghc-latest.config index bff5d80c241..5f8d40290db 100644 --- a/project-cabal/ghc-latest.config +++ b/project-cabal/ghc-latest.config @@ -8,5 +8,17 @@ -- NOTE: don't forget to update the compiler version in the conditional -- when upgrading to a newer GHC -if impl(ghc >= 9.8.1) - -- allow-newer: windns:* +if impl(ghc >= 9.10.0) + allow-newer: + --windns:*, rere:*, tree-diff:*, uuid-types:*, these:*, hashable:*, assoc:*, semialign:*, indexed-traversable-instances:*, indexed-traversable:*, OneTuple:*, scientific:*, time-compat:*, text-short:*, integer-conversion:*, generically:*, data-fix:*, binary:* + -- Artem, 2024-04-21: I started and then gave up... + *:base, *:template-haskell, text-short, *:deepseq, *:bytestring, *:ghc-prim + + repository head.hackage.ghc.haskell.org + url: https://ghc.gitlab.haskell.org/head.hackage/ + secure: True + key-threshold: 3 + root-keys: + 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 + 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d + f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89