From c54fba2d398869ccee432bd3a5439fb4c278c397 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Thu, 26 Mar 2020 16:07:38 +0000 Subject: [PATCH 1/3] Nicer module syntax --- nix/haskell.nix | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/nix/haskell.nix b/nix/haskell.nix index ec8440f9fe4..cb933419c8a 100644 --- a/nix/haskell.nix +++ b/nix/haskell.nix @@ -41,31 +41,33 @@ let "stm" "terminfo" ]; - # See https://github.com/input-output-hk/plutus/issues/1213 - packages.marlowe.doHaddock = false; - packages.plutus-use-cases.doHaddock = false; - packages.plutus-scb.doHaddock = false; - packages.plutus-ledger.doHaddock = false; + packages = { + # See https://github.com/input-output-hk/plutus/issues/1213 + marlowe.doHaddock = false; + plutus-use-cases.doHaddock = false; + plutus-scb.doHaddock = false; + plutus-ledger.doHaddock = false; - # Fix missing executables on the paths of the test runners. This is arguably - # a bug, and the fix is a bit of a hack. - packages.marlowe-hspec.components.tests.marlowe-hspec-test.preCheck = '' - PATH=${lib.makeBinPath [ pkgs.z3 ]}:$PATH - ''; - packages.marlowe-symbolic.components.tests.marlowe-symbolic-test.preCheck = '' - PATH=${lib.makeBinPath [ pkgs.z3 ]}:$PATH - ''; - # In this case we can just propagate the native dependencies for the build of the test executable, - # which are actually set up right (we have a build-tool-depends on the executable we need) - # I'm slightly surprised this works, hooray for laziness! - packages.plc-agda.components.tests.test-plc-agda.preCheck = '' - PATH=${lib.makeBinPath pkgSet.plc-agda.components.tests.test-plc-agda.executableToolDepends }:$PATH - ''; - # FIXME: Somehow this is broken even with setting the path up as above - packages.plc-agda.components.tests.test2-plc-agda.doCheck = false; + # Fix missing executables on the paths of the test runners. This is arguably + # a bug, and the fix is a bit of a hack. + marlowe-hspec.components.tests.marlowe-hspec-test.preCheck = '' + PATH=${lib.makeBinPath [ pkgs.z3 ]}:$PATH + ''; + marlowe-symbolic.components.tests.marlowe-symbolic-test.preCheck = '' + PATH=${lib.makeBinPath [ pkgs.z3 ]}:$PATH + ''; + # In this case we can just propagate the native dependencies for the build of the test executable, + # which are actually set up right (we have a build-tool-depends on the executable we need) + # I'm slightly surprised this works, hooray for laziness! + plc-agda.components.tests.test-plc-agda.preCheck = '' + PATH=${lib.makeBinPath pkgSet.plc-agda.components.tests.test-plc-agda.executableToolDepends }:$PATH + ''; + # FIXME: Somehow this is broken even with setting the path up as above + plc-agda.components.tests.test2-plc-agda.doCheck = false; - # plc-agda is compiled from the Haskell source files generated from the Agda - packages.plc-agda.src = "${metatheory.plutus-metatheory-compiled}/share/agda"; + # plc-agda is compiled from the Haskell source files generated from the Agda + plc-agda.src = "${metatheory.plutus-metatheory-compiled}/share/agda"; + }; } ]; pkg-def-extras = [ From 3e566d5a2d29a423f258fb753ea17366fa794695 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Thu, 26 Mar 2020 16:30:16 +0000 Subject: [PATCH 2/3] Set -Werror for everything in CI again This proves somewhat annoying, unfortunately. See https://github.com/input-output-hk/haskell.nix/issues/519 for details. --- nix/haskell.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/nix/haskell.nix b/nix/haskell.nix index cb933419c8a..183ede03b0a 100644 --- a/nix/haskell.nix +++ b/nix/haskell.nix @@ -47,6 +47,8 @@ let plutus-use-cases.doHaddock = false; plutus-scb.doHaddock = false; plutus-ledger.doHaddock = false; + # FIXME: Haddock mysteriously gives a spurious missing-home-modules warning + plutus-tx-plugin.doHaddock = false; # Fix missing executables on the paths of the test runners. This is arguably # a bug, and the fix is a bit of a hack. @@ -67,6 +69,30 @@ let # plc-agda is compiled from the Haskell source files generated from the Agda plc-agda.src = "${metatheory.plutus-metatheory-compiled}/share/agda"; + + # Werror everything. This is a pain, see https://github.com/input-output-hk/haskell.nix/issues/519 + deployment-server.package.ghcOptions = "-Werror"; + iots-export.package.ghcOptions = "-Werror"; + language-plutus-core.package.ghcOptions = "-Werror"; + marlowe.package.ghcOptions = "-Werror"; + marlowe-hspec.package.ghcOptions = "-Werror"; + marlowe-symbolic.package.ghcOptions = "-Werror"; + marlowe-playground-server.package.ghcOptions = "-Werror"; + playground-common.package.ghcOptions = "-Werror"; + plc-agda.package.ghcOptions = "-Werror"; + plutus-book.package.ghcOptions = "-Werror"; + plutus-contract.package.ghcOptions = "-Werror"; + plutus-contract-tasty.package.ghcOptions = "-Werror"; + plutus-emulator.package.ghcOptions = "-Werror"; + plutus-ir.package.ghcOptions = "-Werror"; + plutus-ledger.package.ghcOptions = "-Werror"; + plutus-playground-lib.package.ghcOptions = "-Werror"; + plutus-playground-server.package.ghcOptions = "-Werror"; + plutus-scb.package.ghcOptions = "-Werror"; + plutus-tx.package.ghcOptions = "-Werror"; + plutus-tx-plugin.package.ghcOptions = "-Werror"; + plutus-tutorial.package.ghcOptions = "-Werror"; + plutus-use-cases.package.ghcOptions = "-Werror"; }; } ]; From bdc2d3558b251ab68735250f3d926e05a71c1176 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Thu, 26 Mar 2020 17:25:59 +0000 Subject: [PATCH 3/3] plc-agda has warnings that I don't know how to fix --- nix/haskell.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/haskell.nix b/nix/haskell.nix index 183ede03b0a..ccbed6c8c83 100644 --- a/nix/haskell.nix +++ b/nix/haskell.nix @@ -79,7 +79,8 @@ let marlowe-symbolic.package.ghcOptions = "-Werror"; marlowe-playground-server.package.ghcOptions = "-Werror"; playground-common.package.ghcOptions = "-Werror"; - plc-agda.package.ghcOptions = "-Werror"; + # FIXME: has warnings + #plc-agda.package.ghcOptions = "-Werror"; plutus-book.package.ghcOptions = "-Werror"; plutus-contract.package.ghcOptions = "-Werror"; plutus-contract-tasty.package.ghcOptions = "-Werror";