CLI K2: report an error for JS/Native/Metadata #KT-52035 Fixed

This commit is contained in:
Mikhail Glukhikh
2022-04-25 15:47:11 +03:00
committed by Space
parent 17b5e46547
commit 08ba89b4ec
11 changed files with 44 additions and 0 deletions
@@ -58,6 +58,10 @@ class K2MetadataCompiler : CLICompiler<K2MetadataCompilerArguments>() {
paths: KotlinPaths?
): ExitCode {
val collector = configuration.getNotNull(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY)
if (configuration.getBoolean(CommonConfigurationKeys.USE_FIR)) {
collector.report(ERROR, "K2 does not support compilation to metadata right now")
return ExitCode.COMPILATION_ERROR
}
val performanceManager = configuration.getNotNull(CLIConfigurationKeys.PERF_MANAGER)
val pluginLoadResult = loadPlugins(paths, arguments, configuration)