diff --git a/scala/private/rule_impls.bzl b/scala/private/rule_impls.bzl index fbb1d87888..cd04672adc 100644 --- a/scala/private/rule_impls.bzl +++ b/scala/private/rule_impls.bzl @@ -239,7 +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 = [ctx.expand_location(v, ctx.attr.plugins) for v in toolchain.scalacopts + in_scalacopts] + scalacopts = toolchain.scalacopts + in_scalacopts scalac_args = """ Classpath: {cp} diff --git a/test/plugins/BUILD b/test/plugins/BUILD deleted file mode 100644 index 1a5cf607e3..0000000000 --- a/test/plugins/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -load("//scala:scala.bzl", "scala_library") - -scala_library( - name = "check_expand_location", - srcs = ["trivial.scala"], - plugins = [ - ":check_expand_location_plugin_deploy.jar", - ], - scalacopts = [ - "-P:diablerie:location=$(location :check_expand_location_plugin_deploy.jar)", - ], -) - -scala_library( - name = "check_expand_location_plugin", - srcs = [ - "check_expand_location_plugin.scala", - ], - resource_strip_prefix = package_name(), - resources = [ - ":gen-scalac-plugin.xml", - ], - deps = [ - "@io_bazel_rules_scala_scala_compiler", - ], -) - -_gen_plugin_xml_cmd = """ -cat > $@ << EOF - - plugin - plugin.Plugin - -""" - -genrule( - name = "gen-scalac-plugin.xml", - outs = ["scalac-plugin.xml"], - cmd = _gen_plugin_xml_cmd, -) diff --git a/test/plugins/check_expand_location_plugin.scala b/test/plugins/check_expand_location_plugin.scala deleted file mode 100644 index fc5f612891..0000000000 --- a/test/plugins/check_expand_location_plugin.scala +++ /dev/null @@ -1,25 +0,0 @@ -package plugin - -import scala.tools.nsc.Global -import scala.tools.nsc.Phase -import scala.tools.nsc.plugins.{ Plugin => NscPlugin} -import scala.tools.nsc.plugins.PluginComponent - -import java.io.File - -final class Plugin(override val global: Global) extends NscPlugin { - override val name: String = "diablerie" - override val description: String = "just another plugin" - override val components: List[PluginComponent] = Nil - - override def processOptions(options: List[String], error: String => Unit): Unit = { - options - .find(_.startsWith("location=")) - .map(_.stripPrefix("location=")) - .map(v => new File(v).exists) match { - case Some(true) => () - case Some(false) => error("expanded location doesn't exist") - case None => error("missing location argument") - } - } -} diff --git a/test/plugins/trivial.scala b/test/plugins/trivial.scala deleted file mode 100644 index ed5e226bcb..0000000000 --- a/test/plugins/trivial.scala +++ /dev/null @@ -1,5 +0,0 @@ -package trivial - -object Trivial { - // feel free to reuse this file for other plugin tests -}