Skip to content

Commit

Permalink
Add support for GHC 9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
jhrcek committed May 15, 2024
1 parent cf132f1 commit 080e5c0
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 16 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.17.20240109
# version: 0.19.20240514
#
# REGENDATA ("0.17.20240109",["github","cabal.project"])
# REGENDATA ("0.19.20240514",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -23,19 +23,24 @@ jobs:
timeout-minutes:
60
container:
image: buildpack-deps:bionic
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
include:
- compiler: ghc-9.8.1
- compiler: ghc-9.10.1
compilerKind: ghc
compilerVersion: 9.8.1
compilerVersion: 9.10.1
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.4
- compiler: ghc-9.8.2
compilerKind: ghc
compilerVersion: 9.6.4
compilerVersion: 9.8.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.5
compilerKind: ghc
compilerVersion: 9.6.5
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand Down Expand Up @@ -138,7 +143,7 @@ jobs:
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
- name: initial cabal.project for sdist
Expand All @@ -165,16 +170,17 @@ jobs:
echo "package hiedb" >> cabal.project
echo " ghc-options: -Werror=missing-methods" >> cabal.project
cat >> cabal.project <<EOF
allow-newer: hie-compat:base
EOF
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(hiedb)$/; }' >> cabal.project.local
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(hiedb)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
- name: dump install plan
run: |
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
cabal-plan
- name: restore cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
path: ~/.cabal/store
Expand Down Expand Up @@ -204,7 +210,7 @@ jobs:
rm -f cabal.project.local
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
- name: save cache
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for hiedb

## Unreleased

* Add support for GHC 9.10

## 0.6.0.0 -- 2024-02-11

* Add index on column `unit` of table `mods`
Expand Down
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
packages: .
allow-newer: hie-compat:base
9 changes: 5 additions & 4 deletions hiedb.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ extra-source-files:
tested-with: GHC ==9.0.2
|| ==9.2.8
|| ==9.4.8
|| ==9.6.4
|| ==9.8.1
|| ==9.6.5
|| ==9.8.2
|| ==9.10.1

source-repository head
type: git
location: https://github.com/wz1000/HieDb

common common-options
default-language: Haskell2010
build-depends: base >= 4.12 && < 4.20
build-depends: base >= 4.12 && < 4.21
ghc-options: -Wall
-Wcompat
-Widentities
Expand Down Expand Up @@ -59,7 +60,7 @@ library
HieDb.Dump,
HieDb.Html,
HieDb.Run
build-depends: ghc >= 8.6 && < 9.9
build-depends: ghc >= 8.6 && < 9.11
, array
, containers
, filepath
Expand Down
7 changes: 6 additions & 1 deletion test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,12 @@ cliSpec =
(exitCode, actualStdout, actualStderr) <- runHieDbCli ["point-defs", "Module1", "13", "24"]
actualStdout `shouldBe` ""
exitCode `shouldBe` ExitFailure 1
actualStderr `shouldBe` "Couldn't find name: $ from module GHC.Base(base)\n"
actualStderr `shouldBe`
#if __GLASGOW_HASKELL__ >= 9010
"Couldn't find name: $ from module GHC.Base(base)\n"
#else
"Couldn't find name: $ from module GHC.Internal.Base(ghc-internal)\n"
#endif

describe "point-info" $ do
it "gives information about symbol at specified location" $
Expand Down

0 comments on commit 080e5c0

Please sign in to comment.