Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PyF as it depends on GHC and causes depenecy conflicts downstream #6208

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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