Skip to content

Commit be96b38

Browse files
Bump to Cabal 3.14 and GHC 9.12 (#1391)
* Bump to Cabal 3.14 and GHC 9.12 * Temporarily switch off other workflows than Haskell CI * Haskell CI: allow older transformers * Drop GHC 9.4 and lower * Warning flags -W... rather than -fwarn... * Bump doctest-parallel * Revert "Temporarily switch off other workflows than Haskell CI" This reverts commit 016598f. * update Nix Flake for Cabal 3.14 * disable fail fast for Nix Flake GitHub Action * disuse `haskell-updates` * Bump doctest-parallel to >= 0.4 (needed for Cabal 3.14) --------- Co-authored-by: Peter Becich <[email protected]>
1 parent 33d9ea3 commit be96b38

File tree

6 files changed

+92
-79
lines changed

6 files changed

+92
-79
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/haskell-CI/haskell-ci
1010
#
11-
# version: 0.19.20250330
11+
# version: 0.19.20250506
1212
#
13-
# REGENDATA ("0.19.20250330",["github","hackage-server.cabal"])
13+
# REGENDATA ("0.19.20250506",["github","hackage-server.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,44 +32,24 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35-
- compiler: ghc-9.10.1
35+
- compiler: ghc-9.12.2
3636
compilerKind: ghc
37-
compilerVersion: 9.10.1
37+
compilerVersion: 9.12.2
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.8.2
40+
- compiler: ghc-9.10.2
4141
compilerKind: ghc
42-
compilerVersion: 9.8.2
42+
compilerVersion: 9.10.2
4343
setup-method: ghcup
4444
allow-failure: false
45-
- compiler: ghc-9.6.5
45+
- compiler: ghc-9.8.4
4646
compilerKind: ghc
47-
compilerVersion: 9.6.5
47+
compilerVersion: 9.8.4
4848
setup-method: ghcup
4949
allow-failure: false
50-
- compiler: ghc-9.4.8
50+
- compiler: ghc-9.6.7
5151
compilerKind: ghc
52-
compilerVersion: 9.4.8
53-
setup-method: ghcup
54-
allow-failure: false
55-
- compiler: ghc-9.2.8
56-
compilerKind: ghc
57-
compilerVersion: 9.2.8
58-
setup-method: ghcup
59-
allow-failure: false
60-
- compiler: ghc-9.0.2
61-
compilerKind: ghc
62-
compilerVersion: 9.0.2
63-
setup-method: ghcup
64-
allow-failure: false
65-
- compiler: ghc-8.10.7
66-
compilerKind: ghc
67-
compilerVersion: 8.10.7
68-
setup-method: ghcup
69-
allow-failure: false
70-
- compiler: ghc-8.8.4
71-
compilerKind: ghc
72-
compilerVersion: 8.8.4
52+
compilerVersion: 9.6.7
7353
setup-method: ghcup
7454
allow-failure: false
7555
fail-fast: false
@@ -86,8 +66,8 @@ jobs:
8666
chmod a+x "$HOME/.ghcup/bin/ghcup"
8767
- name: Install cabal-install
8868
run: |
89-
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1-p1 || (cat "$HOME"/.ghcup/logs/*.* && false)
90-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1-p1 -vnormal+nowrap" >> "$GITHUB_ENV"
69+
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
70+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
9171
- name: Install GHC (GHCup)
9272
if: matrix.setup-method == 'ghcup'
9373
run: |

.github/workflows/nix-flake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
nix:
1111
strategy:
12-
fail-fast: true
12+
fail-fast: false
1313
matrix:
1414
os:
1515
- ubuntu-latest

cabal.haskell-ci

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ installed: +all -Cabal -Cabal-syntax -text -parsec -process
66
-- -- allow failures with ghc-7.6 and ghc-7.8
77
-- allow-failures: <7.9
88

9-
-- Use Ubuntu 22.04
10-
distribution: jammy
9+
-- -- Use Ubuntu 22.04
10+
-- distribution: jammy
1111

1212
apt: libbrotli-dev libgd-dev
1313
-- libgd-dev is for gd via hs-captcha

flake.lock

Lines changed: 12 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
inputs = {
3-
nixpkgs.url = "github:nixos/nixpkgs/haskell-updates";
3+
nixpkgs.url = "github:nixos/nixpkgs";
44
flake-parts.url = "github:hercules-ci/flake-parts";
55
haskell-flake.url = "github:srid/haskell-flake";
66
flake-root.url = "github:srid/flake-root";
@@ -42,25 +42,57 @@
4242
};
4343
packages.default = config.packages.hackage-server;
4444
haskellProjects.default = {
45+
basePackages = pkgs.haskell.packages.ghc910;
4546
settings = {
4647
hackage-server.check = false;
47-
ap-normalize.check = false;
48+
49+
cabal-add.jailbreak = true;
50+
cabal-install-parsers.jailbreak = true;
4851
# https://community.flake.parts/haskell-flake/dependency#nixpkgs
49-
tar = { super, ... }:
50-
{ custom = _: super.tar_0_6_3_0; };
51-
hackage-security = { super, ... }:
52-
{ custom = _: super.hackage-security_0_6_2_6; };
52+
Cabal-syntax = { super, ... }:
53+
{ custom = _: super.Cabal-syntax_3_14_2_0; };
54+
Cabal = { super, ... }:
55+
{ custom = _: super.Cabal_3_14_2_0; };
56+
fourmolu.check = false;
57+
hls-plugin-api.jailbreak = true;
58+
ghcide.jailbreak = true;
59+
haskell-language-server.jailbreak = true;
60+
61+
Diff = { super, ... }:
62+
{ custom = _: super.Diff_1_0_2; };
63+
64+
threads.check = false;
65+
tree-diff.check = false;
66+
67+
ormolu = { super, ... }:
68+
{ custom = _: super.ormolu_0_8_0_0;
69+
check = false;
70+
};
71+
extensions = { super, ... }:
72+
{ custom = _: super.extensions_0_1_0_3;
73+
jailbreak = true;
74+
};
75+
76+
hlint = { super, ... }:
77+
{ custom = _: super.hlint_3_10; };
78+
ghc-lib-parser-ex = { super, ... }:
79+
{ custom = _: super.ghc-lib-parser-ex_9_12_0_0; };
80+
ghc-lib-parser = { super, ... }:
81+
{
82+
# custom = _: super.ghc-lib-parser_9_12_2_20250421;
83+
custom = _: super.ghc-lib-parser_9_12_2_20250320;
84+
};
5385
};
5486
packages = {
5587
# https://community.flake.parts/haskell-flake/dependency#path
5688
# tls.source = "1.9.0";
89+
fourmolu.source = "0.18.0.0";
5790
};
5891
devShell = {
5992
tools = hp: {
6093
inherit (pkgs)
6194
cabal-install
6295
ghc
63-
6496
# https://github.com/haskell/hackage-server/pull/1219#issuecomment-1597140858
6597
# glibc
6698
icu67

hackage-server.cabal

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@ license: BSD-3-Clause
2828
license-file: LICENSE
2929

3030
tested-with:
31-
GHC == 9.10.1
32-
GHC == 9.8.2
33-
GHC == 9.6.5
34-
GHC == 9.4.8
35-
GHC == 9.2.8
36-
GHC == 9.0.2
37-
GHC == 8.10.7
38-
GHC == 8.8.4
31+
GHC == 9.12.2
32+
GHC == 9.10.2
33+
GHC == 9.8.4
34+
GHC == 9.6.7
35+
-- Constraint transformers >= 0.6 forces GHC >= 9.6 for CI
3936

4037
data-dir: datafiles
4138
data-files:
@@ -130,10 +127,10 @@ common defaults
130127
-- see `cabal.project.local-ghc-${VERSION}` files
131128
build-depends:
132129
, array >= 0.5 && < 0.6
133-
, base >= 4.13 && < 4.21
130+
, base >= 4.18 && < 4.22
134131
, binary >= 0.8 && < 0.9
135132
, bytestring >= 0.10 && < 0.13
136-
, containers >= 0.6.0 && < 0.8
133+
, containers >= 0.6.0 && < 0.9
137134
, deepseq >= 1.4 && < 1.6
138135
, directory >= 1.3 && < 1.4
139136
, filepath >= 1.4 && < 1.6
@@ -142,15 +139,15 @@ common defaults
142139
, pretty >= 1.1 && < 1.2
143140
, process >= 1.6 && < 1.7
144141
, text ^>= 1.2.5.0 || >= 2.0 && < 2.2
145-
, time >= 1.9 && < 1.13
142+
, time >= 1.9 && < 1.15
146143
, transformers >= 0.5 && < 0.7
147144
, unix >= 2.7 && < 2.9
148145
, scientific
149146
-- other dependencies shared by most components
150147
build-depends:
151148
, aeson >= 2.1.0.0 && < 2.3
152-
, Cabal >= 3.12.1.0 && < 3.14
153-
, Cabal-syntax >= 3.12.1.0 && < 3.14
149+
, Cabal >= 3.14.2.0 && < 3.16
150+
, Cabal-syntax >= 3.14.2.0 && < 3.16
154151
-- Cabal-syntax needs to be bound to constrain hackage-security
155152
-- see https://github.com/haskell/hackage-server/issues/1130
156153
, fail ^>= 4.9.0
@@ -165,11 +162,13 @@ common defaults
165162

166163
ghc-options:
167164
-funbox-strict-fields
168-
-Wall -fwarn-tabs -fno-warn-unused-do-bind -fno-warn-deprecated-flags
169-
-Werror=incomplete-patterns -Werror=missing-methods
170-
171-
if impl(ghc >= 8.10)
172-
ghc-options: -Wno-unused-record-wildcards
165+
-Wall
166+
-Wtabs
167+
-Wno-deprecated-flags
168+
-Wno-unused-do-bind
169+
-Wno-unused-record-wildcards
170+
-Werror=incomplete-patterns
171+
-Werror=missing-methods
173172

174173
default-extensions: LambdaCase, TupleSections
175174
other-extensions: CPP, TemplateHaskell
@@ -444,12 +443,12 @@ library
444443
-- haddock-library-1.11.0 changed type of markupOrderedList
445444
-- see https://github.com/haskell/hackage-server/issues/1128
446445
, happstack-server ^>= 7.7.1 || ^>= 7.8.0 || ^>= 7.9.0
447-
, hashable ^>= 1.3 || ^>= 1.4
446+
, hashable >= 1.3 && < 1.6
448447
, hs-captcha ^>= 1.0
449448
, hslogger ^>= 1.3.1
450449
, lifted-base ^>= 0.2.1
451450
, mime-mail ^>= 0.5
452-
, random ^>= 1.2
451+
, random >= 1.2 && < 1.4
453452
, rss ^>= 3000.2.0.7
454453
, safecopy ^>= 0.10
455454
, semigroups ^>= 0.20
@@ -458,7 +457,7 @@ library
458457
, stringsearch ^>= 0.3.6.6
459458
, tagged ^>= 0.8.5
460459
, transformers ^>= 0.6
461-
, xhtml >= 3000.2.0.0 && < 3000.4
460+
, xhtml >= 3000.2.0.0 && < 3000.5
462461
, xmlgen ^>= 0.6
463462
, xss-sanitize ^>= 0.3.6
464463

@@ -541,7 +540,10 @@ common test-defaults
541540

542541
build-depends: hackage-server
543542
hs-source-dirs: tests
544-
ghc-options: -threaded -rtsopts -fno-warn-orphans
543+
ghc-options:
544+
-threaded
545+
-rtsopts
546+
-Wno-orphans
545547

546548
other-modules: Paths_hackage_server
547549
autogen-modules: Paths_hackage_server
@@ -600,7 +602,7 @@ test-suite ReverseDependenciesTest
600602
, tasty-hedgehog ^>= 1.4
601603
, tasty-hunit ^>= 0.10
602604
, HUnit ^>= 1.6
603-
, hedgehog ^>= 1.4
605+
, hedgehog >= 1.4 && < 1.6
604606
, exceptions
605607
, bimap
606608
, mime-mail
@@ -696,7 +698,7 @@ test-suite DocTests
696698
main-is: DocTestMain.hs
697699
build-depends:
698700
, hackage-server
699-
, doctest-parallel ^>= 0.3.0
701+
, doctest-parallel ^>= 0.4
700702
-- doctest-parallel-0.2.2 is the first to filter out autogen-modules
701703

702704
if !flag(doctests)

0 commit comments

Comments
 (0)