diff --git a/autotest.sh b/autotest.sh index 12065405e47..917da2ddc6e 100755 --- a/autotest.sh +++ b/autotest.sh @@ -45,7 +45,6 @@ FLAGS=$(echo " -XViewPatterns -fno-ignore-interface-pragmas -fno-omit-interface-pragmas - -fplugin-opt PlutusTx.Plugin:defer-errors -fobject-code -Wall -Wcompat diff --git a/cabal.project b/cabal.project index 1072adc1d87..5b75607f9fd 100644 --- a/cabal.project +++ b/cabal.project @@ -36,15 +36,6 @@ package * tests: True benchmarks: True -package hydra-plutus - haddock-options: "--optghc=-fplugin-opt PlutusTx.Plugin:defer-errors" - -package plutus-cbor - haddock-options: "--optghc=-fplugin-opt PlutusTx.Plugin:defer-errors" - -package plutus-merkle-tree - haddock-options: "--optghc=-fplugin-opt PlutusTx.Plugin:defer-errors" - -- Fix compilation of strict-containers (see also nix/hydra/project.nix) package strict-containers ghc-options: "-Wno-noncanonical-monad-instances" diff --git a/hydra-node/hydra-node.cabal b/hydra-node/hydra-node.cabal index 8084db0e2ad..380b5f26549 100644 --- a/hydra-node/hydra-node.cabal +++ b/hydra-node/hydra-node.cabal @@ -221,8 +221,6 @@ benchmark tx-cost ghc-options: -threaded -rtsopts - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors - benchmark micro import: project-config hs-source-dirs: bench/micro-bench diff --git a/hydra-plutus-extras/src/Hydra/Plutus/Extras.hs b/hydra-plutus-extras/src/Hydra/Plutus/Extras.hs index b4c295be292..a0df9420f90 100644 --- a/hydra-plutus-extras/src/Hydra/Plutus/Extras.hs +++ b/hydra-plutus-extras/src/Hydra/Plutus/Extras.hs @@ -1,3 +1,5 @@ +{-# OPTIONS_GHC -fno-specialize #-} + module Hydra.Plutus.Extras ( module Hydra.Plutus.Extras, module Hydra.Plutus.Extras.Time, diff --git a/hydra-plutus/hydra-plutus.cabal b/hydra-plutus/hydra-plutus.cabal index 6ad6560873f..a13d3c88d37 100644 --- a/hydra-plutus/hydra-plutus.cabal +++ b/hydra-plutus/hydra-plutus.cabal @@ -78,8 +78,6 @@ library , template-haskell , time - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors - test-suite tests import: project-config ghc-options: -threaded -rtsopts -with-rtsopts=-N diff --git a/hydra-plutus/src/Hydra/Contract/Commit.hs b/hydra-plutus/src/Hydra/Contract/Commit.hs index f1de356631c..e5a43163d73 100644 --- a/hydra-plutus/src/Hydra/Contract/Commit.hs +++ b/hydra-plutus/src/Hydra/Contract/Commit.hs @@ -1,5 +1,6 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-specialize #-} +{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} -- Avoid trace calls to be optimized away when inlining functions. {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:no-simplifier-inline #-} -- Plutus core version to compile to. In babbage era, that is Cardano protocol diff --git a/hydra-plutus/src/Hydra/Contract/Hash.hs b/hydra-plutus/src/Hydra/Contract/Hash.hs index 46326b3d15f..36f8469a063 100644 --- a/hydra-plutus/src/Hydra/Contract/Hash.hs +++ b/hydra-plutus/src/Hydra/Contract/Hash.hs @@ -1,5 +1,6 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-specialize #-} +{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} -- Plutus core version to compile to. In babbage era, that is Cardano protocol -- version 7 and 8, only plutus-core version 1.0.0 is available. {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:target-version=1.0.0 #-} diff --git a/hydra-plutus/src/Hydra/Contract/Head.hs b/hydra-plutus/src/Hydra/Contract/Head.hs index 7a7659331fc..1e16895d741 100644 --- a/hydra-plutus/src/Hydra/Contract/Head.hs +++ b/hydra-plutus/src/Hydra/Contract/Head.hs @@ -1,6 +1,7 @@ {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-specialize #-} +{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} -- Avoid trace calls to be optimized away when inlining functions. {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:no-simplifier-inline #-} -- Plutus core version to compile to. In babbage era, that is Cardano protocol diff --git a/hydra-plutus/src/Hydra/Contract/HeadTokens.hs b/hydra-plutus/src/Hydra/Contract/HeadTokens.hs index 0028c9b469b..a76b0ca7c41 100644 --- a/hydra-plutus/src/Hydra/Contract/HeadTokens.hs +++ b/hydra-plutus/src/Hydra/Contract/HeadTokens.hs @@ -1,5 +1,6 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-specialize #-} +{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} -- Avoid trace calls to be optimized away when inlining functions. {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:no-simplifier-inline #-} -- Plutus core version to compile to. In babbage era, that is Cardano protocol diff --git a/hydra-plutus/src/Hydra/Contract/Initial.hs b/hydra-plutus/src/Hydra/Contract/Initial.hs index 817da76c037..8852956ee1c 100644 --- a/hydra-plutus/src/Hydra/Contract/Initial.hs +++ b/hydra-plutus/src/Hydra/Contract/Initial.hs @@ -1,5 +1,6 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-specialize #-} +{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} -- Avoid trace calls to be optimized away when inlining functions. {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:no-simplifier-inline #-} -- Plutus core version to compile to. In babbage era, that is Cardano protocol diff --git a/nix/hydra/project.nix b/nix/hydra/project.nix index c363a4631fc..caea7dee127 100644 --- a/nix/hydra/project.nix +++ b/nix/hydra/project.nix @@ -55,21 +55,13 @@ let modules = [{ packages = { - # Strip debugging symbols from exes (smaller closures) hydra-node.dontStrip = false; hydra-tui.dontStrip = false; hydraw.dontStrip = false; - # Avoid plutus-tx errors in haddock (see also cabal.project) - hydra-plutus.setupHaddockFlags = [ "--ghc-options='-fplugin-opt PlutusTx.Plugin:defer-errors'" ]; - - plutus-merkle-tree.setupHaddockFlags = [ "--ghc-options='-fplugin-opt PlutusTx.Plugin:defer-errors'" ]; - plutus-cbor.setupHaddockFlags = [ "--ghc-options='-fplugin-opt PlutusTx.Plugin:defer-errors'" ]; - # Fix compliation of strict-containers (see also cabal.project) strict-containers.ghcOptions = [ "-Wno-noncanonical-monad-instances" ]; - # XXX: Could not figure out where to make this flag ^^^ effective in the haddock build strict-containers.doHaddock = false; @@ -86,7 +78,6 @@ let hydraw.ghcOptions = [ "-Werror" ]; plutus-cbor.ghcOptions = [ "-Werror" ]; plutus-merkle-tree.ghcOptions = [ "-Werror" ]; - }; } ({ lib, config, ... }: diff --git a/plutus-cbor/exe/encoding-cost/Plutus/Codec/CBOR/Encoding/Validator.hs b/plutus-cbor/exe/encoding-cost/Plutus/Codec/CBOR/Encoding/Validator.hs index 6f27a027439..a44ba34b46a 100644 --- a/plutus-cbor/exe/encoding-cost/Plutus/Codec/CBOR/Encoding/Validator.hs +++ b/plutus-cbor/exe/encoding-cost/Plutus/Codec/CBOR/Encoding/Validator.hs @@ -1,5 +1,6 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-specialize #-} +{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} -- Plutus core version to compile to. Cardano protocol version 8 is only -- supporting plutus-core version 1.0.0. {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:target-version=1.0.0 #-} diff --git a/plutus-cbor/plutus-cbor.cabal b/plutus-cbor/plutus-cbor.cabal index 56360462c5e..4c38e1386dc 100644 --- a/plutus-cbor/plutus-cbor.cabal +++ b/plutus-cbor/plutus-cbor.cabal @@ -105,6 +105,4 @@ executable encoding-cost , QuickCheck , scientific - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors - ghc-options: -threaded -rtsopts diff --git a/plutus-merkle-tree/bench/Validators.hs b/plutus-merkle-tree/bench/Validators.hs index 74499fa0624..d73bdab332f 100644 --- a/plutus-merkle-tree/bench/Validators.hs +++ b/plutus-merkle-tree/bench/Validators.hs @@ -1,5 +1,6 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-specialize #-} +{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} -- Plutus core version to compile to. Cardano protocol version 8 is only -- supporting plutus-core version 1.0.0. {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:target-version=1.0.0 #-} diff --git a/plutus-merkle-tree/plutus-merkle-tree.cabal b/plutus-merkle-tree/plutus-merkle-tree.cabal index 00404f9f104..e674b0b0402 100644 --- a/plutus-merkle-tree/plutus-merkle-tree.cabal +++ b/plutus-merkle-tree/plutus-merkle-tree.cabal @@ -48,8 +48,6 @@ library , plutus-tx , text - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors - test-suite tests import: project-config type: exitcode-stdio-1.0 @@ -92,5 +90,3 @@ benchmark on-chain-cost , plutus-tx , plutus-tx-plugin , QuickCheck - - ghc-options: -fplugin-opt PlutusTx.Plugin:defer-errors