From 8369856310e558e37ce57c58461a2a2afbec6217 Mon Sep 17 00:00:00 2001 From: Jonathan Knowles Date: Thu, 19 Oct 2023 01:00:56 +0000 Subject: [PATCH] Support GHC 9.2.8. --- .../cardano-wallet-application-extras.cabal | 2 +- lib/crypto-hash-extra/crypto-hash-extra.cabal | 8 +-- .../iohk-monitoring-extra.cabal | 30 ++++----- lib/local-cluster/local-cluster.cabal | 64 +++++++++---------- lib/temporary-extra/temporary-extra.cabal | 2 +- lib/wallet-e2e/cardano-wallet-e2e.cabal | 58 ++++++++--------- .../src/Cardano/Wallet/Spec/Effect/Trace.hs | 1 + lib/wallet/bench/db-bench.hs | 1 + .../Scenario/API/Shelley/StakePools.hs | 1 + .../Scenario/API/Shelley/TransactionsNew.hs | 1 + nix/haskell.nix | 12 ++-- 11 files changed, 92 insertions(+), 88 deletions(-) diff --git a/lib/application-extras/cardano-wallet-application-extras.cabal b/lib/application-extras/cardano-wallet-application-extras.cabal index 695a2788a2c..70a8d8f7039 100644 --- a/lib/application-extras/cardano-wallet-application-extras.cabal +++ b/lib/application-extras/cardano-wallet-application-extras.cabal @@ -31,7 +31,7 @@ library hs-source-dirs: lib build-depends: - , base ^>=4.14.3.0 + , base >=4.14.3.0 , contra-tracer ^>=0.1.0.2 , iohk-monitoring ^>=0.1.11.3 , iohk-monitoring-extra ^>=0.1 diff --git a/lib/crypto-hash-extra/crypto-hash-extra.cabal b/lib/crypto-hash-extra/crypto-hash-extra.cabal index ea4d5304c39..dbf973db0be 100644 --- a/lib/crypto-hash-extra/crypto-hash-extra.cabal +++ b/lib/crypto-hash-extra/crypto-hash-extra.cabal @@ -26,7 +26,7 @@ library hs-source-dirs: src exposed-modules: Crypto.Hash.Extra build-depends: - , base ^>=4.14.3 - , bytestring ^>=0.10.12 - , cryptonite ^>=0.30 - , memory ^>=0.18 + , base >=4.14.3 + , bytestring >=0.10.12 + , cryptonite >=0.30 + , memory >=0.18 diff --git a/lib/iohk-monitoring-extra/iohk-monitoring-extra.cabal b/lib/iohk-monitoring-extra/iohk-monitoring-extra.cabal index 5fbf3c82df8..044a25b6024 100644 --- a/lib/iohk-monitoring-extra/iohk-monitoring-extra.cabal +++ b/lib/iohk-monitoring-extra/iohk-monitoring-extra.cabal @@ -27,18 +27,18 @@ library hs-source-dirs: src exposed-modules: Cardano.BM.Extra build-depends: - , aeson ^>=2.1.2.1 - , base ^>=4.14.3 - , bytestring ^>=0.10.12 - , contra-tracer ^>=0.1.0.2 - , deepseq ^>=1.4.4 - , exceptions ^>=0.10.4 - , fmt ^>=0.6.3 - , iohk-monitoring ^>=0.1.11.3 - , text ^>=1.2.4.1 - , text-class ^>=2023.7.18 - , time ^>=1.9.3 - , tracer-transformers ^>=0.1.0.4 - , transformers ^>=0.5.6.2 - , unliftio ^>=0.2.24 - , unliftio-core ^>=0.2.1 + , aeson >=2.1.2.1 + , base >=4.14.3 + , bytestring >=0.10.12 + , contra-tracer >=0.1.0.2 + , deepseq >=1.4.4 + , exceptions >=0.10.4 + , fmt >=0.6.3 + , iohk-monitoring >=0.1.11.3 + , text >=1.2.4.1 + , text-class >=2023.7.18 + , time >=1.9.3 + , tracer-transformers >=0.1.0.4 + , transformers >=0.5.6.2 + , unliftio >=0.2.24 + , unliftio-core >=0.2.1 diff --git a/lib/local-cluster/local-cluster.cabal b/lib/local-cluster/local-cluster.cabal index 55ac62846e5..5addf984432 100644 --- a/lib/local-cluster/local-cluster.cabal +++ b/lib/local-cluster/local-cluster.cabal @@ -53,19 +53,19 @@ library hs-source-dirs: lib build-depends: - , aeson ^>=2.1.2.1 - , aeson-qq ^>=0.8.4 + , aeson >=2.1.2.1 + , aeson-qq >=0.8.4 , base - , base58-bytestring ^>=0.1 - , bech32 ^>=1.1.2 + , base58-bytestring >=0.1 + , bech32 >=1.1.2 , bech32-th - , binary ^>=0.8.8 - , bytestring ^>=0.10.12 + , binary >=0.8.8 + , bytestring >=0.10.12 , cardano-addresses , cardano-api - , cardano-binary ^>=1.7.0.1 + , cardano-binary >=1.7.0.1 , cardano-cli - , cardano-crypto ^>=1.1.2 + , cardano-crypto >=1.1.2 , cardano-data , cardano-ledger-api , cardano-ledger-core @@ -74,39 +74,39 @@ library , cardano-wallet-launcher , cardano-wallet-primitive , cardano-wallet-test-utils - , cborg ^>=0.2.9 - , containers ^>=0.6.5 + , cborg >=0.2.9 + , containers >=0.6.5 , contra-tracer - , crypto-hash-extra ^>=0.1 - , cryptonite ^>=0.30 + , crypto-hash-extra >=0.1 + , cryptonite >=0.30 , directory - , extra ^>=1.7 + , extra >=1.7 , filepath - , generic-lens ^>=2.2.2 - , int-cast ^>=0.2 + , generic-lens >=2.2.2 + , int-cast >=0.2 , iohk-monitoring , iohk-monitoring-extra - , lens ^>=5.1.1 + , lens >=5.1.1 , lobemo-backend-ekg - , memory ^>=0.18 - , network-uri ^>=2.6.4.2 - , OddWord ^>=1.0.1 - , ouroboros-network ^>=0.8.1 - , ouroboros-network-api ^>=0.5 - , path ^>=0.9.2 - , path-io ^>=1.7.0 - , resourcet ^>=1.3 - , retry ^>=0.9.3.1 - , tagged ^>=0.8.7 - , temporary ^>=1.3 + , memory >=0.18 + , network-uri >=2.6.4.2 + , OddWord >=1.0.1 + , ouroboros-network >=0.8.1 + , ouroboros-network-api >=0.5 + , path >=0.9.2 + , path-io >=1.7.0 + , resourcet >=1.3 + , retry >=0.9.3.1 + , tagged >=0.8.7 + , temporary >=1.3 , temporary-extra , text , text-class - , time ^>=1.9.3 - , typed-process ^>=0.2.11 - , unliftio ^>=0.2 - , with-utf8 ^>=1.0.2.4 - , yaml ^>=0.11.11 + , time >=1.9.3 + , typed-process >=0.2.11 + , unliftio >=0.2 + , with-utf8 >=1.0.2.4 + , yaml >=0.11.11 executable local-cluster import: language, opts-exe diff --git a/lib/temporary-extra/temporary-extra.cabal b/lib/temporary-extra/temporary-extra.cabal index 9ba03de93e4..e255f1786d4 100644 --- a/lib/temporary-extra/temporary-extra.cabal +++ b/lib/temporary-extra/temporary-extra.cabal @@ -27,7 +27,7 @@ library hs-source-dirs: src exposed-modules: System.IO.Temp.Extra build-depends: - , base ^>=4.14.3.0 + , base >=4.14.3.0 , iohk-monitoring ^>=0.1.11.3 , iohk-monitoring-extra ^>=0.1 , temporary ^>=1.3 diff --git a/lib/wallet-e2e/cardano-wallet-e2e.cabal b/lib/wallet-e2e/cardano-wallet-e2e.cabal index 5c809767a82..d20520ed3e2 100644 --- a/lib/wallet-e2e/cardano-wallet-e2e.cabal +++ b/lib/wallet-e2e/cardano-wallet-e2e.cabal @@ -54,36 +54,36 @@ common options common dependencies build-depends: - , base ^>=4.14.3.0 - , path ^>=0.9.2 - , path-io ^>=1.7.0 - , relude ^>=1.2.0.0 - , sydtest ^>=0.15 - , text ^>=1.2.4.1 + , base >=4.14.3.0 + , path >=0.9.2 + , path-io >=1.7.0 + , relude >=1.2.0.0 + , sydtest >=0.15 + , text >=1.2.4.1 library import: options, dependencies hs-source-dirs: src build-depends: - , aeson ^>=2.1.2.1 - , base58-bytestring ^>=0.1 - , cardano-addresses ^>=3.12 - , cardano-crypto ^>=1.1.2 - , cardano-wallet-client ^>=0.1 - , effectful ^>=2.2.2.0 - , effectful-th ^>=1.0.0.1 - , http-client ^>=0.7.13.1 - , http-types ^>=0.12.3 - , local-cluster ^>=0.1 - , memory ^>=0.18 - , random ^>=1.2.1.1 - , resourcet ^>=1.3 - , retry ^>=0.9.3.1 - , scientific ^>=0.3.7 - , tagged ^>=0.8.7 - , time ^>=1.9.3 - , timespan ^>=0.4 - , typed-process ^>=0.2.11 + , aeson >=2.1.2.1 + , base58-bytestring >=0.1 + , cardano-addresses >=3.12 + , cardano-crypto >=1.1.2 + , cardano-wallet-client >=0.1 + , effectful >=2.2.2.0 + , effectful-th >=1.0.0.1 + , http-client >=0.7.13.1 + , http-types >=0.12.3 + , local-cluster >=0.1 + , memory >=0.18 + , random >=1.2.1.1 + , resourcet >=1.3 + , retry >=0.9.3.1 + , scientific >=0.3.7 + , tagged >=0.8.7 + , time >=1.9.3 + , timespan >=0.4 + , typed-process >=0.2.11 exposed-modules: Cardano.Wallet.Spec @@ -120,7 +120,7 @@ executable wallet-e2e ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends: , cardano-wallet-e2e - , optparse-applicative ^>=0.17.1 - , prettyprinter ^>=1.7.1 - , prettyprinter-ansi-terminal ^>=1.1.3 - , with-utf8 ^>=1.0.2.4 + , optparse-applicative >=0.17.1 + , prettyprinter >=1.7.1 + , prettyprinter-ansi-terminal >=1.1.3 + , with-utf8 >=1.0.2.4 diff --git a/lib/wallet-e2e/src/Cardano/Wallet/Spec/Effect/Trace.hs b/lib/wallet-e2e/src/Cardano/Wallet/Spec/Effect/Trace.hs index b4d5c0a72cd..c5dc6022b9c 100644 --- a/lib/wallet-e2e/src/Cardano/Wallet/Spec/Effect/Trace.hs +++ b/lib/wallet-e2e/src/Cardano/Wallet/Spec/Effect/Trace.hs @@ -35,6 +35,7 @@ import Path.IO import Prelude hiding ( modify , runState + , trace ) data FxTrace :: Effect where diff --git a/lib/wallet/bench/db-bench.hs b/lib/wallet/bench/db-bench.hs index 901796adb79..29edc546685 100644 --- a/lib/wallet/bench/db-bench.hs +++ b/lib/wallet/bench/db-bench.hs @@ -16,6 +16,7 @@ {-# OPTIONS_GHC -fno-warn-orphans #-} -- {-# OPTIONS_GHC -Wno-ambiguous-fields #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} +{-# OPTIONS_GHC -Wno-ambiguous-fields #-} -- | -- Copyright: © 2018-2020 IOHK diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs index 714543c5d78..5510636a42d 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/StakePools.hs @@ -9,6 +9,7 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Test.Integration.Scenario.API.Shelley.StakePools (spec) where diff --git a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/TransactionsNew.hs b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/TransactionsNew.hs index c601605f518..aaa00ad04a7 100644 --- a/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/TransactionsNew.hs +++ b/lib/wallet/integration/src/Test/Integration/Scenario/API/Shelley/TransactionsNew.hs @@ -13,6 +13,7 @@ {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wno-unused-imports #-} -- temportary, until addRequiredSigners is fixed +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} module Test.Integration.Scenario.API.Shelley.TransactionsNew (spec) where diff --git a/nix/haskell.nix b/nix/haskell.nix index 8ab941b24df..d95e77501fd 100644 --- a/nix/haskell.nix +++ b/nix/haskell.nix @@ -100,7 +100,7 @@ CHaP: haskell-nix: nixpkgs-recent: nodePkgs: haskell-nix.cabalProject' [ localClusterConfigs = config.src + /lib/local-cluster/test/data/cluster-configs; in { name = "cardano-wallet"; - compiler-nix-name = "ghc8107"; + compiler-nix-name = "ghc928"; src = haskellLib.cleanSourceWith { name = "cardano-wallet-src"; @@ -122,7 +122,7 @@ CHaP: haskell-nix: nixpkgs-recent: nodePkgs: haskell-nix.cabalProject' [ lentil = { index-state = indexState; }; weeder = { index-state = indexState; - version = "2.2.0"; + version = "2.4.0"; }; }; nativeBuildInputs = with buildProject.hsPkgs; [ @@ -145,11 +145,11 @@ CHaP: haskell-nix: nixpkgs-recent: nodePkgs: haskell-nix.cabalProject' [ yq nixWrapped mdbook - (haskell-nix.tool "ghc8107" "hp2pretty" "latest") - (haskell-nix.tool "ghc8107" "stylish-haskell" "0.11.0.3") - (haskell-nix.tool "ghc8107" "hlint" "3.3") + (haskell-nix.tool "ghc928" "hp2pretty" "latest") + (haskell-nix.tool "ghc928" "stylish-haskell" "0.14.5.0") + (haskell-nix.tool "ghc928" "hlint" "3.6.1") (haskell-nix.tool "ghc928" "fourmolu" "0.13.1.0") - (haskell-nix.tool "ghc8107" "haskell-language-server" ({pkgs, ...}: rec { + (haskell-nix.tool "ghc928" "haskell-language-server" ({pkgs, ...}: rec { # Use the github source of HLS that is tested with haskell.nix CI src = pkgs.haskell-nix.sources."hls-2.0"; # `tool` normally ignores the `cabal.project` (if there is one in the hackage source).