Skip to content

Commit af89487

Browse files
committed
v0.1.0.2: Support Cabal-3.12, bump CI to GHC 9.10.1
1 parent 15baa0a commit af89487

8 files changed

Lines changed: 72 additions & 25 deletions

File tree

.github/workflows/haskell-ci.yml

Lines changed: 10 additions & 6 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.19.20240429
11+
# version: 0.19.20240630
1212
#
13-
# REGENDATA ("0.19.20240429",["github","hackage-cli.cabal"])
13+
# REGENDATA ("0.19.20240630",["github","hackage-cli.cabal"])
1414
#
1515
name: Haskell-CI
1616
on:
@@ -32,6 +32,11 @@ jobs:
3232
strategy:
3333
matrix:
3434
include:
35+
- compiler: ghc-9.10.1
36+
compilerKind: ghc
37+
compilerVersion: 9.10.1
38+
setup-method: ghcup
39+
allow-failure: false
3540
- compiler: ghc-9.8.2
3641
compilerKind: ghc
3742
compilerVersion: 9.8.2
@@ -91,9 +96,8 @@ jobs:
9196
mkdir -p "$HOME/.ghcup/bin"
9297
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
9398
chmod a+x "$HOME/.ghcup/bin/ghcup"
94-
"$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
9599
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
96-
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.3.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
100+
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
97101
apt-get update
98102
apt-get install -y libbrotli-dev
99103
env:
@@ -113,7 +117,7 @@ jobs:
113117
echo "HC=$HC" >> "$GITHUB_ENV"
114118
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
115119
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
116-
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.3.0 -vnormal+nowrap" >> "$GITHUB_ENV"
120+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
117121
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
118122
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
119123
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -198,7 +202,7 @@ jobs:
198202
echo " ghc-options: -Werror=missing-methods" >> cabal.project
199203
cat >> cabal.project <<EOF
200204
EOF
201-
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(Cabal|binary|hackage-cli)$/; }' >> cabal.project.local
205+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|binary|hackage-cli)$/; }' >> cabal.project.local
202206
cat cabal.project
203207
cat cabal.project.local
204208
- name: dump install plan

.github/workflows/stack.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
os: [ubuntu-latest]
17-
ghc-ver: [9.8, 9.6]
16+
os: [ubuntu-latest,macos-latest,windows-latest]
17+
ghc-ver: ['9.10', '9.8', '9.6']
1818
# Snapshots for 9.4.8, 9.2.8, 9.0.2, 8.10.7 do not have a recent enough base-compat; 0.13 is needed.
1919
# On ubuntu-22.04 the old versions 8.8.4, 8.6.5, 8.4.4, 8.2.2 fail due to HsOpenSSL linking errors.
2020
# They used to work under ubuntu-20.04, but it is not worth the trouble maintaining them.
2121
# Apparently, HsOpenSSL-0.11.6 and older are too old for ubuntu-22.04.
22-
include:
23-
- os: macos-latest
24-
ghc-ver: 9.8
25-
- os: windows-latest
26-
ghc-ver: 9.8
22+
# include:
23+
# - os: macos-latest
24+
# ghc-ver: '9.10'
25+
# - os: windows-latest
26+
# ghc-ver: '9.10'
2727

2828
env:
2929
ARGS: "--stack-yaml=stack-${{ matrix.ghc-ver }}.yaml --no-terminal --system-ghc"

CHANGELOG.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
11
# Changelog for hackage-cli
22

3+
## 0.1.0.2
4+
5+
_Andreas Abel, 2024-07-02_
6+
7+
- Allow revision of `stability` field
8+
(`hackage-server` issue [#1182](https://github.com/haskell/hackage-server/issues/1182)).
9+
- Print correct revision in `push-cabal --incr-rev`
10+
(issue [#66](https://github.com/hackage-trustees/hackage-cli/issues/66)).
11+
- Fix for `Cabal-3.12.0.0`.
12+
13+
Builds with `Cabal 3.4 - 3.12` and `GHC 8.2 - 9.10`.
14+
315
## 0.1.0.1
416

517
_Andreas Abel, 2023-02-20_
618

7-
- Fix for `Cabal-3.9.0.0`
19+
- Fix for `Cabal-3.9.0.0`.
820

921
Builds with `Cabal 3.4 - 3.9` and `GHC 8.2 - 9.6`.
1022

1123
## 0.1.0.0
1224

1325
_Andreas Abel, 2023-01-15_
1426

15-
- Skip errors when running `add-bound` on several files.
16-
(PR [#42](https://github.com/hackage-trustees/hackage-cli/pull/42))
27+
- Skip errors when running `add-bound` on several files
28+
(PR [#42](https://github.com/hackage-trustees/hackage-cli/pull/42)).
1729

18-
- If no version range is given for a dependency, interpret it as `-any` rather than _none_ (`<0`).
19-
(PR [#48](https://github.com/hackage-trustees/hackage-cli/pull/48))
30+
- If no version range is given for a dependency, interpret it as `-any` rather than _none_ (`<0`)
31+
(PR [#48](https://github.com/hackage-trustees/hackage-cli/pull/48)).
2032

2133
Builds with `Cabal 3.4 - 3.8` and `GHC 8.2 - 9.4`.
2234

hackage-cli.cabal

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.4
22
name: hackage-cli
3-
version: 0.1.0.1
3+
version: 0.1.0.2
44

55
synopsis: CLI tool for Hackage
66
description:
@@ -18,6 +18,7 @@ build-type: Simple
1818
-- Supported GHC versions when building with cabal:
1919
tested-with:
2020
-- Keep in descending order.
21+
GHC == 9.10.1
2122
GHC == 9.8.2
2223
GHC == 9.6.5
2324
GHC == 9.4.8
@@ -53,7 +54,7 @@ library cabal-revisions
5354
build-depends:
5455
, base >= 4.10.0.0 && < 5
5556
, bytestring >= 0.10.4.0 && < 0.13
56-
, Cabal >= 3.4 && < 3.11
57+
, Cabal >= 3.4 && < 3.13
5758
, containers >= 0.5.0.0 && < 0.8
5859
, mtl >= 2.2.2 && < 2.3 || >= 2.3.1 && < 2.4
5960
, pretty ^>= 1.1.2

lib/Distribution/Server/Util/CabalRevisions.hs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
-- Copyright : Duncan Coutts et al.
1313
-- SPDX-License-Identifier: BSD-3-Clause
1414
--
15-
-- Maintainer : libraries@haskell.org
15+
-- Maintainer : Andreas Abel
1616
-- Stability : provisional
1717
-- Portability : portable
1818
--
@@ -178,8 +178,15 @@ checkCabalFileRevision checkXRevision old new = do
178178

179179
checkPackageChecks :: Check GenericPackageDescription
180180
checkPackageChecks pkg pkg' =
181-
let checks = checkPackage pkg Nothing
182-
checks' = checkPackage pkg' Nothing
181+
let checks = checkPackage pkg
182+
-- The API change of checkPackage happened somewhere between 3.10 and 3.12.
183+
#if !MIN_VERSION_Cabal(3,12,0)
184+
Nothing
185+
#endif
186+
checks' = checkPackage pkg'
187+
#if !MIN_VERSION_Cabal(3,12,0)
188+
Nothing
189+
#endif
183190
in case checks' \\ checks of
184191
[] -> return ()
185192
newchecks -> fail $ unlines (map ppPackageCheck newchecks)

stack-9.10.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
resolver: nightly-2024-07-01
2+
compiler: ghc-9.10.1
3+
compiler-check: match-exact
4+
5+
# Libraries shipped with GHC 9.10.1:
6+
extra-deps:
7+
- Cabal-3.12.0.0
8+
- Cabal-syntax-3.12.0.0
9+
- directory-1.3.8.3
10+
- filepath-1.5.2.0
11+
- process-1.6.19.0
12+
- unix-2.8.5.1
13+
# For Windows:
14+
- Win32-2.14.0.0
15+
- time-1.12.2
16+
17+
flags:
18+
directory:
19+
os-string: true
20+
unix:
21+
os-string: true
22+
Win32:
23+
os-string: true

stack-9.6.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
resolver: lts-22.21
1+
resolver: lts-22.27

stack-9.8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
resolver: nightly-2024-05-11
1+
resolver: nightly-2024-07-01

0 commit comments

Comments
 (0)