From 0e3065c74430c42c624b1cca22736b9bc258474d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Wed, 4 Dec 2024 13:13:55 +0100 Subject: [PATCH] Bump to cardano-api 10.5 Update to cardano-api 10.5 and Format Query.hs --- cabal.project | 4 +++- cardano-cli/cardano-cli.cabal | 2 +- cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs | 8 ++++---- flake.lock | 12 ++++++------ 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/cabal.project b/cabal.project index 153325bf20..c93bbe007f 100644 --- a/cabal.project +++ b/cabal.project @@ -14,7 +14,7 @@ repository cardano-haskell-packages -- you need to run if you change them index-state: , hackage.haskell.org 2024-10-11T15:49:11Z - , cardano-haskell-packages 2024-12-05T13:51:16Z + , cardano-haskell-packages 2024-12-19T20:16:27Z packages: cardano-cli @@ -57,3 +57,5 @@ write-ghc-environment-files: always -- IMPORTANT -- Do NOT add more source-repository-package stanzas here unless they are strictly -- temporary! Please read the section in CONTRIBUTING about updating dependencies. + + diff --git a/cardano-cli/cardano-cli.cabal b/cardano-cli/cardano-cli.cabal index 79406db539..a1be050e77 100644 --- a/cardano-cli/cardano-cli.cabal +++ b/cardano-cli/cardano-cli.cabal @@ -207,7 +207,7 @@ library binary, bytestring, canonical-json, - cardano-api ^>=10.4, + cardano-api ^>=10.5, cardano-binary, cardano-crypto, cardano-crypto-class ^>=2.1.2, diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs index 2f47ddb2ec..7da262dd35 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs @@ -752,8 +752,8 @@ runQueryRefScriptSizeCmd & onLeft left newtype RefInputScriptSize = RefInputScriptSize {refInputScriptSize :: Int} - deriving Generic - deriving anyclass ToJSON + deriving (Generic) + deriving anyclass (ToJSON) instance Pretty RefInputScriptSize where pretty (RefInputScriptSize s) = "Reference inputs scripts size is" <+> pretty s <+> "bytes." @@ -1345,7 +1345,6 @@ runQueryStakeDistributionCmd & onLeft (left . QueryCmdAcquireFailure) & onLeft left - writeStakeDistribution :: OutputFormatJsonOrText -> Maybe (File () Out) @@ -1955,7 +1954,8 @@ easyRunQuerySystemStart = lift querySystemStart & onLeft (left . QueryCmdUnsuppo easyRunQuery :: () => Monad m - => m (Either UnsupportedNtcVersionError (Either Consensus.EraMismatch a)) -> ExceptT QueryCmdError m a + => m (Either UnsupportedNtcVersionError (Either Consensus.EraMismatch a)) + -> ExceptT QueryCmdError m a easyRunQuery q = lift q & onLeft (left . QueryCmdUnsupportedNtcVersion) diff --git a/flake.lock b/flake.lock index 387c4a3a8c..36cd636869 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1733408643, - "narHash": "sha256-IH5nYTjx+CYAK4zQAkOs475X+AOhP/GPgwXm5LQHsEE=", + "lastModified": 1734652334, + "narHash": "sha256-zDJVC0/vTaZq+qs2nYlSCKh19PB0K0eAtJZvn4hRHAI=", "owner": "intersectmbo", "repo": "cardano-haskell-packages", - "rev": "e062328804c933d296e5956c989b326ea3c69eeb", + "rev": "94b36615fa8f5aaae885627273bc8499eeebdca5", "type": "github" }, "original": { @@ -173,11 +173,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1726446873, - "narHash": "sha256-dWdiphXwkk4qQVFkQHuUysphOb0XO8EHJlk/8Km/7q0=", + "lastModified": 1734654506, + "narHash": "sha256-SgplQORqa47IXvDB4zFZR9E1NKlmxCdWNNelR8vrWyo=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "3126b966be7409ebfd61c88f85dbfb6ec2a51338", + "rev": "8ed815a8ed276f89ebe980dd9919462d69da6458", "type": "github" }, "original": {