Skip to content

Commit

Permalink
Remove PyF as it depends on GHC and causes depenecy conflicts downstr…
Browse files Browse the repository at this point in the history
…eam. (#6208)
  • Loading branch information
Unisay committed Jun 13, 2024
1 parent 4ea8b3d commit 3b20c63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
3 changes: 1 addition & 2 deletions plutus-ledger-api/plutus-ledger-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ library plutus-ledger-api-testlib

build-depends:
, barbies
, base >=4.9 && <5
, base >=4.9 && <5
, base16-bytestring
, base64-bytestring
, bytestring
Expand All @@ -134,7 +134,6 @@ library plutus-ledger-api-testlib
, plutus-ledger-api ^>=1.29
, plutus-tx ^>=1.29
, prettyprinter
, PyF >=0.11.1.0
, QuickCheck
, serialise
, text
Expand Down
16 changes: 6 additions & 10 deletions plutus-ledger-api/testlib/PlutusLedgerApi/Test/EvaluationEvent.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecordWildCards #-}

module PlutusLedgerApi.Test.EvaluationEvent (
Expand Down Expand Up @@ -30,7 +29,6 @@ import Data.List.NonEmpty (NonEmpty, toList)
import Data.Text.Encoding qualified as Text
import GHC.Generics (Generic)
import Prettyprinter
import PyF (fmt)


data ScriptEvaluationResult = ScriptEvaluationSuccess | ScriptEvaluationFailure
Expand Down Expand Up @@ -152,16 +150,14 @@ data TestFailure
renderTestFailure :: TestFailure -> String
renderTestFailure = \case
InvalidResult err -> display err
MissingCostParametersFor lang -> [fmt|
Missing cost parameters for {show lang}.
Report this as a bug against the script dumper in plutus-apps.
|]
MissingCostParametersFor lang ->
"Missing cost parameters for " ++ show lang ++ ".\n"
++ "Report this as a bug against the script dumper in plutus-apps."

renderTestFailures :: NonEmpty TestFailure -> String
renderTestFailures xs = [fmt|
Number of failed test cases: {length xs}
{unlines . fmap renderTestFailure $ toList xs}
|]
renderTestFailures testFailures =
"Number of failed test cases: " ++ show (length testFailures) ++ ".\n"
++ unwords (map renderTestFailure (toList testFailures))

-- | Re-evaluate an on-chain script evaluation event.
checkEvaluationEvent ::
Expand Down

0 comments on commit 3b20c63

Please sign in to comment.