Skip to content

Commit

Permalink
Plugin expansion- Use input plugins param instead of ctx (#909)
Browse files Browse the repository at this point in the history
* See test failing

* Use input plugins param instead of ctx
  • Loading branch information
ittaiz authored Dec 28, 2019
1 parent 313e975 commit bd0c388
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scala/private/rule_impls.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def compile_scala(
unused_dependency_checker_mode = "off",
unused_dependency_checker_ignored_targets = []):
# look for any plugins:
input_plugins = plugins
plugins = collect_plugin_paths(plugins)
internal_plugin_jars = []
dependency_analyzer_mode = "off"
Expand Down Expand Up @@ -238,8 +239,7 @@ CurrentTarget: {current_target}
compiler_classpath = _join_path(compiler_classpath_jars.to_list(), separator)

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

scalac_args = """
Classpath: {cp}
Expand Down

0 comments on commit bd0c388

Please sign in to comment.