Skip to content

Commit 1066cab

Browse files
authored
Bump base for ghc-8.4 (#306)
Fixes #303. I bumped base to `>=4.11`, matched `ghc-8.4.4` included packages' lower bounds, and fixed warnings including `cabal check` warnings except for the example.
2 parents 3f0535b + 036165c commit 1066cab

File tree

33 files changed

+148
-173
lines changed

33 files changed

+148
-173
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#
99
# For more information, see https://github.com/andreasabel/haskell-ci
1010
#
11-
# version: 0.17.20240127
11+
# version: 0.18.0.20240225
1212
#
13-
# REGENDATA ("0.17.20240127",["github","cabal.project"])
13+
# REGENDATA ("0.18.0.20240225",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -37,9 +37,9 @@ jobs:
3737
compilerVersion: 9.8.1
3838
setup-method: ghcup
3939
allow-failure: false
40-
- compiler: ghc-9.6.3
40+
- compiler: ghc-9.6.4
4141
compilerKind: ghc
42-
compilerVersion: 9.6.3
42+
compilerVersion: 9.6.4
4343
setup-method: ghcup
4444
allow-failure: false
4545
- compiler: ghc-9.4.8
@@ -77,16 +77,6 @@ jobs:
7777
compilerVersion: 8.4.4
7878
setup-method: ghcup
7979
allow-failure: false
80-
- compiler: ghc-8.2.2
81-
compilerKind: ghc
82-
compilerVersion: 8.2.2
83-
setup-method: ghcup
84-
allow-failure: false
85-
- compiler: ghc-8.0.2
86-
compilerKind: ghc
87-
compilerVersion: 8.0.2
88-
setup-method: ghcup
89-
allow-failure: false
9080
fail-fast: false
9181
steps:
9282
- name: apt
@@ -185,6 +175,7 @@ jobs:
185175
echo "packages: $GITHUB_WORKSPACE/source/hackage-root-tool" >> cabal.project
186176
echo "packages: $GITHUB_WORKSPACE/source/hackage-repo-tool" >> cabal.project
187177
echo "packages: $GITHUB_WORKSPACE/source/hackage-security-HTTP" >> cabal.project
178+
echo "packages: $GITHUB_WORKSPACE/source/precompute-fileinfo" >> cabal.project
188179
cat cabal.project
189180
- name: sdist
190181
run: |
@@ -210,6 +201,8 @@ jobs:
210201
echo "PKGDIR_hackage_repo_tool=${PKGDIR_hackage_repo_tool}" >> "$GITHUB_ENV"
211202
PKGDIR_hackage_security_HTTP="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/hackage-security-HTTP-[0-9.]*')"
212203
echo "PKGDIR_hackage_security_HTTP=${PKGDIR_hackage_security_HTTP}" >> "$GITHUB_ENV"
204+
PKGDIR_precompute_fileinfo="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/precompute-fileinfo-[0-9.]*')"
205+
echo "PKGDIR_precompute_fileinfo=${PKGDIR_precompute_fileinfo}" >> "$GITHUB_ENV"
213206
rm -f cabal.project cabal.project.local
214207
touch cabal.project
215208
touch cabal.project.local
@@ -220,25 +213,28 @@ jobs:
220213
echo "packages: ${PKGDIR_hackage_root_tool}" >> cabal.project
221214
echo "packages: ${PKGDIR_hackage_repo_tool}" >> cabal.project
222215
echo "packages: ${PKGDIR_hackage_security_HTTP}" >> cabal.project
223-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package hackage-security" >> cabal.project ; fi
224-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
225-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package hackage-security-http-client" >> cabal.project ; fi
226-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
227-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package example-client" >> cabal.project ; fi
228-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
229-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package hackage-security-curl" >> cabal.project ; fi
230-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
231-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package hackage-root-tool" >> cabal.project ; fi
232-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
233-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package hackage-repo-tool" >> cabal.project ; fi
234-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
235-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package hackage-security-HTTP" >> cabal.project ; fi
236-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
216+
echo "packages: ${PKGDIR_precompute_fileinfo}" >> cabal.project
217+
echo "package hackage-security" >> cabal.project
218+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
219+
echo "package hackage-security-http-client" >> cabal.project
220+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
221+
echo "package example-client" >> cabal.project
222+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
223+
echo "package hackage-security-curl" >> cabal.project
224+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
225+
echo "package hackage-root-tool" >> cabal.project
226+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
227+
echo "package hackage-repo-tool" >> cabal.project
228+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
229+
echo "package hackage-security-HTTP" >> cabal.project
230+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
231+
echo "package precompute-fileinfo" >> cabal.project
232+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
237233
cat >> cabal.project <<EOF
238234
constraints: base-compat >= 0.12.2
239235
allow-newer: containers
240236
EOF
241-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(example-client|hackage-repo-tool|hackage-root-tool|hackage-security|hackage-security-HTTP|hackage-security-curl|hackage-security-http-client)$/; }' >> cabal.project.local
237+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(example-client|hackage-repo-tool|hackage-root-tool|hackage-security|hackage-security-HTTP|hackage-security-curl|hackage-security-http-client|precompute-fileinfo)$/; }' >> cabal.project.local
242238
cat cabal.project
243239
cat cabal.project.local
244240
- name: dump install plan
@@ -280,6 +276,8 @@ jobs:
280276
${CABAL} -vnormal check
281277
cd ${PKGDIR_hackage_security_HTTP} || false
282278
${CABAL} -vnormal check
279+
cd ${PKGDIR_precompute_fileinfo} || false
280+
${CABAL} -vnormal check
283281
- name: haddock
284282
run: |
285283
if [ $((HCNUMVER >= 80600)) -ne 0 ] ; then $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
@@ -292,17 +290,17 @@ jobs:
292290
rm -f cabal.project.local
293291
- name: constraint set containers-0.7
294292
run: |
295-
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all --dry-run ; fi
296-
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
297-
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' --dependencies-only -j2 all ; fi
298-
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
299-
if [ $((HCNUMVER >= 80200 && HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
293+
if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all --dry-run ; fi
294+
if [ $((HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
295+
if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' --dependencies-only -j2 all ; fi
296+
if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
297+
if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='containers >= 0.7' all ; fi
300298
- name: constraint set no-lukko
301299
run: |
302-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hackage-security -lukko' all --dry-run ; fi
303-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
304-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hackage-security -lukko' --dependencies-only -j2 all ; fi
305-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hackage-security -lukko' all ; fi
300+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hackage-security -lukko' all --dry-run
301+
cabal-plan topo | sort
302+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hackage-security -lukko' --dependencies-only -j2 all
303+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='hackage-security -lukko' all
306304
- name: save cache
307305
uses: actions/cache/save@v4
308306
if: always()

cabal.haskell-ci

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ raw-project
1515
base-compat >= 0.12.2
1616

1717
constraint-set no-lukko
18-
ghc: >=8.2
18+
ghc: >=8.4
1919
constraints: hackage-security -lukko
2020

2121
constraint-set containers-0.7
22-
ghc: >= 8.2 && < 9.8
22+
ghc: >= 8.4 && < 9.8
2323
constraints: containers >= 0.7
2424
tests: True
2525
run-tests: True

cabal.project

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ packages: hackage-security
77
hackage-root-tool
88
hackage-repo-tool
99
hackage-security-HTTP
10+
precompute-fileinfo
1011

1112
package hackage-security
1213
tests: true
1314

14-
-- FIXME/TODO
15-
-- packages: precompute-fileinfo
16-
17-
-- constraints: hackage-security -lukko
15+
-- constraints: hackage-security -lukko

example-client/example-client.cabal

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ tested-with:
2121
GHC == 8.8.4
2222
GHC == 8.6.5
2323
GHC == 8.4.4
24-
GHC == 8.2.2
25-
GHC == 8.0.2
2624

2725
flag use-network-uri
2826
description: Are we using network-uri?
@@ -37,12 +35,12 @@ executable example-client
3735
main-is: Main.hs
3836
other-modules: ExampleClient.Options
3937

40-
build-depends: base >= 4.9 && < 4.20,
41-
bytestring >= 0.9,
42-
directory >= 1.2,
43-
filepath >= 1.2,
44-
optparse-applicative >= 0.11,
45-
time >= 1.5,
38+
build-depends: base >= 4.11 && < 4.20,
39+
bytestring >= 0.10.8.2,
40+
directory >= 1.3.1.5,
41+
filepath >= 1.4.2,
42+
optparse-applicative >= 0.13,
43+
time >= 1.8.0.2,
4644
hackage-security >= 0.5,
4745
hackage-security-HTTP,
4846
hackage-security-curl,
@@ -67,5 +65,5 @@ executable example-client
6765
if flag(Cabal-syntax)
6866
build-depends: Cabal-syntax >= 3.7 && < 3.12
6967
else
70-
build-depends: Cabal >= 1.12 && < 3.7,
68+
build-depends: Cabal >= 2.2.0.1 && < 3.7,
7169
Cabal-syntax < 3.7

hackage-repo-tool/hackage-repo-tool.cabal

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ tested-with:
3232
GHC == 8.8.4
3333
GHC == 8.6.5
3434
GHC == 8.4.4
35-
GHC == 8.2.2
36-
GHC == 8.0.2
3735

3836
extra-source-files:
3937
ChangeLog.md README.md
@@ -62,18 +60,18 @@ executable hackage-repo-tool
6260

6361
-- For boot libraries we try to accomodate the versions bundled with
6462
-- the respective GHC release
65-
build-depends: base >= 4.9 && < 4.20,
66-
bytestring >= 0.9 && < 0.13,
67-
directory >= 1.2 && < 1.4,
68-
filepath >= 1.3 && < 1.5,
69-
time >= 1.5 && < 1.13
63+
build-depends: base >= 4.11 && < 4.20,
64+
bytestring >= 0.10.8.2 && < 0.13,
65+
directory >= 1.3.1.5 && < 1.4,
66+
filepath >= 1.4.2 && < 1.5,
67+
time >= 1.8.0.2 && < 1.13
7068
if !os(windows)
71-
build-depends: unix >= 2.5 && < 2.9
69+
build-depends: unix >= 2.7.2.2 && < 2.9
7270

7371
-- For non-boot libraries we try to support single major versions
7472
-- to reduce the risk of semantic differences
7573
build-depends: microlens >= 0.4.11.2 && < 0.5,
76-
optparse-applicative >= 0.15.1 && < 0.18,
74+
optparse-applicative >= 0.13 && < 0.19,
7775
tar >= 0.5 && < 0.7,
7876
zlib >= 0.6 && < 0.8,
7977
hackage-security >= 0.6 && < 0.7
@@ -89,8 +87,7 @@ executable hackage-repo-tool
8987
if flag(Cabal-syntax)
9088
build-depends: Cabal-syntax >= 3.7 && < 3.12
9189
else
92-
build-depends: Cabal >= 1.14 && < 1.26
93-
|| >= 2.0 && < 2.6
90+
build-depends: Cabal >= 2.2.0.1 && < 2.6
9491
|| >= 3.0 && < 3.7,
9592
Cabal-syntax < 3.7
9693

hackage-repo-tool/src/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ createPackageMetadata opts repoLoc whenWrite pkgId = do
410410

411411
-- | Find the files we need to add to the index
412412
findNewIndexFiles :: GlobalOpts -> RepoLoc -> WhenWrite -> IO [IndexPath]
413-
findNewIndexFiles opts@GlobalOpts{..} repoLoc whenWrite = do
413+
findNewIndexFiles opts@GlobalOpts{} repoLoc whenWrite = do
414414
indexTS <- getFileModTime opts repoLoc (InRep repoLayoutIndexTar)
415415
indexFiles <- getRecursiveContents absIndexDir
416416

@@ -430,7 +430,7 @@ findNewIndexFiles opts@GlobalOpts{..} repoLoc whenWrite = do
430430

431431
-- | Extract the cabal file from the package tarball and copy it to the index
432432
extractCabalFile :: GlobalOpts -> RepoLoc -> WhenWrite -> PackageIdentifier -> IO ()
433-
extractCabalFile opts@GlobalOpts{..} repoLoc whenWrite pkgId = do
433+
extractCabalFile opts@GlobalOpts{} repoLoc whenWrite pkgId = do
434434
srcTS <- getFileModTime opts repoLoc src
435435
dstTS <- getFileModTime opts repoLoc dst
436436
let skip = case whenWrite of

hackage-root-tool/Main.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
{-# LANGUAGE CPP, ScopedTypeVariables, RecordWildCards #-}
1+
{-# LANGUAGE ScopedTypeVariables, RecordWildCards #-}
22
module Main (main) where
33

4-
import Data.Monoid
54
import Control.Exception
65
import GHC.Conc.Sync (setUncaughtExceptionHandler)
76
import System.Exit

hackage-root-tool/hackage-root-tool.cabal

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ tested-with:
2525
GHC == 8.8.4
2626
GHC == 8.6.5
2727
GHC == 8.4.4
28-
GHC == 8.2.2
29-
GHC == 8.0.2
3028

3129
extra-source-files:
3230
ChangeLog.md
@@ -38,10 +36,10 @@ source-repository head
3836

3937
executable hackage-root-tool
4038
main-is: Main.hs
41-
build-depends: base >= 4.9 && < 5,
42-
filepath >= 1.2 && < 1.5,
43-
optparse-applicative >= 0.11 && < 0.18,
44-
hackage-security >= 0.5 && < 0.7
39+
build-depends: base >= 4.11 && < 5,
40+
filepath >= 1.4.2 && < 1.5,
41+
optparse-applicative >= 0.13 && < 0.19,
42+
hackage-security >= 0.5 && < 0.7
4543
default-language: Haskell2010
4644
other-extensions: CPP, ScopedTypeVariables, RecordWildCards
4745
ghc-options: -Wall

hackage-security-HTTP/hackage-security-HTTP.cabal

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ tested-with:
2727
GHC == 8.8.4
2828
GHC == 8.6.5
2929
GHC == 8.4.4
30-
GHC == 8.2.2
31-
GHC == 8.0.2
3230

3331
extra-source-files:
3432
ChangeLog.md
@@ -43,10 +41,10 @@ flag use-network-uri
4341

4442
library
4543
exposed-modules: Hackage.Security.Client.Repository.HttpLib.HTTP
46-
build-depends: base >= 4.9 && < 4.20,
47-
bytestring >= 0.9 && < 0.13,
44+
build-depends: base >= 4.11 && < 4.20,
45+
bytestring >= 0.10.8.2 && < 0.13,
4846
HTTP >= 4000.2.19 && < 4000.5,
49-
mtl >= 2.1 && < 2.4,
47+
mtl >= 2.2.2 && < 2.4,
5048
zlib >= 0.5 && < 0.8,
5149
hackage-security >= 0.5 && < 0.7
5250
hs-source-dirs: src

hackage-security-HTTP/src/Hackage/Security/Client/Repository/HttpLib/HTTP.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{-# LANGUAGE CPP #-}
21
-- | Implementation of 'HttpClient' using the HTTP package
32
module Hackage.Security.Client.Repository.HttpLib.HTTP (
43
withClient

hackage-security-curl/hackage-security-curl.cabal

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,17 @@ tested-with:
2525
GHC == 8.8.4
2626
GHC == 8.6.5
2727
GHC == 8.4.4
28-
GHC == 8.2.2
29-
GHC == 8.0.2
3028

3129
flag use-network-uri
3230
description: Are we using network-uri?
3331
manual: False
3432

3533
library
3634
exposed-modules: Hackage.Security.Client.Repository.HttpLib.Curl
37-
build-depends: base >= 4.9 && < 4.20,
38-
bytestring >= 0.9,
39-
process >= 1.1,
40-
hackage-security
35+
build-depends: base >= 4.11 && < 4.20,
36+
bytestring >= 0.10.8.2 && < 0.13,
37+
process >= 1.6.3 && < 1.7,
38+
hackage-security >= 0.6.2 && < 0.7
4139
hs-source-dirs: src
4240
default-language: Haskell2010
4341
ghc-options: -Wall

hackage-security-http-client/hackage-security-http-client.cabal

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ copyright: Copyright 2015 Well-Typed LLP
1313
category: Distribution
1414
build-type: Simple
1515
cabal-version: >=1.10
16+
extra-source-files: ChangeLog.md
1617

1718
tested-with:
1819
GHC == 9.8.1
@@ -24,20 +25,18 @@ tested-with:
2425
GHC == 8.8.4
2526
GHC == 8.6.5
2627
GHC == 8.4.4
27-
GHC == 8.2.2
28-
GHC == 8.0.2
2928

3029
flag use-network-uri
3130
description: Are we using network-uri?
3231
manual: False
3332

3433
library
3534
exposed-modules: Hackage.Security.Client.Repository.HttpLib.HttpClient
36-
build-depends: base >= 4.9 && < 4.20,
37-
bytestring >= 0.9,
38-
http-client >= 0.4 && < 0.8,
39-
http-types >= 0.8,
40-
hackage-security >= 0.5 && < 0.7
35+
build-depends: base >= 4.11 && < 4.20,
36+
bytestring >= 0.10.8.2 && < 0.13,
37+
http-client >= 0.4 && < 0.8,
38+
http-types >= 0.12.4 && < 0.13,
39+
hackage-security >= 0.5 && < 0.7
4140
hs-source-dirs: src
4241
default-language: Haskell2010
4342
default-extensions: FlexibleContexts

0 commit comments

Comments
 (0)