From 83295258131d590a3a351294d432d1b183b43459 Mon Sep 17 00:00:00 2001 From: Pablo Lamela Date: Wed, 30 Oct 2024 16:16:36 +0100 Subject: [PATCH] Remove transitive dependencies to `ouroboros-consensus` --- cardano-cli/cardano-cli.cabal | 1 - cardano-cli/src/Cardano/CLI/Byron/UpdateProposal.hs | 3 +-- cardano-cli/src/Cardano/CLI/Byron/Vote.hs | 3 +-- cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs | 3 +-- cardano-cli/src/Cardano/CLI/Types/Errors/QueryCmdError.hs | 5 ++--- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/cardano-cli/cardano-cli.cabal b/cardano-cli/cardano-cli.cabal index efb2a57019..c920646133 100644 --- a/cardano-cli/cardano-cli.cabal +++ b/cardano-cli/cardano-cli.cabal @@ -233,7 +233,6 @@ library network, network-uri, optparse-applicative-fork, - ouroboros-consensus ^>=0.21, parsec, prettyprinter, prettyprinter-ansi-terminal, diff --git a/cardano-cli/src/Cardano/CLI/Byron/UpdateProposal.hs b/cardano-cli/src/Cardano/CLI/Byron/UpdateProposal.hs index cc874b277b..e8460df40b 100644 --- a/cardano-cli/src/Cardano/CLI/Byron/UpdateProposal.hs +++ b/cardano-cli/src/Cardano/CLI/Byron/UpdateProposal.hs @@ -15,14 +15,13 @@ import Cardano.Api import Cardano.Api.Byron (AsType (AsByronUpdateProposal), ByronProtocolParametersUpdate, ByronUpdateProposal, makeByronUpdateProposal, toByronLedgerUpdateProposal) import qualified Cardano.Api.Byron as Byron +import Cardano.Api.Consensus (condense, txId) import Cardano.CLI.Byron.Genesis (ByronGenesisError) import Cardano.CLI.Byron.Key (ByronKeyFailure, readByronSigningKey) import Cardano.CLI.Byron.Tx (ByronTxError, nodeSubmitTx) import Cardano.CLI.Helpers (HelpersError, ensureNewFileLBS, renderHelpersError) import Cardano.CLI.Types.Common -import Ouroboros.Consensus.Ledger.SupportsMempool (txId) -import Ouroboros.Consensus.Util.Condense (condense) import Control.Exception (Exception (..)) import Control.Tracer (stdoutTracer, traceWith) diff --git a/cardano-cli/src/Cardano/CLI/Byron/Vote.hs b/cardano-cli/src/Cardano/CLI/Byron/Vote.hs index e83bfc4cad..3f0ed42528 100644 --- a/cardano-cli/src/Cardano/CLI/Byron/Vote.hs +++ b/cardano-cli/src/Cardano/CLI/Byron/Vote.hs @@ -12,6 +12,7 @@ module Cardano.CLI.Byron.Vote where import Cardano.Api.Byron +import Cardano.Api.Consensus (condense, txId) import qualified Cardano.Binary as Binary import Cardano.CLI.Byron.Genesis (ByronGenesisError) @@ -21,8 +22,6 @@ import Cardano.CLI.Byron.UpdateProposal (ByronUpdateProposalError, readByronUpdateProposal) import Cardano.CLI.Helpers (HelpersError, ensureNewFileLBS) import Cardano.CLI.Types.Common -import Ouroboros.Consensus.Ledger.SupportsMempool (txId) -import Ouroboros.Consensus.Util.Condense (condense) import Control.Tracer (stdoutTracer, traceWith) import Data.Bifunctor (first) diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs index e061778081..20b5932970 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Query.hs @@ -59,8 +59,7 @@ import qualified Cardano.CLI.Types.Output as O import Cardano.Crypto.Hash (hashToBytesAsHex) import qualified Cardano.Crypto.Hash.Blake2b as Blake2b import Cardano.Slotting.EpochInfo (EpochInfo (..), epochInfoSlotToUTCTime, hoistEpochInfo) -import Ouroboros.Consensus.BlockchainTime.WallClock.Types (RelativeTime (..), - toRelativeTime) +import Cardano.Slotting.Time (RelativeTime (..), toRelativeTime) import Control.Monad (forM, forM_, join) import Data.Aeson as Aeson diff --git a/cardano-cli/src/Cardano/CLI/Types/Errors/QueryCmdError.hs b/cardano-cli/src/Cardano/CLI/Types/Errors/QueryCmdError.hs index ca023fe928..c271d53858 100644 --- a/cardano-cli/src/Cardano/CLI/Types/Errors/QueryCmdError.hs +++ b/cardano-cli/src/Cardano/CLI/Types/Errors/QueryCmdError.hs @@ -15,14 +15,13 @@ module Cardano.CLI.Types.Errors.QueryCmdError where import Cardano.Api hiding (QueryInShelleyBasedEra (..)) -import Cardano.Api.Consensus as Consensus (EraMismatch (..)) +import Cardano.Api.Consensus as Consensus (EraMismatch (..), PastHorizonException) import Cardano.Api.Shelley hiding (QueryInShelleyBasedEra (..)) import Cardano.Binary (DecoderError) import Cardano.CLI.Helpers (HelpersError (..), renderHelpersError) import Cardano.CLI.Types.Errors.GenesisCmdError import Cardano.CLI.Types.Errors.QueryCmdLocalStateQueryError -import qualified Ouroboros.Consensus.HardFork.History.Qry as Qry import qualified Data.ByteString.Lazy.Char8 as LBS import Data.Text.Lazy.Builder (toLazyText) @@ -39,7 +38,7 @@ data QueryCmdError | QueryCmdAcquireFailure !AcquiringFailure | QueryCmdByronEra | QueryCmdEraMismatch !EraMismatch - | QueryCmdPastHorizon !Qry.PastHorizonException + | QueryCmdPastHorizon !Consensus.PastHorizonException | QueryCmdSystemStartUnavailable | QueryCmdGenesisReadError !GenesisCmdError | QueryCmdLeaderShipError !LeadershipError