From 7d660834e172a4dfb00352413dc0216859358fed Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Thu, 27 Dec 2018 16:58:17 +0300 Subject: [PATCH] Fix 'CommandLineProcessor' extension point calling, switch it to using ServiceLoaderLite --- .../org/jetbrains/kotlin/cli/jvm/plugins/PluginCliParser.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/plugins/PluginCliParser.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/plugins/PluginCliParser.kt index 5974a2285f6..b0ef0223d29 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/plugins/PluginCliParser.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/plugins/PluginCliParser.kt @@ -76,7 +76,7 @@ object PluginCliParser { private fun processPluginOptions( pluginOptions: Iterable?, configuration: CompilerConfiguration, - classLoader: ClassLoader + classLoader: URLClassLoader ) { val optionValuesByPlugin = pluginOptions?.map(::parsePluginOption)?.groupBy { if (it == null) throw CliOptionProcessingException("Wrong plugin option format: $it, should be ${CommonCompilerArguments.PLUGIN_OPTION_FORMAT}") @@ -84,7 +84,7 @@ object PluginCliParser { } ?: mapOf() // TODO issue a warning on using deprecated command line processors when all official plugin migrate to the newer convention - val commandLineProcessors = ServiceLoader.load(CommandLineProcessor::class.java, classLoader) + val commandLineProcessors = ServiceLoaderLite.loadImplementations(CommandLineProcessor::class.java, classLoader) for (processor in commandLineProcessors) { val declaredOptions = processor.pluginOptions.associateBy { it.optionName }