From 7f7eea09342bbb50062c77f7be3ef69249b210ae Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Thu, 21 Dec 2023 13:29:40 -0800 Subject: [PATCH] replace all compiler_flags --- WORKSPACE | 2 +- example/WORKSPACE | 2 +- example/fix-cleanup-modules/BUILD.bazel | 4 ++-- example/package-a/BUILD.bazel | 8 ++++---- example/package-b/BUILD.bazel | 4 ++-- example/package-c/BUILD.bazel | 10 +++++----- example/package-d/BUILD.bazel | 4 ++-- tests/alternative-deps/WORKSPACE | 2 +- tests/alternative-deps/package-a/BUILD.bazel | 6 +++--- tests/alternative-deps/package-b/BUILD.bazel | 4 ++-- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 36f10c0..74b7746 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -89,7 +89,7 @@ load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs") haskell_register_ghc_nixpkgs( attribute_path = "haskell.compiler.ghc" + ghc_version.replace(".", ""), - compiler_flags = [ + ghcopts = [ "-Werror", "-Wall", "-Wcompat", diff --git a/example/WORKSPACE b/example/WORKSPACE index fe0f725..1d15e1d 100644 --- a/example/WORKSPACE +++ b/example/WORKSPACE @@ -90,7 +90,7 @@ load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs") haskell_register_ghc_nixpkgs( attribute_path = "haskell.compiler.ghc" + ghc_version.replace(".", ""), - compiler_flags = [ + ghcopts = [ "-Werror", "-Wall", "-Wcompat", diff --git a/example/fix-cleanup-modules/BUILD.bazel b/example/fix-cleanup-modules/BUILD.bazel index 9d612fe..f4932ac 100644 --- a/example/fix-cleanup-modules/BUILD.bazel +++ b/example/fix-cleanup-modules/BUILD.bazel @@ -20,7 +20,7 @@ load("@rules_haskell//haskell:defs.bzl", "haskell_library", "haskell_test") haskell_library( name = "fix-cleanup-modules", - compiler_flags = [ + ghcopts = [ "-DVERSION_package_b=\"0.1.0.0\"", "-XScopedTypeVariables", "-lm", @@ -49,7 +49,7 @@ haskell_library( # gazelle_haskell_modules:keep haskell_library( name = "left-alone", - compiler_flags = [ + ghcopts = [ "-DVERSION_package_b=\"0.1.0.0\"", "-XScopedTypeVariables", "-lm", diff --git a/example/package-a/BUILD.bazel b/example/package-a/BUILD.bazel index c94c474..a02fef8 100644 --- a/example/package-a/BUILD.bazel +++ b/example/package-a/BUILD.bazel @@ -10,7 +10,7 @@ haskell_binary( "app/Main.hs", "app/PackageA/Other/C.hs", ], - compiler_flags = ["-DVERSION_package_a=\"0.1.0.0\""], + ghcopts = ["-DVERSION_package_a=\"0.1.0.0\""], version = "0.1.0.0", visibility = ["//visibility:public"], deps = [ @@ -26,7 +26,7 @@ haskell_binary( "app/AnotherMain.hs", "app/PackageA/Other/C.hs", ], - compiler_flags = ["-DVERSION_package_a=\"0.1.0.0\""], + ghcopts = ["-DVERSION_package_a=\"0.1.0.0\""], version = "0.1.0.0", visibility = ["//visibility:public"], deps = [ @@ -56,7 +56,7 @@ haskell_library( srcs = [ "src-v2/PackageA/Exposed/A.hs", ], - compiler_flags = [ + ghcopts = [ "-Wall", "-Werror", ], @@ -72,7 +72,7 @@ haskell_library( "src/PackageA/Other/B.hs", "src/PackageA/Other/D.lhs", ], - compiler_flags = [ + ghcopts = [ "-DVERSION_package_a=\"0.1.0.0\"", "-Wall", "-Werror", diff --git a/example/package-b/BUILD.bazel b/example/package-b/BUILD.bazel index 2c3705d..d1c59b6 100644 --- a/example/package-b/BUILD.bazel +++ b/example/package-b/BUILD.bazel @@ -6,7 +6,7 @@ haskell_library( "src/PackageB/Exposed/A.hs", "src/PackageB/Other/B.hs", ], - compiler_flags = [ + ghcopts = [ "-DVERSION_package_b=\"0.1.0.0\"", "-XScopedTypeVariables", "-lm", @@ -30,7 +30,7 @@ haskell_test( "tests/Main.hs", "tests/PackageB/Other/C.hs", ], - compiler_flags = [ + ghcopts = [ "-DVERSION_package_b=\"0.1.0.0\"", "-DTASTY_DISCOVER_TASTY_DISCOVER_PATH=$(location @stackage-exe//tasty-discover)", ], diff --git a/example/package-c/BUILD.bazel b/example/package-c/BUILD.bazel index bdf4b98..7d25550 100644 --- a/example/package-c/BUILD.bazel +++ b/example/package-c/BUILD.bazel @@ -5,7 +5,7 @@ load("@rules_haskell//haskell:defs.bzl", "haskell_library", "haskell_test") # gazelle_haskell_modules:srcs: src/ haskell_library( name = "package-c", - compiler_flags = [ + ghcopts = [ "-DVERSION_package_b=\"0.1.0.0\"", "-XScopedTypeVariables", "-lm", @@ -30,7 +30,7 @@ haskell_library( "explicit-src/Explicit/DepOnAuto.hs", "explicit-src/Autodetect/Root.hs", ], - compiler_flags = [ + ghcopts = [ "-DVERSION_package_b=\"0.1.0.0\"", "-XScopedTypeVariables", "-lm", @@ -48,7 +48,7 @@ haskell_library( # gazelle_haskell_modules:srcs: src/ multiple-folder-src/ haskell_library( name = "package-c-multiple-srcs", - compiler_flags = [ + ghcopts = [ "-DVERSION_package_b=\"0.1.0.0\"", "-XScopedTypeVariables", "-lm", @@ -72,7 +72,7 @@ haskell_library( # gazelle_haskell_modules:srcs: add-module-src/ haskell_library( name = "package-c-detect-new", - compiler_flags = [ + ghcopts = [ "-DVERSION_package_b=\"0.1.0.0\"", "-XScopedTypeVariables", "-lm", @@ -104,7 +104,7 @@ haskell_test( "tests/Main.hs", "tests/PackageC/Other/C.hs", ], - compiler_flags = [ + ghcopts = [ "-DVERSION_package_b=\"0.1.0.0\"", "-DTASTY_DISCOVER_TASTY_DISCOVER_PATH=$(location @stackage-exe//tasty-discover)", ], diff --git a/example/package-d/BUILD.bazel b/example/package-d/BUILD.bazel index 639bd21..d999b54 100644 --- a/example/package-d/BUILD.bazel +++ b/example/package-d/BUILD.bazel @@ -3,7 +3,7 @@ load("@rules_haskell//haskell:defs.bzl", "haskell_library", "haskell_test") haskell_library( name = "package-d", - compiler_flags = [ + ghcopts = [ "-XScopedTypeVariables", "-lm", ], @@ -28,7 +28,7 @@ haskell_test( "tests/Main.hs", "tests/PackageD/C.hs", ], - compiler_flags = [ + ghcopts = [ "-DVERSION_package_d=\"0.1.0.0\"", "-DTASTY_DISCOVER_TASTY_DISCOVER_PATH=$(location @stackage-exe//tasty-discover)", ], diff --git a/tests/alternative-deps/WORKSPACE b/tests/alternative-deps/WORKSPACE index d68f1bf..9aff404 100644 --- a/tests/alternative-deps/WORKSPACE +++ b/tests/alternative-deps/WORKSPACE @@ -111,7 +111,7 @@ load("@rules_haskell//haskell:nixpkgs.bzl", "haskell_register_ghc_nixpkgs") haskell_register_ghc_nixpkgs( attribute_path = "haskell.compiler.ghc" + ghc_version.replace(".", ""), - compiler_flags = [ + ghcopts = [ "-Werror", "-Wall", "-Wcompat", diff --git a/tests/alternative-deps/package-a/BUILD.bazel b/tests/alternative-deps/package-a/BUILD.bazel index 0cc3cf7..a2da359 100644 --- a/tests/alternative-deps/package-a/BUILD.bazel +++ b/tests/alternative-deps/package-a/BUILD.bazel @@ -10,7 +10,7 @@ haskell_binary( "app/Main.hs", "app/PackageA/Other/C.hs", ], - compiler_flags = ["-DVERSION_package_a=\"0.1.0.0\""], + ghcopts = ["-DVERSION_package_a=\"0.1.0.0\""], version = "0.1.0.0", visibility = ["//visibility:public"], deps = [ @@ -25,7 +25,7 @@ haskell_binary( "app/Main.hs", "app/PackageA/Other/C.hs", ], - compiler_flags = ["-DVERSION_package_a=\"0.1.0.0\""], + ghcopts = ["-DVERSION_package_a=\"0.1.0.0\""], version = "0.1.0.0", visibility = ["//visibility:public"], deps = [ @@ -41,7 +41,7 @@ haskell_library( "src/PackageA/Other/B.hs", "src/PackageA/Other/D.lhs", ], - compiler_flags = [ + ghcopts = [ "-DVERSION_package_a=\"0.1.0.0\"", "-Wall", "-Werror", diff --git a/tests/alternative-deps/package-b/BUILD.bazel b/tests/alternative-deps/package-b/BUILD.bazel index d2ef86f..26082b8 100644 --- a/tests/alternative-deps/package-b/BUILD.bazel +++ b/tests/alternative-deps/package-b/BUILD.bazel @@ -6,7 +6,7 @@ haskell_library( "src/PackageB/Exposed/A.hs", "src/PackageB/Other/B.hs", ], - compiler_flags = [ + ghcopts = [ "-DVERSION_package_b=\"0.1.0.0\"", "-XScopedTypeVariables", "-lm", @@ -29,7 +29,7 @@ haskell_test( "tests/Main.hs", "tests/PackageB/Other/C.hs", ], - compiler_flags = [ + ghcopts = [ "-DVERSION_package_b=\"0.1.0.0\"", "-DTASTY_DISCOVER_TASTY_DISCOVER_PATH=$(location @stackage-exe//tasty-discover)", ],