Skip to content

Commit

Permalink
Update scalac opts in test reporter to support Scala 3 (#1353)
Browse files Browse the repository at this point in the history
For Scala 3 some opts have to be removed because according to the docs, they are not implemented yet.
  • Loading branch information
liucijus authored Feb 11, 2022
1 parent 7e22a7e commit b69907d
Showing 1 changed file with 67 additions and 34 deletions.
101 changes: 67 additions & 34 deletions scala/support/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,73 @@ load("@io_bazel_rules_scala_config//:config.bzl", "SCALA_MAJOR_VERSION")
scala_library(
name = "test_reporter",
srcs = ["JUnitXmlReporter.scala"],
scalacopts = [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Wunused:imports",
] if SCALA_MAJOR_VERSION == "2.13" else [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Xfuture",
"-Ywarn-unused-import",
"-Ypartial-unification",
],
scalacopts = {
"3.1": [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
],
"2.13": [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Wunused:imports",
],
"2.12": [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Xfuture",
"-Ywarn-unused-import",
"-Ypartial-unification",
],
"2.11": [
"-deprecation:true",
"-encoding",
"UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-unchecked",
"-Xfatal-warnings",
"-Xlint",
"-Yno-adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Xfuture",
"-Ywarn-unused-import",
"-Ypartial-unification",
],
}[SCALA_MAJOR_VERSION],
visibility = ["//visibility:public"],
deps = [
"//scala/private/toolchain_deps:scala_xml",
Expand Down

0 comments on commit b69907d

Please sign in to comment.