From ce624915d5acd36785121a9a1f61ba1bf200da07 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Thu, 13 Jan 2022 19:32:31 +0100 Subject: [PATCH] Fix damlc warnings & compile flags (#12404) `--ghc-option=-Werror` turns warnings into errors, `--ghc-option=-Wwarn` undoes exactly that so this clearly was not doing anything sensible. changelog_begin changelog_end --- .../java/codegen/src/ledger-tests/daml/Stakeholders.daml | 2 +- ledger/test-common/src/main/daml/semantic/TimeTests.daml | 2 -- rules_daml/daml.bzl | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/language-support/java/codegen/src/ledger-tests/daml/Stakeholders.daml b/language-support/java/codegen/src/ledger-tests/daml/Stakeholders.daml index 83170ccb0249..d32e8d5f0352 100644 --- a/language-support/java/codegen/src/ledger-tests/daml/Stakeholders.daml +++ b/language-support/java/codegen/src/ledger-tests/daml/Stakeholders.daml @@ -1,6 +1,6 @@ -- Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. -- SPDX-License-Identifier: Apache-2.0 - +{-# OPTIONS -Wno-controller-can #-} module Stakeholders where diff --git a/ledger/test-common/src/main/daml/semantic/TimeTests.daml b/ledger/test-common/src/main/daml/semantic/TimeTests.daml index ff733ea744de..e90b78333c8f 100644 --- a/ledger/test-common/src/main/daml/semantic/TimeTests.daml +++ b/ledger/test-common/src/main/daml/semantic/TimeTests.daml @@ -3,8 +3,6 @@ module TimeTests where -import DA.Time - template TimeChecker with party: Party diff --git a/rules_daml/daml.bzl b/rules_daml/daml.bzl index c5680392aae9..9b89b600fbcf 100644 --- a/rules_daml/daml.bzl +++ b/rules_daml/daml.bzl @@ -147,7 +147,7 @@ _daml_build = rule( ), "ghc_options": attr.string_list( doc = "Options passed to GHC.", - default = ["--ghc-option=-Werror", "--ghc-option=-Wwarn", "--log-level=WARNING"], + default = ["--ghc-option=-Werror", "--log-level=WARNING"], ), "damlc": _damlc, }, @@ -256,7 +256,7 @@ _inspect_dar = rule( _default_project_version = "1.0.0" -default_damlc_opts = ["--ghc-option=-Werror", "--ghc-option=-Wwarn", "--log-level=WARNING"] +default_damlc_opts = ["--ghc-option=-Werror", "--log-level=WARNING"] def damlc_for_target(target): if not target or target in COMPILER_LF_VERSIONS: