Skip to content

Commit

Permalink
wire-api: Remove explicit dependency on the pretty package #3651
Browse files Browse the repository at this point in the history
`proto-lens` already provides wrappers around the usage, so we should stick to those.
  • Loading branch information
stefanwire committed Oct 16, 2023
1 parent c37d94f commit 3f01001
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions libs/wire-api/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
, openapi3
, pem
, polysemy
, pretty
, process
, proto-lens
, protobuf
Expand Down Expand Up @@ -235,7 +234,6 @@ mkDerivation {
metrics-wai
openapi3
pem
pretty
process
proto-lens
QuickCheck
Expand Down
5 changes: 2 additions & 3 deletions libs/wire-api/test/golden/Test/Wire/API/Golden/Runner.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ import Data.ByteString qualified as ByteString
import Data.ByteString.Lazy qualified as LBS
import Data.ProtoLens.Encoding (decodeMessage, encodeMessage)
import Data.ProtoLens.Message (Message)
import Data.ProtoLens.TextFormat (pprintMessage, readMessage)
import Data.ProtoLens.TextFormat (readMessage, showMessage)
import Data.Text.Lazy.IO qualified as LText
import Imports
import Test.Tasty (TestTree)
import Test.Tasty.HUnit
import Text.PrettyPrint (render)
import Type.Reflection (typeRep)
import Wire.API.ServantProto

Expand Down Expand Up @@ -93,7 +92,7 @@ protoTestObject ::
protoTestObject obj path = do
let actual = toProto obj
msg <- assertRight (decodeMessage @m actual)
let pretty = render (pprintMessage msg)
let pretty = showMessage msg
dir = "test/golden"
fullPath = dir <> "/" <> path
createDirectoryIfMissing True dir
Expand Down
1 change: 0 additions & 1 deletion libs/wire-api/wire-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,6 @@ test-suite wire-api-golden-tests
, iso639
, lens
, pem
, pretty
, proto-lens
, tasty
, tasty-hunit
Expand Down

0 comments on commit 3f01001

Please sign in to comment.