From 96e5b544665f590cd7a683c467f19a0c1b640bd3 Mon Sep 17 00:00:00 2001 From: Alexey Tsvetkov Date: Fri, 13 Jan 2017 21:43:15 +0300 Subject: [PATCH] Fix handling OUTPUT message from daemon in JPS client Original commit: e0fa11b0c1f6c218a3cd40a02280299d8c808bdf --- .../kotlin/compilerRunner/JpsCompilerServicesFacadeImpl.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsCompilerServicesFacadeImpl.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsCompilerServicesFacadeImpl.kt index f3610bbfed9..285677acf08 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsCompilerServicesFacadeImpl.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/JpsCompilerServicesFacadeImpl.kt @@ -18,6 +18,7 @@ package org.jetbrains.kotlin.compilerRunner import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity +import org.jetbrains.kotlin.cli.common.messages.OutputMessageUtil import org.jetbrains.kotlin.daemon.client.CompilerCallbackServicesFacadeServer import org.jetbrains.kotlin.daemon.common.* import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCompilationComponents @@ -37,7 +38,10 @@ internal class JpsCompilerServicesFacadeImpl( when (reportCategory) { ReportCategory.OUTPUT_MESSAGE -> { - env.messageCollector.report(CompilerMessageSeverity.OUTPUT, message!!, CompilerMessageLocation.NO_LOCATION) + val output = OutputMessageUtil.parseOutputMessage(message!!) + if (output != null) { + env.outputItemsCollector.add(output.sourceFiles, output.outputFile) + } } ReportCategory.EXCEPTION -> { env.messageCollector.report(CompilerMessageSeverity.EXCEPTION, message!!, CompilerMessageLocation.NO_LOCATION)