Skip to content

Commit 77bdc13

Browse files
committed
Support different scalaopts per Scala version on test_reporter
1 parent bc9ed42 commit 77bdc13

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

scala/support/BUILD

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
load("//scala:scala.bzl", "scala_library")
2+
load("@io_bazel_rules_scala_config//:config.bzl", "SCALA_MAJOR_VERSION")
23

34
scala_library(
45
name = "test_reporter",
@@ -14,13 +15,28 @@ scala_library(
1415
"-unchecked",
1516
"-Xfatal-warnings",
1617
"-Xlint",
17-
# TODO: commented out due to Scala 2.13 "-Yno-adapted-args",
1818
"-Ywarn-dead-code",
1919
"-Ywarn-numeric-widen",
2020
"-Ywarn-value-discard",
21-
# TODO: commented out due to Scala 2.13 "-Xfuture",
22-
# TODO: commented out due to Scala 2.13 "-Ywarn-unused-import",
23-
# TODO: commented out due to Scala 2.13 "-Ypartial-unification",
21+
"-Wunused:imports",
22+
] if SCALA_MAJOR_VERSION == "2.13" else [
23+
"-deprecation:true",
24+
"-encoding",
25+
"UTF-8",
26+
"-feature",
27+
"-language:existentials",
28+
"-language:higherKinds",
29+
"-language:implicitConversions",
30+
"-unchecked",
31+
"-Xfatal-warnings",
32+
"-Xlint",
33+
"-Yno-adapted-args",
34+
"-Ywarn-dead-code",
35+
"-Ywarn-numeric-widen",
36+
"-Ywarn-value-discard",
37+
"-Xfuture",
38+
"-Ywarn-unused-import",
39+
"-Ypartial-unification",
2440
],
2541
visibility = ["//visibility:public"],
2642
deps = [

0 commit comments

Comments
 (0)