rules_scala
rules_scala copied to clipboard
Scala rules for Bazel
Hi everyone! When I build some of our `scala_specs2_junit_test` targets using `--strict_java_deps=ERROR`, I get errors that I'm not sure how to resolve. ``` error: Target 'Unknown label of file bazel-out/local-fastbuild/genfiles/external/scala/_ijar/scala-parser-combinators/external/scala/lib/scala-parser-combinators_2.11-1.0.4-ijar.jar...
The `bind` actions in rules_scala `repositories` functions is mostly hidden from the user. Meaning most users don't realize that if they want different versions of scala/junit/specs2 jars they need to...
Unused dependency checker gives false positives when _suite macros are involved. Let's consider: ``` scala_library_suite( name = "foo", srcs = ["A.scala", "B.scala"], deps = ["dep1", "dep2"], ) ``` `A.scala` depends...
Currently we collect labels in various places (scala_library/scala_binary/scala_import/etc) and propagate them onwards. This is valuable since when we want to report to the user on a problem with a transitive...
With the unused dependency checker, currently if there is an alias, the alias's target is printed in the error message instead. That is, in the following ``` scala_library( name =...
For unclear reasons, protobuf and scrooge support only direct and transitive dependency modes, and do not support unused deps. We should figure out what better makes sense here. Relates to...
In some cases Scala compiler needs some deps to be on the classpath, which are not directly mentioned in the source code of the target. Such deps should come transitively...
Repro: https://github.com/wix-playground/scala-unused-deps/blob/master/specs2/ Some sepcs2 deps are required at compile time, but are incorrectly suggested to be removed. With specs2-matcher and specs2-common: ```bash ERROR: /home/vaidas/projects/scala-unused-deps/specs2/BUILD:3:1: Couldn't build file specs2/specs2.jar: scala //specs2:specs2...
Repro: https://github.com/wix-playground/scala-unused-deps/tree/master/external_deps ``` ERROR: /home/vaidas/.cache/bazel/_bazel_vaidas/fe796626ea1b61600b06a08b03d1d927/external/ext_b/BUILD:3:1: scala @ext_b//:b failed (Exit 1) error: Target '@maven//:commons_io_commons_io' is specified as a dependency to @ext_b//:b but isn't used, please remove it from the deps. You...
Repro: https://github.com/wix-playground/scala-unused-deps/tree/master/runtime_deps The problem: in plus one mode runtime dependencies are transitively collected and become a problem for unused dep checking which checks only compile dependencies. So in case `A`...