Skip to content

Commit

Permalink
Delete Cardano.CLI.Pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Oct 30, 2024
1 parent 41ca934 commit a0766b4
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 55 deletions.
3 changes: 1 addition & 2 deletions cardano-cli/app/cardano-cli.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#define UNIX
#endif

import Cardano.CLI.Pretty

import Cardano.Api
import Cardano.CLI.Environment (getEnvCli)
import Cardano.CLI.Options (opts, pref)
import Cardano.CLI.Run (renderClientCommandError, runClientCommand)
Expand Down
3 changes: 1 addition & 2 deletions cardano-cli/cardano-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ library
Cardano.CLI.Options.Ping
Cardano.CLI.Orphans
Cardano.CLI.Parser
Cardano.CLI.Pretty
Cardano.CLI.Read
Cardano.CLI.Render
Cardano.CLI.Run
Expand Down Expand Up @@ -261,6 +260,7 @@ executable cardano-cli
-with-rtsopts=-T

build-depends:
cardano-api,
cardano-cli,
cardano-crypto-class ^>=2.1.2,
optparse-applicative-fork,
Expand Down Expand Up @@ -395,7 +395,6 @@ test-suite cardano-cli-golden
tasty-hedgehog,
text,
time,
transformers,
unordered-containers,

build-tool-depends:
Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/src/Cardano/CLI/Byron/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ module Cardano.CLI.Byron.Genesis
)
where

import Cardano.Api (Key (..), NetworkId, writeSecrets)
import Cardano.Api (Doc, Key (..), NetworkId, pretty, pshow, writeSecrets)
import Cardano.Api.Byron (ByronKey, SerialiseAsRawBytes (..), SigningKey (..),
toByronRequiresNetworkMagic)
import qualified Cardano.Api.Byron as Byron

import Cardano.CLI.Byron.Delegation
import Cardano.CLI.Byron.Key
import Cardano.CLI.Pretty
import Cardano.CLI.Types.Common (GenesisFile (..))
import qualified Cardano.Crypto as Crypto
import Cardano.Prelude (canonicalDecodePretty, canonicalEncodePretty)

import Control.Monad.IO.Class
import Control.Monad.Trans (MonadTrans (..))
import Control.Monad.Trans.Except (ExceptT (..), withExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, left, right)
Expand Down
5 changes: 1 addition & 4 deletions cardano-cli/src/Cardano/CLI/Byron/UpdateProposal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Cardano.CLI.Byron.UpdateProposal
)
where

import Cardano.Api (NetworkId, SerialiseAsRawBytes (..), SocketPath)
import Cardano.Api
import Cardano.Api.Byron (AsType (AsByronUpdateProposal), ByronProtocolParametersUpdate,
ByronUpdateProposal, makeByronUpdateProposal, toByronLedgerUpdateProposal)
import qualified Cardano.Api.Byron as Byron
Expand All @@ -20,14 +20,11 @@ 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.Pretty
import Cardano.CLI.Types.Common
import Ouroboros.Consensus.Ledger.SupportsMempool (txId)
import Ouroboros.Consensus.Util.Condense (condense)

import Control.Exception (Exception (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (firstExceptT, handleIOExceptT, hoistEither)
import Control.Tracer (stdoutTracer, traceWith)
import Data.Bifunctor (Bifunctor (..))
import qualified Data.ByteString as BS
Expand Down
1 change: 0 additions & 1 deletion cardano-cli/src/Cardano/CLI/Commands.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import Cardano.CLI.Commands.Key
import Cardano.CLI.Commands.Node
import Cardano.CLI.Commands.Ping (PingCmd (..))
import Cardano.CLI.Compatible.Commands
import Cardano.CLI.EraBased.Commands
import Cardano.CLI.EraBased.Commands.Query
import Cardano.CLI.EraBased.Commands.TopLevelCommands
import Cardano.CLI.Legacy.Commands
Expand Down
6 changes: 1 addition & 5 deletions cardano-cli/src/Cardano/CLI/Helpers.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,17 @@ module Cardano.CLI.Helpers
)
where

import Cardano.Api (AnyCardanoEra (..), CardanoEra (ConwayEra), ToCardanoEra (..))
import Cardano.Api
import qualified Cardano.Api.Byron as Byron
import qualified Cardano.Api.Ledger as L

import Cardano.CLI.Pretty (Doc, pretty, pshow)
import Cardano.CLI.Types.Common

import Codec.CBOR.Pretty (prettyHexEnc)
import Codec.CBOR.Read (DeserialiseFailure, deserialiseFromBytes)
import Codec.CBOR.Term (decodeTerm, encodeTerm)
import Control.Exception (Exception (..), IOException)
import Control.Monad (unless, when)
import Control.Monad.IO.Class (MonadIO (..))
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (handleIOExceptT, left)
import Data.Bifunctor (Bifunctor (..))
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
Expand Down
29 changes: 0 additions & 29 deletions cardano-cli/src/Cardano/CLI/Pretty.hs

This file was deleted.

6 changes: 2 additions & 4 deletions cardano-cli/src/Cardano/CLI/Run/Ping.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@ module Cardano.CLI.Run.Ping
)
where

import Cardano.Api

import Cardano.CLI.Commands.Ping
import Cardano.CLI.Pretty
import qualified Cardano.Network.Ping as CNP

import Control.Concurrent.Class.MonadSTM.Strict (StrictTMVar)
import qualified Control.Concurrent.Class.MonadSTM.Strict as STM
import Control.Exception (SomeException)
import Control.Monad (forM, unless)
import Control.Monad.Class.MonadAsync (MonadAsync (async, wait, waitCatch))
import Control.Monad.Except (throwError)
import Control.Monad.Trans.Except (ExceptT)
import Control.Monad.Trans.Except.Extra (left)
import Control.Tracer (Tracer (..))
import qualified Data.List as L
import qualified Data.List as List
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ module Cardano.CLI.Types.Errors.QueryCmdLocalStateQueryError
)
where

import Cardano.Api (Error (..))
import Cardano.Api

import Cardano.CLI.Pretty
import Cardano.CLI.Types.Errors.NodeEraMismatchError
import Ouroboros.Consensus.Cardano.Block (EraMismatch (..))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

module Test.Golden.Byron.UpdateProposal where

import Cardano.Api

import Cardano.CLI.Byron.UpdateProposal
import Cardano.CLI.Pretty

import Control.Monad (void)
import Control.Monad.Trans.Except (runExceptT)

import Test.Cardano.CLI.Util

Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/test/cardano-cli-golden/Test/Golden/Byron/Vote.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

module Test.Golden.Byron.Vote where

import Cardano.Api

import Cardano.CLI.Byron.Vote
import Cardano.CLI.Pretty

import Control.Monad (void)
import Control.Monad.Trans.Except (runExceptT)

import Test.Cardano.CLI.Util

Expand Down

0 comments on commit a0766b4

Please sign in to comment.