Skip to content

Bump GHC to version 9.8.4#5093

Open
paolino wants to merge 76 commits intomasterfrom
paolino/ghc-9.8.4
Open

Bump GHC to version 9.8.4#5093
paolino wants to merge 76 commits intomasterfrom
paolino/ghc-9.8.4

Conversation

@paolino
Copy link
Collaborator

@paolino paolino commented Feb 4, 2026

Summary

  • Bump GHC from 9.6.6 to 9.8.4
  • Update dependencies for cardano-node 10.6.1 compatibility
  • Replace partial functions (head/tail) with safe alternatives
  • Migrate deprecated Cardano Ledger imports
  • Add DuplicateRecordFields extension where needed

Supersedes #4930

@paolino paolino force-pushed the paolino/ghc-9.8.4 branch 3 times, most recently from af4d113 to 0e10cf5 Compare February 4, 2026 16:56
paolino and others added 27 commits February 4, 2026 17:05
update sha

restrict more precisely other cabals

update indices in cabal.project

point to master in cardano-addresses

update sha

cleanup
restrain more
Move the cardano-wallet-read package from an external source-repository-package
dependency to a local lib/ package for easier dependency management.
- Update index-state to 2026-02-02
- Constrain bytesmith < 0.3.14 (0.3.14.0 has text-2.x API incompatibility)
- Align ledger/consensus/network package versions with freeze file
- Add allow-newer for io-classes version conflicts
- Disable hoogle in nix shell (bytesmith dependency issue)
- asn1-encoding -> crypton-asn1-encoding
- asn1-types -> crypton-asn1-types
- hourglass -> time-hourglass

Required for type compatibility with crypton-x509 packages.
The new cardano-api returns TxMetadataTextTooLong instead of the
previous user-friendly error message format.
Scripts in decoded transactions can have key hashes with any prefix
(addr_vkh, stake_vkh, etc.), not just shared wallet prefixes. This
creates a separate ScriptValueGeneral schema that allows all key hash
prefixes, used specifically for AnyExplicitScript in witness_count.

The original ScriptValue remains restrictive to avoid oneOf overlap
with CredentialValue in ApiAddressData.
…t hangs

The previous Arbitrary instance could generate EpochLength values up to
maxBound (4 billion) combined with epoch numbers up to 1000, causing
flatSlot to return trillions. Tests using applyN (flatSlot slot) would
hang indefinitely.

Now constrains EpochLength to 1-1000 and bounds epoch number so flatSlot
stays under ~10000 iterations.
Replace nix flake check with direct test execution to prevent OOM.
Each test suite runs with +RTS -M2G to cap heap at 2GB.
- Use YAML anchors to reduce repetition for common step config
- Replace single nix check with 16 parallel cabal test steps per platform
- Each test runs with +RTS -M2G to cap heap at 2GB
- Applies to both Linux and macOS
- Add unit-* package exports to flake.nix for direct test execution
- Split cardano-wallet-unit into 10 parallel CI steps by module prefix
- Use nix run instead of nix develop for lighter test execution
- Run tests with -j1 to prevent parallel memory exhaustion
GHC 9.8.4 warns about head/tail as partial functions.
Replace tail with drop 1 and head with explicit pattern matching.
GHC 9.8.4 warns about head as a partial function.
GHC 9.8.4 warns about head as a partial function.
GHC 9.8.4 requires this extension when exporting types
with duplicate field names.
GHC 9.8.4 warns about head/tail as partial functions.
Also remove Ord from TxChange since TokenMap doesn't support Ord.
Replace head with pattern matching or safe alternatives in:
- SlottingSpec.hs
- RangeSpec.hs
- Discovery.hs
- Add DuplicateRecordFields to Cardano.Write.Tx
- Replace partial functions in CommandLine.hs and BalanceSpec.hs
Replace head with pattern matching or safe alternatives in:
- db-bench.hs (benchmark labels)
- Integration tests: Byron/Migrations, Shared/Transactions,
  Shared/Wallets, Shelley/Addresses, Shelley/Migrations,
  Shelley/StakePools, Shelley/Transactions, Shelley/TransactionsNew,
  Shelley/Wallets
Replace head/tail partial functions with pattern matching or NonEmpty
alternatives in test files to avoid -Wx-partial warnings becoming errors
with -Werror.
HLS 2.9.0.0 doesn't support GHC 9.8.4. Update tools index-state
to 2026-01-20 to get HLS 2.13.0.0 which has GHC 9.8.4 support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants