From bb9bce7587855155ee29b93057bd763cfa4c76a6 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Wed, 8 Apr 2015 19:35:52 +1000 Subject: Fix regression in plugin API Removing a call to a deprecated method had the effect of rendering plugins that override that method inoperable. This manifest as a failure to build scala-js in the community build: https://github.com/scala/community-builds/issues/95 Partially reverts d4546fd. --- src/compiler/scala/tools/nsc/plugins/Plugin.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/plugins/Plugin.scala b/src/compiler/scala/tools/nsc/plugins/Plugin.scala index 5a7a0df595..1a5529140c 100644 --- a/src/compiler/scala/tools/nsc/plugins/Plugin.scala +++ b/src/compiler/scala/tools/nsc/plugins/Plugin.scala @@ -60,13 +60,15 @@ abstract class Plugin { * @return true to continue, or false to opt out */ def init(options: List[String], error: String => Unit): Boolean = { - if (!options.isEmpty) error(s"Error: $name takes no options") + // call to deprecated method required here, we must continue to support + // code that subclasses that override `processOptions`. + processOptions(options, error) true } @deprecated("use Plugin#init instead", since="2.11") def processOptions(options: List[String], error: String => Unit): Unit = { - init(options, error) + if (!options.isEmpty) error(s"Error: $name takes no options") } /** A description of this plugin's options, suitable as a response -- cgit v1.2.3