Skip to content

Commit

Permalink
Allow building with GHC 9.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGlScott committed Dec 28, 2024
1 parent 49b8113 commit ddc569a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 7 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20241202
# version: 0.19.20241223
#
# REGENDATA ("0.19.20241202",["github","cabal.project"])
# REGENDATA ("0.19.20241223",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -28,6 +28,11 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.12.1
compilerKind: ghc
compilerVersion: 9.12.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.10.1
Expand Down Expand Up @@ -101,8 +106,8 @@ jobs:
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
Expand Down Expand Up @@ -211,6 +216,15 @@ jobs:
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package kansas-comet-example" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
cat >> cabal.project <<EOF
allow-newer: aeson:ghc-prim
allow-newer: aeson:template-haskell
allow-newer: cryptohash-sha1:base
allow-newer: indexed-traversable:base
allow-newer: indexed-traversable-instances:base
allow-newer: integer-conversion:base
allow-newer: semialign:base
allow-newer: these:base
allow-newer: uuid-types:template-haskell
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(kansas-comet|kansas-comet-example)$/; }' >> cabal.project.local
cat cabal.project
Expand Down
12 changes: 12 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
packages: .
./example

-- TODO: Remove this once the ecosystem has caught up with GHC 9.12
allow-newer:
aeson:ghc-prim,
aeson:template-haskell,
cryptohash-sha1:base,
indexed-traversable:base,
indexed-traversable-instances:base,
integer-conversion:base,
semialign:base,
these:base,
uuid-types:template-haskell
3 changes: 2 additions & 1 deletion example/kansas-comet-example.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ tested-with: GHC == 8.0.2
, GHC == 9.6.6
, GHC == 9.8.4
, GHC == 9.10.1
, GHC == 9.12.1

data-files:
-- js
Expand All @@ -43,7 +44,7 @@ data-files:

Executable kansas-comet-example
Other-Modules: Paths_kansas_comet_example
Build-Depends: base >= 4.9 && < 4.21,
Build-Depends: base >= 4.9 && < 4.22,
base-compat-batteries >= 0.10 && < 0.15,
aeson >= 0.9 && < 2.3,
data-default-class >= 0.0.1 && < 0.3,
Expand Down
5 changes: 3 additions & 2 deletions kansas-comet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ tested-with: GHC == 8.0.2
, GHC == 9.6.6
, GHC == 9.8.4
, GHC == 9.10.1
, GHC == 9.12.1
Description:
A transport-level remote JavaScript RESTful push mechanism.

Expand All @@ -36,7 +37,7 @@ Library
other-modules: Paths_kansas_comet
default-language: Haskell2010
build-depends: aeson >= 2 && < 2.3,
base >= 4.9 && < 4.21,
base >= 4.9 && < 4.22,
containers >= 0.4 && < 0.8,
data-default-class >= 0.0.1 && < 0.3,
-- TODO: Eventually, we should bump the lower version
Expand All @@ -45,7 +46,7 @@ Library
scotty >= 0.10 && < 0.23,
stm >= 2.2 && < 2.6,
text >= 0.11.3.1 && < 2.2,
time >= 1.2 && < 1.13,
time >= 1.2 && < 1.15,
transformers >= 0.3 && < 0.7,
unordered-containers >= 0.2.3 && < 0.3

Expand Down

0 comments on commit ddc569a

Please sign in to comment.