From ac49d69e13f6fd5506cedd97833ab02dba15d050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Ackerman?= <6054733+akrmn@users.noreply.github.com> Date: Wed, 3 Nov 2021 11:28:52 +0100 Subject: [PATCH] Ensure that -Werror converts parser warnings into errors (#11511) closes #11399 changelog_begin changelog_end --- bazel-haskell-deps.bzl | 4 ++-- .../damlc/tests/daml-test-files/ParserWerror.daml | 11 +++++++++++ .../damlc/tests/daml-test-files/ParserWno_error.daml | 11 +++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 compiler/damlc/tests/daml-test-files/ParserWerror.daml create mode 100644 compiler/damlc/tests/daml-test-files/ParserWno_error.daml diff --git a/bazel-haskell-deps.bzl b/bazel-haskell-deps.bzl index b82991524a..64e02999e4 100644 --- a/bazel-haskell-deps.bzl +++ b/bazel-haskell-deps.bzl @@ -17,8 +17,8 @@ load("@os_info//:os_info.bzl", "is_linux", "is_windows") load("@dadew//:dadew.bzl", "dadew_tool_home") load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot") -GHCIDE_REV = "2ba61893ea07df26dcacf165a79dd6d0381a3dc8" -GHCIDE_SHA256 = "f3a2fb693d1e6d3beda542639de027a94ae3417fe483765510eceb2ad9ea2b29" +GHCIDE_REV = "e04b5386b3741b839eb5c3d2a2586fd2aa97229c" +GHCIDE_SHA256 = "1d27926e0ad3c2a9536f23b454875a385ecc766ae68ce48a0ec88d0867884b46" JS_JQUERY_VERSION = "3.3.1" JS_DGTABLE_VERSION = "0.5.2" JS_FLOT_VERSION = "0.8.3" diff --git a/compiler/damlc/tests/daml-test-files/ParserWerror.daml b/compiler/damlc/tests/daml-test-files/ParserWerror.daml new file mode 100644 index 0000000000..770eb09b10 --- /dev/null +++ b/compiler/damlc/tests/daml-test-files/ParserWerror.daml @@ -0,0 +1,11 @@ +-- Copyright (c) 2021, Digital Asset (Switzerland) GmbH and/or its affiliates. +-- All rights reserved. + +{-# OPTIONS_GHC -Werror=missing-space-after-bang #-} + +-- @ERROR range=11:3-11:5; perhaps you want to add a space after the bang for clarity + +module ParserWerror where + +(!) : a -> a -> () +_ !_ = () diff --git a/compiler/damlc/tests/daml-test-files/ParserWno_error.daml b/compiler/damlc/tests/daml-test-files/ParserWno_error.daml new file mode 100644 index 0000000000..af0cf6b0e2 --- /dev/null +++ b/compiler/damlc/tests/daml-test-files/ParserWno_error.daml @@ -0,0 +1,11 @@ +-- Copyright (c) 2021, Digital Asset (Switzerland) GmbH and/or its affiliates. +-- All rights reserved. + +{-# OPTIONS_GHC -Wno-error=missing-space-after-bang #-} + +-- @WARN range=11:3-11:5; perhaps you want to add a space after the bang for clarity + +module ParserWno_error where + +(!) : a -> a -> () +_ !_ = ()