Skip to content

Commit 3eac539

Browse files
ittaizAndre Rocha
authored andcommitted
Plugin expansion- Use input plugins param instead of ctx (bazel-contrib#909)
* See test failing * Use input plugins param instead of ctx
1 parent cef7dc2 commit 3eac539

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scala/private/rule_impls.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ def compile_scala(
168168
unused_dependency_checker_mode = "off",
169169
unused_dependency_checker_ignored_targets = []):
170170
# look for any plugins:
171+
input_plugins = plugins
171172
plugins = collect_plugin_paths(plugins)
172173
internal_plugin_jars = []
173174
dependency_analyzer_mode = "off"
@@ -239,8 +240,7 @@ CurrentTarget: {current_target}
239240
compiler_classpath = _join_path(compiler_classpath_jars.to_list(), separator)
240241

241242
toolchain = ctx.toolchains["@io_bazel_rules_scala//scala:toolchain_type"]
242-
scalacopts_expansion_targets = getattr(ctx.attr, "plugins", [])
243-
scalacopts = [ctx.expand_location(v, scalacopts_expansion_targets) for v in toolchain.scalacopts + in_scalacopts]
243+
scalacopts = [ctx.expand_location(v, input_plugins) for v in toolchain.scalacopts + in_scalacopts]
244244

245245
scalac_args = """
246246
Classpath: {cp}

0 commit comments

Comments
 (0)