Skip to content

Commit

Permalink
Bump aeson to 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed Oct 31, 2023
1 parent 8e6f524 commit 1768fdd
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 13 deletions.
25 changes: 25 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,31 @@ test-show-details: direct
-- Always write GHC env files, because they are needed for ghci.
write-ghc-environment-files: always

-- TODO make a PR into consensus and bump this
allow-newer:
, ouroboros-consensus:vector

-- IMPORTANT
-- Do NOT add more source-repository-package stanzas here unless they are strictly
-- temporary! Please read the section in CONTRIBUTING about updating dependencies.

source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger.git
tag: f5c0488abc90a94c8677e2d467e8ffeff719e34d
subdir:
eras/allegra/impl
eras/alonzo/impl
eras/alonzo/test-suite
eras/babbage/impl
eras/babbage/test-suite
eras/conway/impl
eras/conway/test-suite
eras/mary/impl
eras/shelley-ma/test-suite
eras/shelley/impl
eras/shelley/test-suite
libs/cardano-data
libs/cardano-ledger-api
libs/cardano-ledger-binary
libs/cardano-ledger-core
20 changes: 10 additions & 10 deletions cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ library internal
-- in this module
Cardano.Api.Orphans

build-depends: aeson >= 1.5.6.0
build-depends: aeson >= 2.2
, aeson-pretty >= 0.8.5
, attoparsec
, base16-bytestring >= 1.0
Expand All @@ -146,9 +146,9 @@ library internal
, bytestring
, cardano-binary
, cardano-crypto
, cardano-crypto-class ^>= 2.1.2
, cardano-crypto-class ^>= 2.1.4
, cardano-crypto-wrapper ^>= 1.5
, cardano-data >= 1.0
, cardano-data >= 1.1
, cardano-ledger-alonzo >= 1.5.0
, cardano-ledger-allegra >= 1.2.3.1
, cardano-ledger-api ^>= 1.7
Expand Down Expand Up @@ -229,7 +229,7 @@ library
, cardano-api:internal
, cardano-binary
, cardano-crypto
, cardano-crypto-class ^>= 2.1.2
, cardano-crypto-class ^>= 2.1.4
, cryptonite
, deepseq
, memory
Expand All @@ -253,13 +253,13 @@ library gen
Test.Hedgehog.Roundtrip.Bech32
Test.Hedgehog.Roundtrip.CBOR

build-depends: aeson >= 1.5.6.0
build-depends: aeson >= 2.2
, base16-bytestring
, bytestring
, cardano-api
, cardano-api:internal
, cardano-binary >= 1.6 && < 1.8
, cardano-crypto-class ^>= 2.1.2
, cardano-crypto-class ^>= 2.1.4
, cardano-crypto-test ^>= 1.5
, cardano-ledger-alonzo:{cardano-ledger-alonzo, testlib} >= 1.5.0
, cardano-ledger-byron-test >= 1.5
Expand All @@ -282,13 +282,13 @@ test-suite cardano-api-test
main-is: cardano-api-test.hs
type: exitcode-stdio-1.0

build-depends: aeson >= 1.5.6.0
build-depends: aeson >= 2.2
, bytestring
, cardano-api
, cardano-api:gen
, cardano-api:internal
, cardano-crypto
, cardano-crypto-class ^>= 2.1.2
, cardano-crypto-class ^>= 2.1.4
, cardano-crypto-test ^>= 1.5
, cardano-crypto-tests ^>= 2.1
, cardano-ledger-api ^>= 1.7
Expand Down Expand Up @@ -337,8 +337,8 @@ test-suite cardano-api-golden
, cardano-api
, cardano-api:gen
, cardano-binary
, cardano-crypto-class ^>= 2.1.2
, cardano-data >= 1.0
, cardano-crypto-class ^>= 2.1.4
, cardano-data >= 1.1
, cardano-ledger-alonzo
, cardano-ledger-api ^>= 1.7
, cardano-ledger-core:{cardano-ledger-core, testlib} >= 1.8
Expand Down
4 changes: 2 additions & 2 deletions cardano-api/internal/Cardano/Api/Orphans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ instance Crypto.Crypto crypto => ToJSON (Consensus.StakeSnapshots crypto) where
toJSON = object . stakeSnapshotsToPair
toEncoding = pairs . mconcat . stakeSnapshotsToPair

stakeSnapshotsToPair :: (Aeson.KeyValue a, Crypto.Crypto crypto) => Consensus.StakeSnapshots crypto -> [a]
stakeSnapshotsToPair :: (Aeson.KeyValue e a, Crypto.Crypto crypto) => Consensus.StakeSnapshots crypto -> [a]
stakeSnapshotsToPair Consensus.StakeSnapshots
{ Consensus.ssStakeSnapshots
, Consensus.ssMarkTotal
Expand All @@ -82,7 +82,7 @@ instance ToJSON (Consensus.StakeSnapshot crypto) where
toJSON = object . stakeSnapshotToPair
toEncoding = pairs . mconcat . stakeSnapshotToPair

stakeSnapshotToPair :: Aeson.KeyValue a => Consensus.StakeSnapshot crypto -> [a]
stakeSnapshotToPair :: Aeson.KeyValue e a => Consensus.StakeSnapshot crypto -> [a]
stakeSnapshotToPair Consensus.StakeSnapshot
{ Consensus.ssMarkPool
, Consensus.ssSetPool
Expand Down
2 changes: 1 addition & 1 deletion cardano-api/internal/Cardano/Api/Query/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ instance IsShelleyBasedEra era => ToJSON (DebugLedgerState era) where
Aeson.pairs . mconcat . toDebugLedgerStatePair sbe

toDebugLedgerStatePair :: ()
=> Aeson.KeyValue a
=> Aeson.KeyValue e a
=> ShelleyBasedEra era
-> DebugLedgerState era
-> [a]
Expand Down

0 comments on commit 1768fdd

Please sign in to comment.