Skip to content

Commit 24693ce

Browse files
committed
Allow tar-0.6, bump CI to GHC 9.4.8
hackage-security: import from tar-0.6 in a way compatible with tar-0.5 This requires importing constructors independent of their data type (which changed from 0.5 to 0.6), via the `pattern` syntax. Consequently, we drop GHC 7.6 which does not have `PatternSynonyms`.
1 parent 91904de commit 24693ce

File tree

10 files changed

+32
-26
lines changed

10 files changed

+32
-26
lines changed

.github/workflows/haskell-ci.yml

+10-12
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.20231012
11+
# version: 0.17.20231112
1212
#
13-
# REGENDATA ("0.17.20231012",["github","cabal.project"])
13+
# REGENDATA ("0.17.20231112",["github","cabal.project"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -42,9 +42,9 @@ jobs:
4242
compilerVersion: 9.6.3
4343
setup-method: ghcup
4444
allow-failure: false
45-
- compiler: ghc-9.4.7
45+
- compiler: ghc-9.4.8
4646
compilerKind: ghc
47-
compilerVersion: 9.4.7
47+
compilerVersion: 9.4.8
4848
setup-method: ghcup
4949
allow-failure: false
5050
- compiler: ghc-9.2.8
@@ -100,20 +100,18 @@ jobs:
100100
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
101101
if [ "${{ matrix.setup-method }}" = ghcup ]; then
102102
mkdir -p "$HOME/.ghcup/bin"
103-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
103+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
104104
chmod a+x "$HOME/.ghcup/bin/ghcup"
105-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
106105
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
107-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
106+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
108107
else
109108
apt-add-repository -y 'ppa:hvr/ghc'
110109
apt-get update
111110
apt-get install -y "$HCNAME"
112111
mkdir -p "$HOME/.ghcup/bin"
113-
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
112+
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
114113
chmod a+x "$HOME/.ghcup/bin/ghcup"
115-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml;
116-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
114+
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
117115
fi
118116
env:
119117
HCKIND: ${{ matrix.compilerKind }}
@@ -133,13 +131,13 @@ jobs:
133131
echo "HC=$HC" >> "$GITHUB_ENV"
134132
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
135133
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
136-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
134+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
137135
else
138136
HC=$HCDIR/bin/$HCKIND
139137
echo "HC=$HC" >> "$GITHUB_ENV"
140138
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
141139
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
142-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
140+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
143141
fi
144142
145143
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')

example-client/example-client.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ cabal-version: >=1.10
1414
tested-with:
1515
GHC == 9.8.1
1616
GHC == 9.6.3
17-
GHC == 9.4.7
17+
GHC == 9.4.8
1818
GHC == 9.2.8
1919
GHC == 9.0.2
2020
GHC == 8.10.7

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 1.12
22
name: hackage-repo-tool
33
version: 0.1.1.3
4-
x-revision: 4
4+
x-revision: 5
55

66
build-type: Simple
77
synopsis: Manage secure file-based package repositories
@@ -26,7 +26,7 @@ bug-reports: https://github.com/haskell/hackage-security/issues
2626
tested-with:
2727
GHC == 9.8.1
2828
GHC == 9.6.3
29-
GHC == 9.4.7
29+
GHC == 9.4.8
3030
GHC == 9.2.8
3131
GHC == 9.0.2
3232
GHC == 8.10.7
@@ -87,7 +87,7 @@ executable hackage-repo-tool
8787
-- to reduce the risk of semantic differences
8888
build-depends: microlens >= 0.4.11.2 && < 0.5,
8989
optparse-applicative >= 0.15.1 && < 0.18,
90-
tar >= 0.5 && < 0.6,
90+
tar >= 0.5 && < 0.7,
9191
zlib >= 0.6 && < 0.7,
9292
hackage-security >= 0.6 && < 0.7
9393

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cabal-version: >=1.10
1818
tested-with:
1919
GHC == 9.8.1
2020
GHC == 9.6.3
21-
GHC == 9.4.7
21+
GHC == 9.4.8
2222
GHC == 9.2.8
2323
GHC == 9.0.2
2424
GHC == 8.10.7

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ build-type: Simple
2020
tested-with:
2121
GHC == 9.8.1
2222
GHC == 9.6.3
23-
GHC == 9.4.7
23+
GHC == 9.4.8
2424
GHC == 9.2.8
2525
GHC == 9.0.2
2626
GHC == 8.10.7

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cabal-version: >=1.10
1818
tested-with:
1919
GHC == 9.8.1
2020
GHC == 9.6.3
21-
GHC == 9.4.7
21+
GHC == 9.4.8
2222
GHC == 9.2.8
2323
GHC == 9.0.2
2424
GHC == 8.10.7

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cabal-version: >=1.10
1717
tested-with:
1818
GHC == 9.8.1
1919
GHC == 9.6.3
20-
GHC == 9.4.7
20+
GHC == 9.4.8
2121
GHC == 9.2.8
2222
GHC == 9.0.2
2323
GHC == 8.10.7

hackage-security/ChangeLog.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
See also http://pvp.haskell.org/faq
22

3+
0.6.2.4
4+
-------
5+
6+
* Allow `tar-0.6`
7+
* Drop support for GHC < 7.8 in favor of `PatternSynonyms`
8+
* Tested with GHC 7.10 - 9.8
9+
310
0.6.2.3
411
-------
512

hackage-security/hackage-security.cabal

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
cabal-version: 1.12
22
name: hackage-security
3-
version: 0.6.2.3
4-
x-revision: 8
3+
version: 0.6.2.4
54

65
synopsis: Hackage security library
76
description: The hackage security library provides both server and
@@ -34,7 +33,7 @@ build-type: Simple
3433
tested-with:
3534
GHC == 9.8.1
3635
GHC == 9.6.3
37-
GHC == 9.4.7
36+
GHC == 9.4.8
3837
GHC == 9.2.8
3938
GHC == 9.0.2
4039
GHC == 8.10.7
@@ -127,7 +126,8 @@ library
127126
Hackage.Security.Util.TypedEmbedded
128127
MyPrelude
129128
-- We support ghc 7.4 (bundled with Cabal 1.14) and up
130-
build-depends: base >= 4.5 && < 4.20,
129+
build-depends: base >= 4.7 && < 4.20,
130+
-- PatternSynonyms are only available since GHC 7.8 (base 4.7)
131131
base16-bytestring >= 0.1.1 && < 1.1,
132132
base64-bytestring >= 1.0 && < 1.3,
133133
bytestring >= 0.9 && < 0.13,
@@ -139,7 +139,7 @@ library
139139
cryptohash-sha256 >= 0.11 && < 0.12,
140140
-- 0.4.2 introduces TarIndex, 0.4.4 introduces more
141141
-- functionality, 0.5.0 changes type of serialise
142-
tar >= 0.5 && < 0.6,
142+
tar >= 0.5 && < 0.7,
143143
template-haskell >= 2.7 && < 2.22,
144144
time >= 1.2 && < 1.13,
145145
transformers >= 0.3 && < 0.7,
@@ -185,6 +185,7 @@ library
185185
NamedFieldPuns
186186
NoImplicitPrelude
187187
NoMonomorphismRestriction
188+
PatternSynonyms
188189
RankNTypes
189190
RecordWildCards
190191
ScopedTypeVariables

hackage-security/src/Hackage/Security/Client/Repository/Cache.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Control.Exception
2020
import Control.Monad
2121
import Control.Monad.IO.Class
2222
import Data.Maybe
23-
import Codec.Archive.Tar (Entries(..))
23+
import Codec.Archive.Tar (Entries, pattern Done, pattern Fail, pattern Next)
2424
import Codec.Archive.Tar.Index (TarIndex, IndexBuilder, TarEntryOffset)
2525
import qualified Codec.Archive.Tar as Tar
2626
import qualified Codec.Archive.Tar.Index as TarIndex

0 commit comments

Comments
 (0)