rules_scala icon indicating copy to clipboard operation
rules_scala copied to clipboard

"No warnings can be incurred under -Werror" when enabling deps option B

Open omerlh opened this issue 3 years ago • 0 comments
trafficstars

While chasing another weird dependency issue, I followed the docs and enabled option B of the dependencies by setting the following flags on the tool chain:

   dependency_mode = "plus-one",
  strict_deps_mode = "error",
  unused_dependency_checker_mode = "error",
  dependency_tracking_method = "ast",

Now I have another weird error due to the "-Werror" flag set on this exact tool chain:

scalac failed: error executing command bazel-out/host/bin/external/io_bazel_rules_scala/src/java/io/bazel/rulesscala/scalac/scalac ... (remaining 1 argument skipped)
external/io_bazel_rules_scala/third_party/dependency_analyzer/src/main/io/bazel/rulesscala/dependencyanalyzer/OptionsParser.scala:49: warning: method copyArrayToImmutableIndexedSeq in class LowPriorityImplicits2 is deprecated (since 2.13.0): Implicit conversions from Array to immutable.IndexedSeq are implemented by copying; Use the more efficient non-copying ArraySeq.unsafeWrapArray or an explicit toIndexedSeq call
    takeStringOpt(key).map(_.split(":"))
                                  ^
error: No warnings can be incurred under -Werror.
1 warning
1 error
Build failed
java.lang.RuntimeException: Build failed
        at io.bazel.rulesscala.scalac.ScalacWorker.compileScalaSources(ScalacWorker.java:290)
        at io.bazel.rulesscala.scalac.ScalacWorker.work(ScalacWorker.java:61)
        at io.bazel.rulesscala.worker.Worker.persistentWorkerMain(Worker.java:84)
        at io.bazel.rulesscala.worker.Worker.workerMain(Worker.java:39)
        at io.bazel.rulesscala.scalac.ScalacWorker.main(ScalacWorker.java:25)
INFO: Elapsed time: 5.566s, Critical Path: 4.92s
INFO: 220 processes: 7 internal, 199 linux-sandbox, 14 worker.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
iBazel [12:27PM]: Build error: exit status 1

rules_scala version:

git_repository(
    name = "io_bazel_rules_scala",
    commit = "cd556ccfc253bfd70659631079e39be412b5402d",
    remote = "[email protected]:bazelbuild/rules_scala.git",
    shallow_since = "1649312900 +0300",
)

What can I do to keep using the -Werror flag?

omerlh avatar May 31 '22 12:05 omerlh