Skip to content

Commit a0b5cc3

Browse files
committed
Bump to 0.2.0.2 and CHANGELOG; bump Haskell CI to GHC 9.14 alpha1
1 parent 72623e1 commit a0b5cc3

File tree

4 files changed

+68
-16
lines changed

4 files changed

+68
-16
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 45 additions & 6 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.20250506
11+
# version: 0.19.20250821
1212
#
13-
# REGENDATA ("0.19.20250506",["github","netrc.cabal"])
13+
# REGENDATA ("0.19.20250821",["github","netrc.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,6 +32,11 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35+
- compiler: ghc-9.14.0.20250819
36+
compilerKind: ghc
37+
compilerVersion: 9.14.0.20250819
38+
setup-method: ghcup-prerelease
39+
allow-failure: false
3540
- compiler: ghc-9.12.2
3641
compilerKind: ghc
3742
compilerVersion: 9.12.2
@@ -110,8 +115,8 @@ jobs:
110115
chmod a+x "$HOME/.ghcup/bin/ghcup"
111116
- name: Install cabal-install
112117
run: |
113-
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
114-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
118+
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
119+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
115120
- name: Install GHC (GHCup)
116121
if: matrix.setup-method == 'ghcup'
117122
run: |
@@ -126,6 +131,21 @@ jobs:
126131
HCKIND: ${{ matrix.compilerKind }}
127132
HCNAME: ${{ matrix.compiler }}
128133
HCVER: ${{ matrix.compilerVersion }}
134+
- name: Install GHC (GHCup prerelease)
135+
if: matrix.setup-method == 'ghcup-prerelease'
136+
run: |
137+
"$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
138+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
139+
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
140+
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
141+
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
142+
echo "HC=$HC" >> "$GITHUB_ENV"
143+
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
144+
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
145+
env:
146+
HCKIND: ${{ matrix.compilerKind }}
147+
HCNAME: ${{ matrix.compiler }}
148+
HCVER: ${{ matrix.compilerVersion }}
129149
- name: Set PATH and environment variables
130150
run: |
131151
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
@@ -136,7 +156,7 @@ jobs:
136156
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
137157
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
138158
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
139-
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
159+
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
140160
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
141161
env:
142162
HCKIND: ${{ matrix.compilerKind }}
@@ -164,6 +184,18 @@ jobs:
164184
repository hackage.haskell.org
165185
url: http://hackage.haskell.org/
166186
EOF
187+
if $HEADHACKAGE; then
188+
cat >> $CABAL_CONFIG <<EOF
189+
repository head.hackage.ghc.haskell.org
190+
url: https://ghc.gitlab.haskell.org/head.hackage/
191+
secure: True
192+
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
193+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
194+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
195+
key-threshold: 3
196+
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
197+
EOF
198+
fi
167199
cat >> $CABAL_CONFIG <<EOF
168200
program-default-options
169201
ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -212,9 +244,16 @@ jobs:
212244
touch cabal.project.local
213245
echo "packages: ${PKGDIR_netrc}" >> cabal.project
214246
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package netrc" >> cabal.project ; fi
215-
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
247+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
248+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package netrc" >> cabal.project ; fi
249+
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
250+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package netrc" >> cabal.project ; fi
251+
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
216252
cat >> cabal.project <<EOF
217253
EOF
254+
if $HEADHACKAGE; then
255+
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
256+
fi
218257
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(netrc)$/; }' >> cabal.project.local
219258
cat cabal.project
220259
cat cabal.project.local

changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 0.2.0.2
2+
3+
_Andreas Abel, 2025-09-02_
4+
5+
- Remove obsolete `deriving Typeable`.
6+
- Remove old code for GHC 7.
7+
- Fix warnings.
8+
- Tested with GHC 8.0 - 9.14 alpha1.
9+
110
## 0.2.0.1
211

312
_Andreas Abel, 2024-06-25_

netrc.cabal

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
cabal-version: >=1.10
1+
cabal-version: 1.18
22
name: netrc
3-
version: 0.2.0.1
3+
version: 0.2.0.2
44
synopsis: Parser for .netrc files
55
homepage: https://github.com/haskell-hvr/netrc
66
bug-reports: https://github.com/haskell-hvr/netrc/issues
@@ -19,6 +19,7 @@ description:
1919

2020

2121
tested-with:
22+
GHC == 9.14.1
2223
GHC == 9.12.2
2324
GHC == 9.10.2
2425
GHC == 9.8.4
@@ -33,8 +34,10 @@ tested-with:
3334
GHC == 8.2.2
3435
GHC == 8.0.2
3536

36-
extra-source-files:
37+
extra-doc-files:
3738
changelog.md
39+
40+
extra-source-files:
3841
src-tests/data/*.netrc
3942
src-tests/data/*.netrc.out
4043

@@ -48,11 +51,12 @@ library
4851
OverloadedStrings
4952
RecordWildCards
5053

54+
-- Lower bounds taken from GHC 8.0 and Stackage LTS 7.0
5155
build-depends:
5256
base >= 4.9 && < 5
53-
, deepseq >= 1.3 && < 1.6
54-
, bytestring >= 0.10.4 && < 0.13
55-
, parsec >= 3.1 && < 3.2
57+
, deepseq >= 1.4.2.0 && < 1.6
58+
, bytestring >= 0.10.8.0 && < 0.13
59+
, parsec >= 3.1.11 && < 3.2
5660

5761
hs-source-dirs: src
5862
exposed-modules: Network.NetRc
@@ -71,9 +75,9 @@ test-suite test-netrc
7175
netrc
7276
, base
7377
, bytestring
74-
, tasty >= 0.10 && < 1.6
78+
, tasty >= 0.11.0.4 && < 1.6
7579
, tasty-golden == 2.3.*
76-
, tasty-quickcheck >= 0.8.1 && < 1
80+
, tasty-quickcheck >= 0.8.4 && < 1
7781

7882
source-repository head
7983
type: git

src-tests/test-netrc.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ main = do
3939
let goTests = testGroup "ref-samples"
4040
[ goldenVsString tn (fp++".out") (doGoTest fp)
4141
| fp <- sort netrcFiles
42-
, let Just tn = stripPrefix "src-tests/data/" fp
42+
, let tn = fromMaybe undefined $ stripPrefix "src-tests/data/" fp
4343
]
4444

4545
let goTests2 = testGroup "ref-samples2"
4646
[ goldenVsString tn (fp++".out2") (doGoTest2 fp)
4747
| fp <- sort netrcFiles
48-
, let Just tn = stripPrefix "src-tests/data/" fp
48+
, let tn = fromMaybe undefined $ stripPrefix "src-tests/data/" fp
4949
]
5050

5151
defaultMain $ testGroup "Tests" [goTests, goTests2, qcTests]

0 commit comments

Comments
 (0)