Skip to content

Commit facf1f0

Browse files
authored
Update GHC to 9.10.3 and add conditional compilation for PlutusTx. (#311)
* Update nix flake to use GHC 9.10.3 * Update cardano-api and related dependencies * Add CPP conditionals to exclude MatchingIndex tests on GHC 9.10+ (PlutusTx.Plugin doesn't support GHC 9.10 yet) * Fix DRep certificate registration test using key role coercion * Update addCertificate to use lens-based approach
1 parent abe2d85 commit facf1f0

File tree

28 files changed

+518
-376
lines changed

28 files changed

+518
-376
lines changed

.github/workflows/ci-linux.yaml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: ci-linux
22
on:
33
push:
4+
branches: [ main ]
45
pull_request:
56

67
concurrency:
@@ -10,11 +11,19 @@ concurrency:
1011
jobs:
1112
build:
1213
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
ghc:
18+
- version: "9.6"
19+
devshell: "ghc966-nohoogle"
20+
- version: "9.10"
21+
devshell: "ghc9103-nohoogle"
22+
name: build (GHC ${{ matrix.ghc.version }})
1323
env:
1424
NIX_CONFIG: accept-flake-config = true
1525
steps:
16-
# install deps.
17-
- name: install dependencies
26+
- name: Install dependencies
1827
run: |
1928
sudo apt-get update
2029
sudo apt-get install -y libsystemd-dev
@@ -43,17 +52,17 @@ jobs:
4352
uses: actions/cache@v3
4453
with:
4554
path: ~/.cabal/store
46-
key: cabal-${{ hashFiles('cabal.project') }}
55+
key: cabal-${{ matrix.ghc.version }}-${{ hashFiles('cabal.project') }}
4756

48-
- name: Prepare dependencies and build environment
57+
- name: Prepare build environment
4958
run: |
50-
nix develop .#ghc966-nohoogle -c bash -lc 'ghc --version'
51-
nix develop .#ghc966-nohoogle -c bash -lc 'cabal update'
59+
nix develop .#${{ matrix.ghc.devshell }} -c bash -lc 'ghc --version'
60+
nix develop .#${{ matrix.ghc.devshell }} -c bash -lc 'cabal update'
5261
53-
- name: Build
62+
- name: Build project
5463
run: |
55-
nix develop .#ghc966-nohoogle -c bash -lc 'cabal build --ghc-options=-Werror -j all'
64+
nix develop .#${{ matrix.ghc.devshell }} -c bash -lc 'cabal build --ghc-options=-Werror -j all'
5665
57-
- name: Test
66+
- name: Test project
5867
run: |
59-
nix develop .#ghc966-nohoogle -c bash -lc 'cabal test --ghc-options=-Werror all'
68+
nix develop .#${{ matrix.ghc.devshell }} -c bash -lc 'cabal test --ghc-options=-Werror all'

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ The `main` branch uses the following versions of its major dependencies:
1919
|Name|Version|
2020
|--|--|
2121
|`cardano-node`|[10.6.1](https://github.com/IntersectMBO/cardano-node/releases/tag/10.6.1)|
22-
|`cardano-api`|[10.21.0.0](https://chap.intersectmbo.org/package/cardano-api-10.21.0.0/)|
23-
|`ghc`|9.6.6|
24-
|`cabal`|3.10.3.0|
22+
|`cardano-api`|[10.23.0.0](https://chap.intersectmbo.org/package/cardano-api-10.23.0.0/)|
23+
|`ghc`|9.6.6 or 9.10.3|
24+
|`cabal`|3.10.3.0 or 3.16.1.0|
25+
26+
For a dev environment with all dependencies, run `nix develop` (defaults to GHC 9.10.3).
27+
For GHC 9.6.6 specifically, run `nix develop .#ghc966`.
2528

2629
## Evaluating Transactions
2730

@@ -84,7 +87,7 @@ class Monad m => MonadBlockchain m where
8487
```
8588

8689
Both operations can be performed efficiently by a Cardano node using `cardano-api`.
87-
There `MonadUtxoQuery` class has support for queries that can only be answered efficiently by
90+
There `MonadUtxoQuery` class has support for queries that can only be answered efficiently by
8891

8992
## Testing
9093

cabal.project

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,21 @@ repository cardano-haskell-packages
1313
c00aae8461a256275598500ea0e187588c35a5d5d7454fb57eac18d9edb86a56
1414
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee
1515

16-
-- We are bound to 9.6 because of plutus-tx-plugin
17-
-- see https://github.com/IntersectMBO/plutus/issues/6892
18-
-- We should probably replace it with plutarch or aiken
19-
-- so that we can move on to a newer GHC.
20-
with-compiler: ghc-9.6.6
21-
2216
index-state:
23-
, hackage.haskell.org 2026-01-08T17:40:53Z
24-
, cardano-haskell-packages 2026-01-08T17:40:53Z
17+
, hackage.haskell.org 2026-02-09T00:00:00Z
18+
, cardano-haskell-packages 2026-02-09T00:00:00Z
2519

2620
-- You never, ever, want this.
2721
write-ghc-environment-files: never
2822

2923
test-show-details: direct
3024
tests: True
3125

26+
-- GHC 9.10.3 ships with containers 0.7, but some deps still require ^>= 0.6
27+
-- cardano-api 10.23.0.0 requires plutus-core/plutus-ledger-api ^>=1.57
28+
allow-newer:
29+
maestro-sdk:containers
30+
3231
packages:
3332
src/base
3433
src/blockfrost

0 commit comments

Comments
 (0)