Skip to content

Commit

Permalink
Merge pull request #693 from haskell-CI/ghc-9.8
Browse files Browse the repository at this point in the history
Support building with GHC-9.8; allow-newer ShellCheck deps
  • Loading branch information
phadej authored Dec 3, 2023
2 parents f2e14f2 + ba3f203 commit ab13050
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 25 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.8.1
compilerKind: ghc
compilerVersion: 9.8.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.3
compilerKind: ghc
compilerVersion: 9.6.3
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
compilerKind: ghc
compilerVersion: 9.4.8
Expand Down Expand Up @@ -216,13 +226,22 @@ jobs:
ghc-options: -Werror=missing-methods -Werror=missing-fields
EOF
cat >> cabal.project <<EOF
allow-newer: ShellCheck-0.9.0:aeson
allow-newer: ShellCheck-0.9.0:bytestring
allow-newer: ShellCheck-0.9.0:deepseq
allow-newer: ShellCheck-0.9.0:Diff
allow-newer: ShellCheck-0.9.0:fgl
allow-newer: ShellCheck-0.9.0:mtl
allow-newer: ShellCheck-0.9.0:text
allow-newer: ShellCheck-0.9.0:transformers
package haskell-ci
ghc-options: -Werror
package cabal-install-parsers
ghc-options: -Werror
keep-going: False
keep-going: False
package bytestring
tests: False
Expand Down
21 changes: 12 additions & 9 deletions cabal-install-parsers/cabal-install-parsers.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cabal-version: 2.2
name: cabal-install-parsers
version: 0.6.1.1
x-revisions: 1
synopsis: Utilities to work with cabal-install files
description:
@cabal-install-parsers@ provides parsers for @cabal-install@ files:
Expand Down Expand Up @@ -33,6 +34,8 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.3
|| ==9.8.1

extra-source-files:
Changelog.md
Expand Down Expand Up @@ -65,23 +68,23 @@ library

-- GHC-boot libraries
build-depends:
, base >=4.10 && <4.18
, base >=4.10 && <4.20
, binary ^>=0.8.5
, bytestring ^>=0.10.8.1 || ^>=0.11.1.0
, bytestring ^>=0.10.8.1 || ^>=0.11.1.0 || ^>=0.12.0.2
, Cabal-syntax ^>=3.10.1.0
, containers ^>=0.5.7.1 || ^>=0.6.0.1
, deepseq ^>=1.4.2.0
, deepseq ^>=1.4.2.0 || ^>=1.5.0.0
, directory ^>=1.3.0.0
, filepath ^>=1.4.1.1
, parsec ^>=3.1.13.0
, pretty ^>=1.1.3.3
, text ^>=1.2.3.0 || ^>=2.0.1
, text ^>=1.2.3.0 || ^>=2.0.1 || ^>=2.1
, time ^>=1.8.0.2 || ^>=1.9.3 || ^>=1.11.1.1 || ^>=1.12.2
, transformers ^>=0.5.2.0
, transformers ^>=0.5.2.0 || ^>=0.6.1.0

-- extra dependencies
build-depends:
, aeson ^>=2.1.0.0
, aeson ^>=2.1.0.0 || ^>=2.2.0.0
, base16-bytestring ^>=1.0.0.0
, binary-instances ^>=1
, cryptohash-sha256 ^>=0.11.101.0
Expand All @@ -107,7 +110,7 @@ test-suite cabal-parsers-index

-- dependencies needing explicit constraints
build-depends:
, tasty ^>=1.4
, tasty ^>=1.4 || ^>=1.5
, tasty-hunit ^>=0.10.0.2

test-suite cabal-parsers-golden
Expand All @@ -129,8 +132,8 @@ test-suite cabal-parsers-golden

-- dependencies needing explicit constraints
build-depends:
, ansi-terminal >=1.0 && <1.1
, tasty ^>=1.4
, ansi-terminal >=1.0 && <1.1
, tasty ^>=1.4 || ^>=1.5
, tasty-golden ^>=2.3.1.1
, tree-diff >=0.2 && <0.4

Expand Down
3 changes: 3 additions & 0 deletions cabal-install-parsers/src/Cabal/Internal/Newtypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
{-# LANGUAGE ScopedTypeVariables #-}
module Cabal.Internal.Newtypes where

-- hide redundant import warning
import Prelude hiding (Applicative (..))

import Control.Applicative (Alternative (..), liftA2)
import Data.Char (isSpace)
import Data.Function (on)
Expand Down
10 changes: 10 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@ tests: True
package haskell-ci
ghc-options: -Wall
ghc-options: -Werror

-- ShellCheck doesn't allow newer versions of dependencies
allow-newer: ShellCheck-0.9.0:aeson
allow-newer: ShellCheck-0.9.0:bytestring
allow-newer: ShellCheck-0.9.0:deepseq
allow-newer: ShellCheck-0.9.0:Diff
allow-newer: ShellCheck-0.9.0:fgl
allow-newer: ShellCheck-0.9.0:mtl
allow-newer: ShellCheck-0.9.0:text
allow-newer: ShellCheck-0.9.0:transformers
22 changes: 12 additions & 10 deletions haskell-ci.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ tested-with:
|| ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.3
|| ==9.8.1

extra-source-files: CHANGELOG.md
extra-source-files:
Expand Down Expand Up @@ -144,27 +146,27 @@ library haskell-ci-internal
ViewPatterns

build-depends:
, base >=4.10 && <4.18
, base >=4.10 && <4.20
, binary ^>=0.8.5.1
, bytestring ^>=0.10.8.1 || ^>=0.11.1.0
, bytestring ^>=0.10.8.1 || ^>=0.11.1.0 || ^>=0.12.0.2
, Cabal-syntax ^>=3.10.1.0
, containers ^>=0.5.7.1 || ^>=0.6.0.1
, deepseq ^>=1.4.2.0
, deepseq ^>=1.4.2.0 || ^>=1.5.0.0
, directory ^>=1.3.0.0
, filepath ^>=1.4.1.1
, mtl ^>=2.2.2
, mtl ^>=2.2.2 || ^>=2.3.1
, parsec ^>=3.1.13.0
, pretty ^>=1.1.3.3
, process ^>=1.4.3.0 || ^>=1.6.1.0
, text ^>=1.2.3.0 || ^>=2.0.1
, transformers ^>=0.5.2.0
, text ^>=1.2.3.0 || ^>=2.0.1 || ^>=2.1
, transformers ^>=0.5.2.0 || ^>=0.6.1.0

if !impl(ghc >=8.2)
build-depends: bifunctors ^>=5.5.4

-- other dependencies
build-depends:
, aeson ^>=1.5.6.0 || ^>=2.0.0.0 || ^>=2.1.0.0
, aeson ^>=2.1.0.0 || ^>=2.2.0.0
, attoparsec ^>=0.14.1
, base-compat ^>=0.13.0
, base16-bytestring ^>=1.0.1.0
Expand Down Expand Up @@ -216,7 +218,7 @@ test-suite golden

-- dependencies needing explicit constraints
build-depends:
, ansi-terminal >=1.0 && <1.1
, Diff ^>=0.4.0
, tasty ^>=1.4.1
, ansi-terminal >=1.0 && <1.1
, Diff ^>=0.4.0 || ^>=0.5
, tasty ^>=1.4.1 || ^>=1.5
, tasty-golden ^>=2.3.1.1
13 changes: 11 additions & 2 deletions haskell-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi

CFG_CABAL_STORE_CACHE=""
CFG_CABAL_REPO_CACHE=""
CFG_JOBS="9.4.8 9.2.8 9.0.2 8.10.7 8.8.4 8.6.5 8.4.4 8.2.2"
CFG_JOBS="9.8.1 9.6.3 9.4.8 9.2.8 9.0.2 8.10.7 8.8.4 8.6.5 8.4.4 8.2.2"
CFG_CABAL_UPDATE=false

SCRIPT_NAME=$(basename "$0")
Expand Down Expand Up @@ -482,13 +482,22 @@ package *
ghc-options: -Werror=missing-methods
EOF
cat >> cabal.project <<EOF
allow-newer: ShellCheck-0.9.0:aeson
allow-newer: ShellCheck-0.9.0:bytestring
allow-newer: ShellCheck-0.9.0:deepseq
allow-newer: ShellCheck-0.9.0:Diff
allow-newer: ShellCheck-0.9.0:fgl
allow-newer: ShellCheck-0.9.0:mtl
allow-newer: ShellCheck-0.9.0:text
allow-newer: ShellCheck-0.9.0:transformers
package haskell-ci
ghc-options: -Werror
package cabal-install-parsers
ghc-options: -Werror
keep-going: False
keep-going: False
package bytestring
tests: False
Expand Down
3 changes: 1 addition & 2 deletions src/HaskellCI/Auxiliary.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module HaskellCI.Auxiliary (
) where

import HaskellCI.Prelude
import Prelude (head)

import qualified Data.Set as S
import qualified Distribution.CabalSpecVersion as C
Expand Down Expand Up @@ -57,7 +56,7 @@ auxiliary Config {..} prj JobVersions {..} = Auxiliary {..}
where
pkgs = prjPackages prj
uris = prjUriPackages prj
projectName = fromMaybe (pkgName $ Prelude.head pkgs) cfgProjectName
projectName = fromMaybe "ci" (cfgProjectName <|> pkgName <$> listToMaybe pkgs)

doctestEnabled = any (maybeGHC False (`C.withinRange` cfgDoctestEnabled cfgDoctest)) linuxVersions
docspecEnabled = any (maybeGHC False (`C.withinRange` cfgDocspecEnabled cfgDocspec)) linuxVersions
Expand Down
2 changes: 1 addition & 1 deletion src/HaskellCI/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Data.Functor.Compat as X ((<&>))
import Data.Functor.Identity as X (Identity (..))
import Data.List as X (foldl', intercalate, isPrefixOf, nub, stripPrefix, tails)
import Data.List.NonEmpty as X (NonEmpty (..), groupBy)
import Data.Maybe as X (fromMaybe, isJust, isNothing, mapMaybe)
import Data.Maybe as X (fromMaybe, isJust, isNothing, listToMaybe, mapMaybe)
import Data.Proxy as X (Proxy (..))
import Data.Set as X (Set)
import Data.String as X (IsString (fromString))
Expand Down

0 comments on commit ab13050

Please sign in to comment.