From 008a915a66faa749c3dcab23c56ef28417f82c70 Mon Sep 17 00:00:00 2001 From: Samir Talwar Date: Mon, 18 Oct 2021 15:50:18 +0200 Subject: [PATCH] Bazel: Call `_wrap_rule` directly when building the Scala REPL rule. If we build the dependency lists in the `_create_scala_repl` function, we don't add the correct `scalac` options; specifically, we don't add the Silencer option to ignore unused imports from `scala.collection .compat`. By passing directly to `_wrap_rule`, we compute the `scalac` options correctly. CHANGELOG_BEGIN CHANGELOG_END --- bazel_tools/scala.bzl | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bazel_tools/scala.bzl b/bazel_tools/scala.bzl index f9fe20aa46d8..ac546de4bcd4 100644 --- a/bazel_tools/scala.bzl +++ b/bazel_tools/scala.bzl @@ -554,12 +554,7 @@ def _create_scaladoc_jar( def _create_scala_repl( name, - deps = [], - scala_deps = [], - versioned_deps = {}, - versioned_scala_deps = {}, runtime_deps = [], - scala_runtime_deps = [], tags = [], # hiding the following from the `scala_repl` rule main_class = None, @@ -569,10 +564,9 @@ def _create_scala_repl( generated_srcs = None, **kwargs): name = name + "_repl" - deps = resolve_scala_deps(deps, scala_deps, versioned_deps, versioned_scala_deps) - runtime_deps = resolve_scala_deps(runtime_deps, scala_runtime_deps) + ["@maven//:org_jline_jline"] + runtime_deps = runtime_deps + ["@maven//:org_jline_jline"] tags = tags + ["manual"] - _wrap_rule(scala_repl, name = name, deps = deps, runtime_deps = runtime_deps, tags = tags, **kwargs) + _wrap_rule(scala_repl, name = name, runtime_deps = runtime_deps, tags = tags, **kwargs) def da_scala_library(name, **kwargs): """