Skip to content

Bump GHC to 9.12.2#5166

Merged
paolino merged 5 commits into
masterfrom
paolino/ghc-9.12.2
Feb 12, 2026
Merged

Bump GHC to 9.12.2#5166
paolino merged 5 commits into
masterfrom
paolino/ghc-9.12.2

Conversation

@paolino
Copy link
Copy Markdown
Collaborator

@paolino paolino commented Feb 12, 2026

Summary

  • Bump compiler from GHC 9.10.1 to 9.12.2 for all platforms (native Linux, Windows cross-compilation, macOS)
  • Bump set-git-rev and rewrite-libs subsidiary tools from GHC 9.10.1 to 9.12.2
  • Update CHaP and flake.lock inputs for 9.12.2 compatibility
  • Suppress deriving Typeable warnings (redundant in GHC 9.12, all types auto-derive Typeable)
  • Remove 3 GHC 9.10 Windows cross-compilation workarounds that are no longer needed
  • Guard crypton-x509-system overlay for macOS compatibility with GHC 9.12

Windows cross-compilation

Windows cross-compilation builds and passes all checks locally:

  • cardano-wallet.exe, cardano-node, cardano-cli, bech32, cardano-address — all pass
  • All binaries confirmed statically linked
  • Release zip produced successfully
  • All 16 Windows test bundles built successfully

Removed GHC 9.10 workarounds

GHC 9.12 fixes several iserv-proxy issues that required workarounds for Windows cross-compilation:

  • cardano-addresses TH splice hack — GHC 9.10 had a ByteCode.Asm panic (mallocStrings:spliceLit) when cross-compiling TH splices; fixed in 9.12
  • fgl ANN pragma stripping{-# ANN #-} pragmas triggered iserv-proxy crashes; fixed in 9.12
  • -j1 global flag — iserv-proxy couldn't handle parallel module compilation; works in 9.12

The remaining Windows patches (unix-compat, unix-time, crypton-x509-system, streaming-commons) are genuine library compatibility fixes unrelated to GHC version.

Subsidiary tools

The subsidiary tools (set-git-rev, rewrite-libs) were previously pinned to GHC 9.10.1, which forced nix to compile a separate GHC from source. Bumping them to 9.12.2 allows reuse of the cached GHC 9.12.2 compiler (11 derivations → 3).

Linux benchmarks comparison (9.6.6 → 9.8.2 → 9.10.1 → 9.12.2)

Runs: 9.6.6 (master pre-bump) · 9.8.2 · 9.10.1 (master post-merge) · 9.12.2

Memory (RSS at startup)

GHC KB vs 9.6.6
9.6.6 64,336 baseline
9.8.2 61,860 -3.8%
9.10.1 65,140 +1.2%
9.12.2 59,532 -7.5%

Read-blocks (ms, lower = better)

Blocks 9.6.6 9.8.2 9.10.1 9.12.2
10 0.493 0.447 0.491 0.415
100 5.20 4.67 4.95 4.41
1,000 58.7 51.3 54.8 48.9
10,000 620 529 608 551

DB — UTxO Write (seconds)

Workload 9.6.6 9.8.2 9.10.1 9.12.2
100k ada-only 0.738 0.695 0.799 0.747
10k 10-assets 0.757 0.750 0.908 0.777
10k 20-assets 1.469 1.393 1.594 1.455

DB — UTxO Read (seconds)

Workload 9.6.6 9.8.2 9.10.1 9.12.2
10k ada-only 0.000297 0.000312 0.000335 0.000645
100k ada-only 0.00274 0.00294 0.00379 0.00336

⚠️ 9.12.2 shows a 2x regression on 10k UTxO reads (0.645ms vs 0.297ms baseline). Tracked in #5170.

DB — TxHistory Write (seconds, heavy workloads)

Workload 9.6.6 9.8.2 9.10.1 9.12.2
1000 50i+100o (run 3) 61.6 59.4 63.4 66.1
10000 10i+10o 6.85 6.70 7.19 7.47

DB — TxHistory Read (seconds)

Workload 9.6.6 9.8.2 9.10.1 9.12.2
1000 DESC * 2.47 2.44 2.41 2.38
10k DESC 42..1337 3.81 3.80 3.76 3.64
10k DESC 40..60 7.69 7.68 7.50 7.35

API Benchmark (seconds)

Operation 9.6.6 9.8.2 9.10.1 9.12.2
Shelley postTx 0.306 0.302 0.348 0.291
Shared listTx 0.141 0.141 0.166 0.125
Byron listTx 0.296 0.264 0.277 0.242
Byron postTx 0.275 0.273 0.284 0.252

Latency — 2-fixture baseline (ms)

Operation 9.6.6 9.8.2 9.10.1 9.12.2
postTransaction 130.7 138.8 132.6 127.9
postTxFee 20.0 18.9 25.3 19.3
listStakePools 44.3 54.3 59.0 43.1

Latency — Massive UTxOs stress test (ms)

Operation 9.6.6 9.8.2 9.10.1 9.12.2
getWallet 370.2 405.5 358.3 305.2
listTransactions 5294.6 5315.4 5680.8 5114.1
postTxFee 845.4 877.0 954.8 845.2
listAddresses 1386.1 1326.8 2097.5 1539.6

Verdict

Benchmark 9.6.6 9.8.2 9.10.1 9.12.2
Memory footprint better worse best (-7.5%)
Read-blocks worst good best
DB writes (UTxO) best worst good
DB reads (UTxO) best good worst (2x on 10k)
DB TxHistory write best worst (+11%)
DB TxHistory read best
API operations regressions best
Latency (typical) good good regressions best
Latency (massive) good good worst best

9.12.2 wins on memory, read-blocks, API, and latency. It has regressions on UTxO reads (2x on 10k) and heavy TxHistory writes (+11%) compared to 9.8.2, which are DB-bound workloads where the compiler difference may be magnified by serialization code.

Changes

  • nix/haskell.nix: ghc9101ghc9122, add -Wno-deriving-typeable, remove 3 Windows workarounds
  • nix/set-git-rev/nix/project.nix: ghc9101ghc9122
  • nix/rewrite-libs/nix/project.nix: ghc9101ghc9122
  • flake.nix: guard crypton-x509-system overlay with optionalAttrs
  • flake.lock: updated CHaP, removed stale ghc-8.6.5-iohk input
  • lib/faucet/lib/Cardano/Faucet/Types.hs: remove redundant deriving Typeable
  • cardano-wallet-application.cabal: version bound update

Closes #5164

@paolino paolino force-pushed the paolino/ghc-9.12.2 branch 2 times, most recently from 15977a0 to d8ab0e5 Compare February 12, 2026 12:16
@paolino paolino self-assigned this Feb 12, 2026
@paolino paolino added the GHC Compiler bumps label Feb 12, 2026
- Pin haskell.nix to cardano-node's version (ef52c36b)
- Update CHaP to latest (2026-02-12)
- Change compiler-nix-name from ghc9101 to ghc9122
- Widen base bound in cardano-wallet-application (<4.22)
- Remove deriving Typeable from Faucet.Types (GHC 9.12 error)
- Add -Wno-deriving-typeable to all project packages via nix module

Linux build passes: ci.tests.all
The haskell.nix module option for crypton-x509-system may not exist
in GHC 9.12 plans. Guard the overlay with an option existence check
to prevent evaluation failures on macOS.
GHC 9.12 fixes the iserv-proxy issues that required these workarounds:

- Remove cardano-addresses TH splice replacement (ByteCode.Asm panic fixed)
- Remove fgl ANN pragma stripping (iserv-proxy TH crash fixed)
- Remove -j1 global flag (parallel compilation works with 9.12 iserv-proxy)

Verified: Windows release build passes all checks including Wine-based
executable testing via check-bundle.rb.
Apply `f <$> (g <$> x)` → `(f . g) <$> x` transformation across
11 call sites in 8 files.
@paolino paolino merged commit d370ee5 into master Feb 12, 2026
59 checks passed
@paolino paolino deleted the paolino/ghc-9.12.2 branch February 12, 2026 17:06
github-actions Bot pushed a commit that referenced this pull request Feb 12, 2026
…9.10.1 to 9.12.2 for all platforms (native Linux, Windows cross-compilation, macOS) - Bump `set-git-rev` and `rewrite-libs` subsidiary tools from GHC 9.10.1 to 9.12.2 - Update CHaP and flake.lock inputs for 9.12.2 compatibility - Suppress `deriving Typeable` warnings (redundant in GHC 9.12, all types auto-derive Typeable) - Remove 3 GHC 9.10 Windows cross-compilation workarounds that are no longer needed - Guard `crypton-x509-system` overlay for macOS compatibility with GHC 9.12 ## Windows cross-compilation Windows cross-compilation builds and passes all checks locally: - `cardano-wallet.exe`, `cardano-node`, `cardano-cli`, `bech32`, `cardano-address` — all pass - All binaries confirmed statically linked - Release zip produced successfully - All 16 Windows test bundles built successfully ### Removed GHC 9.10 workarounds GHC 9.12 fixes several iserv-proxy issues that required workarounds for Windows cross-compilation: - **`cardano-addresses` TH splice hack** — GHC 9.10 had a `ByteCode.Asm panic (mallocStrings:spliceLit)` when cross-compiling TH splices; fixed in 9.12 - **`fgl` ANN pragma stripping** — `{-# ANN #-}` pragmas triggered iserv-proxy crashes; fixed in 9.12 - **`-j1` global flag** — iserv-proxy couldn't handle parallel module compilation; works in 9.12 The remaining Windows patches (`unix-compat`, `unix-time`, `crypton-x509-system`, `streaming-commons`) are genuine library compatibility fixes unrelated to GHC version. ## Subsidiary tools The subsidiary tools (`set-git-rev`, `rewrite-libs`) were previously pinned to GHC 9.10.1, which forced nix to compile a separate GHC from source. Bumping them to 9.12.2 allows reuse of the cached GHC 9.12.2 compiler (11 derivations → 3). ## Linux benchmarks comparison (9.6.6 → 9.8.2 → 9.10.1 → 9.12.2) Runs: [9.6.6](https://github.com/cardano-foundation/cardano-wallet/actions/runs/21914025608) (master pre-bump) · [9.8.2](https://github.com/cardano-foundation/cardano-wallet/actions/runs/21914955047) · [9.10.1](https://github.com/cardano-foundation/cardano-wallet/actions/runs/21941654279) (master post-merge) · [9.12.2](https://github.com/cardano-foundation/cardano-wallet/actions/runs/21949393997) ### Memory (RSS at startup) | GHC | KB | vs 9.6.6 | |-----|-----|----------| | 9.6.6 | 64,336 | baseline | | 9.8.2 | 61,860 | -3.8% | | 9.10.1 | 65,140 | +1.2% | | **9.12.2** | **59,532** | **-7.5%** | ### Read-blocks (ms, lower = better) | Blocks | 9.6.6 | 9.8.2 | 9.10.1 | 9.12.2 | |--------|-------|-------|--------|--------| | 10 | 0.493 | 0.447 | 0.491 | **0.415** | | 100 | 5.20 | 4.67 | 4.95 | **4.41** | | 1,000 | 58.7 | 51.3 | 54.8 | **48.9** | | 10,000 | 620 | **529** | 608 | 551 | ### DB — UTxO Write (seconds) | Workload | 9.6.6 | 9.8.2 | 9.10.1 | 9.12.2 | |----------|-------|-------|--------|--------| | 100k ada-only | 0.738 | **0.695** | 0.799 | 0.747 | | 10k 10-assets | 0.757 | **0.750** | 0.908 | 0.777 | | 10k 20-assets | 1.469 | **1.393** | 1.594 | 1.455 | ### DB — UTxO Read (seconds) | Workload | 9.6.6 | 9.8.2 | 9.10.1 | 9.12.2 | |----------|-------|-------|--------|--------| | 10k ada-only | **0.000297** | 0.000312 | 0.000335 | 0.000645 | | 100k ada-only | **0.00274** | 0.00294 | 0.00379 | 0.00336 | ⚠️ 9.12.2 shows a 2x regression on 10k UTxO reads (0.645ms vs 0.297ms baseline). Tracked in #5170. ### DB — TxHistory Write (seconds, heavy workloads) | Workload | 9.6.6 | 9.8.2 | 9.10.1 | 9.12.2 | |----------|-------|-------|--------|--------| | 1000 50i+100o (run 3) | 61.6 | **59.4** | 63.4 | 66.1 | | 10000 10i+10o | 6.85 | **6.70** | 7.19 | 7.47 | ### DB — TxHistory Read (seconds) | Workload | 9.6.6 | 9.8.2 | 9.10.1 | 9.12.2 | |----------|-------|-------|--------|--------| | 1000 DESC cabal.project CODE-OF-CONDUCT.md configs CONTRIBUTING.md docker-compose.yml docs flake.lock flake.nix floskell.json fourmolu.yaml hie-direnv.yaml justfile lib LICENSE MAINTAINERS.md nix prototypes README.md reports run scripts SECURITY.md specifications touch.me.CI weeder.dhall | 2.47 | 2.44 | 2.41 | **2.38** | | 10k DESC 42..1337 | 3.81 | 3.80 | 3.76 | **3.64** | | 10k DESC 40..60 | 7.69 | 7.68 | 7.50 | **7.35** | ### API Benchmark (seconds) | Operation | 9.6.6 | 9.8.2 | 9.10.1 | 9.12.2 | |-----------|-------|-------|--------|--------| | Shelley postTx | 0.306 | 0.302 | 0.348 | **0.291** | | Shared listTx | 0.141 | 0.141 | 0.166 | **0.125** | | Byron listTx | 0.296 | 0.264 | 0.277 | **0.242** | | Byron postTx | 0.275 | 0.273 | 0.284 | **0.252** | ### Latency — 2-fixture baseline (ms) | Operation | 9.6.6 | 9.8.2 | 9.10.1 | 9.12.2 | |-----------|-------|-------|--------|--------| | postTransaction | 130.7 | 138.8 | 132.6 | **127.9** | | postTxFee | 20.0 | **18.9** | 25.3 | 19.3 | | listStakePools | 44.3 | 54.3 | 59.0 | **43.1** | ### Latency — Massive UTxOs stress test (ms) | Operation | 9.6.6 | 9.8.2 | 9.10.1 | 9.12.2 | |-----------|-------|-------|--------|--------| | getWallet | 370.2 | 405.5 | 358.3 | **305.2** | | listTransactions | 5294.6 | 5315.4 | 5680.8 | **5114.1** | | postTxFee | 845.4 | 877.0 | 954.8 | **845.2** | | listAddresses | 1386.1 | **1326.8** | 2097.5 | 1539.6 | ### Verdict | Benchmark | 9.6.6 | 9.8.2 | 9.10.1 | 9.12.2 | |-----------|-------|-------|--------|--------| | Memory footprint | — | better | worse | **best** (-7.5%) | | Read-blocks | worst | good | — | **best** | | DB writes (UTxO) | — | **best** | worst | good | | DB reads (UTxO) | **best** | good | — | worst (2x on 10k) | | DB TxHistory write | — | **best** | — | worst (+11%) | | DB TxHistory read | — | — | — | **best** | | API operations | — | — | regressions | **best** | | Latency (typical) | good | good | regressions | **best** | | Latency (massive) | good | good | worst | **best** | **9.12.2** wins on memory, read-blocks, API, and latency. It has regressions on UTxO reads (2x on 10k) and heavy TxHistory writes (+11%) compared to 9.8.2, which are DB-bound workloads where the compiler difference may be magnified by serialization code. ## Changes - `nix/haskell.nix`: `ghc9101` → `ghc9122`, add `-Wno-deriving-typeable`, remove 3 Windows workarounds - `nix/set-git-rev/nix/project.nix`: `ghc9101` → `ghc9122` - `nix/rewrite-libs/nix/project.nix`: `ghc9101` → `ghc9122` - `flake.nix`: guard `crypton-x509-system` overlay with `optionalAttrs` - `flake.lock`: updated CHaP, removed stale `ghc-8.6.5-iohk` input - `lib/faucet/lib/Cardano/Faucet/Types.hs`: remove redundant `deriving Typeable` - `cardano-wallet-application.cabal`: version bound update Closes #5164 Source commit: d370ee5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GHC Compiler bumps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump set-git-rev to GHC 9.12.2

1 participant