Skip to content

Commit

Permalink
Merge #4144 #4168
Browse files Browse the repository at this point in the history
4144: Add support for CHaP and ghc-9.2 r=angerman a=erikd

Builds with both ghc-8.10 and ghc-9.2.

Currently uses a `source-package-repository` reference to a `cardano-ledger` PR that has not yet been merged.

4168: Pass ControlMessageSTM to keep-alive client r=coot a=coot

# Description

Fixes #4163.



Co-authored-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Co-authored-by: Marcin Szamotulski <coot@coot.me>
  • Loading branch information
3 people committed Nov 21, 2022
3 parents 832183c + 2214516 + 341b7d8 commit 4924411
Show file tree
Hide file tree
Showing 78 changed files with 213 additions and 228 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7"]
ghc: ["8.10.7", "9.2.5"]
os: [ubuntu-latest, windows-latest]

env:
Expand Down
95 changes: 49 additions & 46 deletions cabal.project
Expand Up @@ -13,9 +13,9 @@ repository cardano-haskell-packages
-- See CONTRIBUTING for some Nix commands you will need to run if you
-- update either of these.
-- Bump this if you need newer packages from Hackage
index-state: 2022-11-11T00:00:00Z
index-state: 2022-11-14T00:00:00Z
-- Bump this if you need newer packages from CHaP
index-state: cardano-haskell-packages 2022-11-12T00:00:00Z
index-state: cardano-haskell-packages 2022-11-15T00:00:00Z

packages: ./ouroboros-network-testing
./monoidal-synchronisation
Expand Down Expand Up @@ -81,52 +81,55 @@ constraints:
-- constraint from dependent-sum-template (which is the library we actually use).
, dependent-sum > 0.6.2.0
-- plutus-core: needs a constraint here, fixed on plutus master but not in the released version
, algebraic-graphs < 0.7
, algebraic-graphs >= 0.7

-- TODO: these should be set in cabal files, but avoiding setting them in lower dependencies for initial CHaP release
, cardano-prelude == 0.1.0.1
, base-deriving-via == 0.1.0.0
, cardano-binary == 1.5.0
, cardano-binary-test == 1.3.0
, cardano-crypto-class == 2.0.0.1
, cardano-crypto-praos == 2.0.0.0.1
, cardano-crypto-tests == 2.0.0.0.1
, cardano-slotting == 0.1.0.0
, measures == 0.1.0.0
, orphans-deriving-via == 0.1.0.0
, strict-containers == 0.1.0.0
, plutus-core == 1.0.0.1
, plutus-ledger-api == 1.0.0.1
, plutus-tx == 1.0.0.0
, plutus-tx-plugin == 1.0.0.0
, prettyprinter-configurable == 0.1.0.0
, plutus-ghc-stub == 8.6.5
, word-array == 0.1.0.0
, word-array == 0.1.0.0
, cardano-prelude >= 0.1.0.1
, base-deriving-via >= 0.1.0.0
, cardano-binary >= 1.5.0
, cardano-binary-test >= 1.3.0
, cardano-crypto-class >= 2.0.0.1
, cardano-crypto-praos >= 2.0.0.0.1
, cardano-crypto-tests >= 2.0.0.0.1
, cardano-slotting >= 0.1.0.0
, measures >= 0.1.0.0
, orphans-deriving-via >= 0.1.0.0
, strict-containers >= 0.1.0.0
, plutus-core >= 1.0.0.1
, plutus-ledger-api >= 1.0.0.1
, plutus-tx >= 1.0.0.0
, plutus-tx-plugin >= 1.0.0.0
, prettyprinter-configurable >= 0.1.0.0
, plutus-ghc-stub >= 8.6.5
, word-array >= 0.1.0.0
, word-array >= 0.1.0.0
, typed-protocols >= 0.1.0.1
, typed-protocols-examples >= 0.1.0.1

, cardano-ledger-alonzo == 0.1.1.1
, cardano-ledger-alonzo-test == 0.1.1.1
, cardano-ledger-babbage == 0.1.1.1
, cardano-ledger-babbage-test == 0.1.1.1
, byron-spec-chain == 0.1.1.1
, cardano-crypto-wrapper == 1.4.1
, cardano-crypto-test == 1.4.1
, byron-spec-ledger == 0.1.1.1
, cardano-ledger-byron == 0.1.1.1
, cardano-ledger-byron-test == 1.4.1
, cardano-ledger-conway == 0.1.1.1
, cardano-ledger-shelley-ma == 0.1.1.1
, cardano-ledger-shelley-ma-test == 0.1.1.1
, cardano-ledger-shelley == 0.1.1.1
, cardano-ledger-shelley-test == 0.1.1.1
, cardano-data == 0.1.1.1
, cardano-ledger-core == 0.1.1.1
, cardano-ledger-pretty == 0.1.1.1
, cardano-protocol-tpraos == 0.1.1.1
, non-integral == 0.1.1.1
, set-algebra == 0.1.1.1
, small-steps == 0.1.1.1
, small-steps-test == 0.1.1.1
, vector-map == 0.1.1.1
, cardano-ledger-alonzo ^>= 0.1.1.1
, cardano-ledger-alonzo-test ^>= 0.1.1.1
, cardano-ledger-babbage ^>= 0.1.1.1
, cardano-ledger-babbage-test ^>= 0.1.1.1
, byron-spec-chain ^>= 0.1.1.2
, cardano-crypto-wrapper ^>= 1.4.1
, cardano-crypto-test ^>= 1.4.2
, byron-spec-ledger ^>= 0.1.1.2
, cardano-ledger-byron ^>= 0.1.1.1
, cardano-ledger-byron-test ^>= 1.4.1
, cardano-ledger-conway ^>= 0.1.1.1
, cardano-ledger-shelley-ma ^>= 0.1.1.1
, cardano-ledger-shelley-ma-test ^>= 0.1.1.1
, cardano-ledger-shelley ^>= 0.1.1.1
, cardano-ledger-shelley-test ^>= 0.1.1.1
, cardano-data ^>= 0.1.1.1
, cardano-ledger-core ^>= 0.1.1.1
, cardano-ledger-pretty ^>= 0.1.1.1
, cardano-protocol-tpraos ^>= 0.1.1.1
, non-integral ^>= 0.1.1.1
, set-algebra ^>= 0.1.1.1
, small-steps ^>= 0.1.1.1
, small-steps-test ^>= 0.1.1.1
, vector-map ^>= 0.1.1.1

allow-newer:
Unique:hashable
2 changes: 1 addition & 1 deletion cardano-client/cardano-client.cabal
Expand Up @@ -19,7 +19,7 @@ library
exposed-modules: Cardano.Client.Subscription
default-language: Haskell2010
build-depends: base,
bytestring >=0.10 && <0.11,
bytestring >=0.10 && <0.12,
containers,
io-classes,
ouroboros-consensus,
Expand Down
2 changes: 1 addition & 1 deletion monoidal-synchronisation/monoidal-synchronisation.cabal
Expand Up @@ -26,7 +26,7 @@ extra-source-files: CHANGELOG.md

library
exposed-modules: Data.Monoid.Synchronisation
build-depends: base >=4.9 && <4.15
build-depends: base >=4.9 && <4.17
hs-source-dirs: src
default-language: Haskell2010
ghc-options: -rtsopts
Expand Down
6 changes: 3 additions & 3 deletions network-mux/network-mux.cabal
Expand Up @@ -42,7 +42,7 @@ common demo-deps
-Wredundant-constraints

library
build-depends: base >=4.9 && <4.15,
build-depends: base >=4.9 && <4.17,
io-classes ^>=0.3,
strict-stm ^>=0.2,
contra-tracer >=0.1 && <0.2,
Expand All @@ -51,7 +51,7 @@ library

array >=0.5 && <0.6,
binary >=0.8 && <0.11,
bytestring >=0.10 && <0.11,
bytestring >=0.10 && <0.12,
containers >=0.5 && <0.7,
-- The Windows version of network-3.1.2 is missing
-- functions, see
Expand All @@ -61,7 +61,7 @@ library
statistics-linreg
>=0.3 && <0.4,
vector >=0.12 && <0.13,
time >=1.9.1 && <1.11,
time >=1.9.1 && <1.14,
quiet

if os(windows)
Expand Down
4 changes: 1 addition & 3 deletions network-mux/src/Network/Mux.hs
Expand Up @@ -196,7 +196,6 @@ data MuxGroup = MuxJob
--
runMux :: forall m mode.
( MonadAsync m
, MonadCatch m
, MonadFork m
, MonadLabelledSTM m
, MonadThrow (STM m)
Expand Down Expand Up @@ -343,8 +342,7 @@ newtype MonitorCtx m mode = MonitorCtx {
-- incoming message arrives.
--
monitor :: forall mode m.
( MonadSTM m
, MonadAsync m
( MonadAsync m
, MonadMask m
, MonadThrow (STM m)
)
Expand Down
6 changes: 2 additions & 4 deletions network-mux/src/Network/Mux/Bearer/AttenuatedChannel.hs
Expand Up @@ -101,8 +101,7 @@ writeQueueChannel QueueChannel { qcWrite, qcRead } msg =
return True


newConnectedQueueChannelPair :: ( MonadSTM m
, MonadLabelledSTM m
newConnectedQueueChannelPair :: ( MonadLabelledSTM m
)
=> STM m ( QueueChannel m
, QueueChannel m )
Expand Down Expand Up @@ -157,8 +156,7 @@ data Attenuation = Attenuation {
-- | Make a 'AttenuatedChannel' from a 'QueueChannel'.
--
newAttenuatedChannel :: forall m.
( MonadSTM m
, MonadTime m
( MonadTime m
, MonadTimer m
, MonadThrow m
, MonadThrow (STM m)
Expand Down
3 changes: 1 addition & 2 deletions network-mux/src/Network/Mux/Channel.hs
Expand Up @@ -209,8 +209,7 @@ channelEffect beforeSend afterRecv Channel{send, recv} =
-- This is intended for testing, as a crude approximation of network delays.
-- More accurate models along these lines are of course possible.
--
delayChannel :: ( MonadSTM m
, MonadTimer m
delayChannel :: ( MonadTimer m
)
=> DiffTime
-> Channel m
Expand Down
18 changes: 9 additions & 9 deletions nix/sources.json
Expand Up @@ -5,10 +5,10 @@
"homepage": "https://input-output-hk.github.io/cardano-haskell-packages/",
"owner": "input-output-hk",
"repo": "cardano-haskell-packages",
"rev": "316e0a626fed1a928e659c7fc2577c7773770f7f",
"sha256": "0fnx5parp8900dn40w59rrdagzljfbkzfvzgwrikcr7l2vvpc9s4",
"rev": "7ba66a729344ced7636a419c99ddaba35d3f0b8f",
"sha256": "0rghfajk8klcymxqcw53k7k4d3xqgza2bhl9pg2yay89yb7g5ir5",
"type": "tarball",
"url": "https://github.com/input-output-hk/cardano-haskell-packages/archive/316e0a626fed1a928e659c7fc2577c7773770f7f.tar.gz",
"url": "https://github.com/input-output-hk/cardano-haskell-packages/archive/7ba66a729344ced7636a419c99ddaba35d3f0b8f.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"hackage.nix": {
Expand All @@ -17,10 +17,10 @@
"homepage": "",
"owner": "input-output-hk",
"repo": "hackage.nix",
"rev": "0801f3ab96ab5cfaf3e016e87e68be5ed00e7a70",
"sha256": "1cx28g8aif84br0sj8v4j7l11rq5chgxa0ipg2pgp9lkl7nbjjh0",
"rev": "10428b0a63b30782f26b1e01d6c3d383db75ae43",
"sha256": "0pz8lxbp5vzl73r6w4rb7ns5k6rpjbsh1j8wx0rq84jlijazlnmc",
"type": "tarball",
"url": "https://github.com/input-output-hk/hackage.nix/archive/0801f3ab96ab5cfaf3e016e87e68be5ed00e7a70.tar.gz",
"url": "https://github.com/input-output-hk/hackage.nix/archive/10428b0a63b30782f26b1e01d6c3d383db75ae43.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"version": "b3c99d7f13df89a9a918c835ecb7114098912962"
},
Expand All @@ -30,10 +30,10 @@
"homepage": "https://input-output-hk.github.io/haskell.nix",
"owner": "input-output-hk",
"repo": "haskell.nix",
"rev": "cfb4563df856057807c3b7b879104701f2740070",
"sha256": "1wi8ikdj3flfp09d87wb569ag0f46kdr5i7w4kvbz0rnwczgwnnd",
"rev": "cbf1e918b6e278a81c385155605b8504e498efef",
"sha256": "1dc9h10ads7krj4izp79d1nilyli9z34hdxayqrs82dfdv7fqyqp",
"type": "tarball",
"url": "https://github.com/input-output-hk/haskell.nix/archive/cfb4563df856057807c3b7b879104701f2740070.tar.gz",
"url": "https://github.com/input-output-hk/haskell.nix/archive/cbf1e918b6e278a81c385155605b8504e498efef.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"version": "962ecfed3a4fb656b5a91d89159291e00ed766bc"
},
Expand Down
12 changes: 6 additions & 6 deletions ntp-client/ntp-client.cabal
Expand Up @@ -19,13 +19,13 @@ library
other-modules: Network.NTP.Client.Packet
Network.NTP.Client.Query
build-depends: async >=2.2 && <2.3
, base >=4.9 && <4.15
, base >=4.9 && <4.17
, binary >=0.8 && <0.11
, bytestring >=0.10 && <0.11
, bytestring >=0.10 && <0.12
, contra-tracer >=0.1 && <0.2
, network >= 3.1.2 && <3.2
, stm >=2.4 && <2.6
, time >=1.9.1 && <1.11
, time >=1.9.1 && <1.14
, Win32-network >=0.1 && <0.2

hs-source-dirs: src
Expand All @@ -44,9 +44,9 @@ test-suite test
main-is: Test.hs
other-modules: Network.NTP.Client.Packet
type: exitcode-stdio-1.0
build-depends: base >=4.9 && <4.15
build-depends: base >=4.9 && <4.17
, binary >=0.8 && <0.11
, time >=1.9.1 && <1.11
, time >=1.9.1 && <1.14
, QuickCheck
, tasty
, tasty-quickcheck
Expand All @@ -61,7 +61,7 @@ executable demo-ntp-client
else
buildable: False
build-depends: async >=2.2 && <2.3
, base >=4.9 && <4.15
, base >=4.9 && <4.17
, contra-tracer >=0.1 && <0.2
, Win32-network >=0.1 && <0.2
, ntp-client
Expand Down
Expand Up @@ -33,8 +33,8 @@ library
Test.ThreadNet.Infra.Byron.TrackUpdates
Test.ThreadNet.TxGen.Byron

build-depends: base >=4.9 && <4.15
, bytestring >=0.10 && <0.11
build-depends: base >=4.9 && <4.17
, bytestring >=0.10 && <0.12
, cardano-binary
, cardano-crypto-class
, cardano-crypto-test
Expand Down
8 changes: 4 additions & 4 deletions ouroboros-consensus-byron/ouroboros-consensus-byron.cabal
Expand Up @@ -46,8 +46,8 @@ library
Ouroboros.Consensus.Byron.Node.Serialisation
Ouroboros.Consensus.Byron.Protocol

build-depends: base >=4.9 && <4.15
, bytestring >=0.10 && <0.11
build-depends: base >=4.9 && <4.17
, bytestring >=0.10 && <0.12
, cardano-binary
, cardano-crypto
, cardano-crypto-class
Expand All @@ -57,8 +57,8 @@ library
, cardano-slotting
, cborg >=0.2.2 && <0.3
, containers >=0.5 && <0.7
, cryptonite >=0.25 && <0.28
, formatting >=6.3 && <6.4
, cryptonite >=0.25 && <0.31
, formatting >=6.3 && <7.2
, mtl >=2.2 && <2.3
, serialise >=0.2 && <0.3
, nothunks
Expand Down
Expand Up @@ -18,7 +18,6 @@ import qualified Data.ByteString.Lazy as Lazy
import qualified Data.ByteString.Short as Short

import Cardano.Binary
import Cardano.Prelude (cborError)

import qualified Cardano.Chain.Block as CC
import qualified Cardano.Chain.Byron.API as CC
Expand Down
Expand Up @@ -33,7 +33,7 @@ library
Ouroboros.Consensus.ByronSpec.Ledger.Orphans
Ouroboros.Consensus.ByronSpec.Ledger.Rules

build-depends: base >=4.9 && <4.15
build-depends: base >=4.9 && <4.17
, bimap >=0.4 && <0.5
, cardano-binary
, cardano-ledger-byron-test
Expand Down
4 changes: 4 additions & 0 deletions ouroboros-consensus-cardano-tools/app/DBAnalyser/Parsers.hs
@@ -1,8 +1,12 @@
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE CPP #-}

module DBAnalyser.Parsers (parseCmdLine) where

#if __GLASGOW_HASKELL__ < 900
-- GHC 8.10 needs this, GHC 9.2 considers it a redundant import.
import Data.Foldable (asum)
#endif
import Options.Applicative

import Cardano.Crypto (RequiresNetworkMagic (..))
Expand Down
4 changes: 2 additions & 2 deletions ouroboros-consensus-cardano/ouroboros-consensus-cardano.cabal
Expand Up @@ -32,8 +32,8 @@ library
Ouroboros.Consensus.Cardano.Node
Ouroboros.Consensus.Cardano.ShelleyBased

build-depends: base >=4.9 && <4.15
, bytestring >=0.10 && <0.11
build-depends: base >=4.9 && <4.17
, bytestring >=0.10 && <0.12
, cborg >=0.2.2 && <0.3
, containers >=0.5 && <0.7
, mtl >=2.2 && <2.3
Expand Down
Expand Up @@ -27,8 +27,8 @@ library
Test.ThreadNet.Util.HasCreator.Mock
Test.ThreadNet.Util.SimpleBlock

build-depends: base >=4.9 && <4.15
, bytestring >=0.10 && <0.11
build-depends: base >=4.9 && <4.17
, bytestring >=0.10 && <0.12
, cardano-crypto-class
, containers >=0.5 && <0.7
, serialise >=0.2 && <0.3
Expand Down
4 changes: 2 additions & 2 deletions ouroboros-consensus-mock/ouroboros-consensus-mock.cabal
Expand Up @@ -47,9 +47,9 @@ library
Ouroboros.Consensus.Mock.Protocol.LeaderSchedule
Ouroboros.Consensus.Mock.Protocol.Praos

build-depends: base >=4.9 && <4.15
build-depends: base >=4.9 && <4.17
, bimap >=0.4 && <0.5
, bytestring >=0.10 && <0.11
, bytestring >=0.10 && <0.12
, cardano-binary
, cardano-crypto-class
, cardano-slotting
Expand Down
@@ -1,6 +1,7 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
Expand Down

0 comments on commit 4924411

Please sign in to comment.