diff --git a/build-common/src/org/jetbrains/kotlin/incremental/IncrementalJvmCache.kt b/build-common/src/org/jetbrains/kotlin/incremental/IncrementalJvmCache.kt index 47cb536e362..29e89f95de9 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/IncrementalJvmCache.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/IncrementalJvmCache.kt @@ -168,6 +168,8 @@ open class IncrementalJvmCache( constantsMap.process(kotlinClass, changesCollector) inlineFunctionsMap.process(kotlinClass, changesCollector) } + KotlinClassHeader.Kind.UNKNOWN, KotlinClassHeader.Kind.SYNTHETIC_CLASS -> { + } } } diff --git a/build-common/src/org/jetbrains/kotlin/incremental/LookupStorage.kt b/build-common/src/org/jetbrains/kotlin/incremental/LookupStorage.kt index 6dc7422835c..9105c7ff3ab 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/LookupStorage.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/LookupStorage.kt @@ -80,7 +80,7 @@ open class LookupStorage( for (lookupSymbol in lookups.keySet().sorted()) { val key = LookupSymbolKey(lookupSymbol.name, lookupSymbol.scope) - val paths = lookups[lookupSymbol]!! + val paths = lookups[lookupSymbol] val fileIds = paths.mapTo(TreeSet()) { pathToId[it]!! } fileIds.addAll(lookupMap[key] ?: emptySet()) lookupMap[key] = fileIds diff --git a/compiler/compiler-runner/src/org/jetbrains/kotlin/compilerRunner/KotlinCompilerRunnerUtils.kt b/compiler/compiler-runner/src/org/jetbrains/kotlin/compilerRunner/KotlinCompilerRunnerUtils.kt index deb698eee13..0974d8e408b 100644 --- a/compiler/compiler-runner/src/org/jetbrains/kotlin/compilerRunner/KotlinCompilerRunnerUtils.kt +++ b/compiler/compiler-runner/src/org/jetbrains/kotlin/compilerRunner/KotlinCompilerRunnerUtils.kt @@ -49,7 +49,7 @@ object KotlinCompilerRunnerUtils { additionalJvmParams: Array = arrayOf() ): CompileServiceSession? { val daemonJVMOptions = configureDaemonJVMOptions( - additionalParams = *additionalJvmParams, + additionalParams = additionalJvmParams, inheritMemoryLimits = true, inheritOtherJvmOptions = false, inheritAdditionalProperties = true diff --git a/compiler/daemon/daemon-client-new/src/org/jetbrains/kotlin/daemon/client/experimental/KotlinCompilerClient.kt b/compiler/daemon/daemon-client-new/src/org/jetbrains/kotlin/daemon/client/experimental/KotlinCompilerClient.kt index a04d7775ffb..5d2ce0bc463 100644 --- a/compiler/daemon/daemon-client-new/src/org/jetbrains/kotlin/daemon/client/experimental/KotlinCompilerClient.kt +++ b/compiler/daemon/daemon-client-new/src/org/jetbrains/kotlin/daemon/client/experimental/KotlinCompilerClient.kt @@ -297,13 +297,13 @@ class KotlinCompilerClient : KotlinCompilerDaemonClient { log.info("Executing daemon compilation with args: " + filteredArgs.joinToString(" ")) val servicesFacade = CompilerCallbackServicesFacadeServerServerSide() - val serverRun = servicesFacade.runServer() + servicesFacade.runServer() try { val memBefore = daemon.getUsedMemory().get() / 1024 val startTime = System.nanoTime() val compResults = createCompResults() - val compResultsServerRun = compResults.runServer() + compResults.runServer() val res = daemon.compile( CompileService.NO_SESSION, filteredArgs.toList().toTypedArray(), @@ -373,7 +373,6 @@ class KotlinCompilerClient : KotlinCompilerDaemonClient { // --- Implementation --------------------------------------- - @Synchronized private inline fun connectLoop(reportingTargets: DaemonReportingTargets, autostart: Boolean, body: (Boolean) -> R?): R? { try { var attempts = 1 @@ -544,6 +543,7 @@ class KotlinCompilerClient : KotlinCompilerDaemonClient { // assuming that all important output is already done, the rest should be routed to the log by the daemon itself if (stdoutThread.isAlive) { // TODO: find better method to stop the thread, but seems it will require asynchronous consuming of the stream + @Suppress("DEPRECATION") stdoutThread.stop() } reportingTargets.out?.flush() diff --git a/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/CompilerCallbackServicesFacadeServer.kt b/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/CompilerCallbackServicesFacadeServer.kt index af4539901d3..cc95f04f392 100644 --- a/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/CompilerCallbackServicesFacadeServer.kt +++ b/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/CompilerCallbackServicesFacadeServer.kt @@ -31,7 +31,6 @@ import org.jetbrains.kotlin.utils.isProcessCanceledException import java.io.File import java.rmi.server.UnicastRemoteObject - open class CompilerCallbackServicesFacadeServer( val incrementalCompilationComponents: IncrementalCompilationComponents? = null, val lookupTracker: LookupTracker? = null, @@ -40,7 +39,7 @@ open class CompilerCallbackServicesFacadeServer( val incrementalResultsConsumer: IncrementalResultsConsumer? = null, val incrementalDataProvider: IncrementalDataProvider? = null, port: Int = SOCKET_ANY_FREE_PORT -) : CompilerCallbackServicesFacade, +) : @Suppress("DEPRECATION") CompilerCallbackServicesFacade, UnicastRemoteObject( port, LoopbackNetworkInterface.clientLoopbackSocketFactory, diff --git a/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/KotlinCompilerClient.kt b/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/KotlinCompilerClient.kt index 74dde716671..d05d67ca80c 100644 --- a/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/KotlinCompilerClient.kt +++ b/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/KotlinCompilerClient.kt @@ -63,7 +63,7 @@ object KotlinCompilerClient { daemonOptions: DaemonOptions, reportingTargets: DaemonReportingTargets, autostart: Boolean = true, - checkId: Boolean = true + @Suppress("UNUSED_PARAMETER") checkId: Boolean = true ): CompileService? { val flagFile = getOrCreateClientFlagFile(daemonOptions) return connectToCompileService(compilerId, flagFile, daemonJVMOptions, daemonOptions, reportingTargets, autostart) @@ -142,6 +142,7 @@ object KotlinCompilerClient { compilerService.releaseCompileSession(sessionId) } + @Suppress("DEPRECATION") @Deprecated("Use other compile method", ReplaceWith("compile")) fun compile(compilerService: CompileService, sessionId: Int, @@ -156,6 +157,7 @@ object KotlinCompilerClient { } + @Suppress("DEPRECATION") @Deprecated("Use non-deprecated compile method", ReplaceWith("compile")) fun incrementalCompile(compileService: CompileService, sessionId: Int, @@ -277,6 +279,7 @@ object KotlinCompilerClient { val memBefore = daemon.getUsedMemory().get() / 1024 val startTime = System.nanoTime() + @Suppress("DEPRECATION") val res = daemon.remoteCompile(CompileService.NO_SESSION, CompileService.TargetPlatform.JVM, filteredArgs.toList().toTypedArray(), servicesFacade, outStrm, CompileService.OutputFormat.PLAIN, outStrm, null) val endTime = System.nanoTime() @@ -308,8 +311,9 @@ object KotlinCompilerClient { // --- Implementation --------------------------------------- - @Synchronized - private inline fun connectLoop(reportingTargets: DaemonReportingTargets, autostart: Boolean, body: (Boolean) -> R?): R? { + private inline fun connectLoop( + reportingTargets: DaemonReportingTargets, autostart: Boolean, body: (Boolean) -> R? + ): R? = synchronized(this) { try { var attempts = 1 while (true) { diff --git a/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/CompileServiceClientSideImpl.kt b/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/CompileServiceClientSideImpl.kt index 6d4979f8494..f12cd9d279d 100644 --- a/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/CompileServiceClientSideImpl.kt +++ b/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/CompileServiceClientSideImpl.kt @@ -43,7 +43,7 @@ class CompileServiceClientSideImpl( } ?: false override suspend fun clientHandshake(input: ByteReadChannelWrapper, output: ByteWriteChannelWrapper, log: Logger): Boolean { - return trySendHandshakeMessage(output, log) && tryAcquireHandshakeMessage(input, log) + return trySendHandshakeMessage(output) && tryAcquireHandshakeMessage(input) } override fun startKeepAlives() { @@ -186,7 +186,7 @@ class CompileServiceClientSideImpl( } override suspend fun clearJarCache() { - val id = sendMessage(ClearJarCacheMessage()) + sendMessage(ClearJarCacheMessage()) } override suspend fun releaseReplSession(sessionId: Int): CompileService.CallResult { diff --git a/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/CompileServiceRMIWrapper.kt b/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/CompileServiceRMIWrapper.kt index 612e3d1ec3c..ac50e52e90d 100644 --- a/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/CompileServiceRMIWrapper.kt +++ b/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/CompileServiceRMIWrapper.kt @@ -8,10 +8,8 @@ package org.jetbrains.kotlin.daemon.common.experimental import kotlinx.coroutines.runBlocking import org.jetbrains.kotlin.cli.common.repl.ReplCodeLine import org.jetbrains.kotlin.daemon.common.* -import org.jetbrains.kotlin.daemon.common.LoopbackNetworkInterface import org.jetbrains.kotlin.daemon.common.experimental.socketInfrastructure.Client import org.jetbrains.kotlin.daemon.common.experimental.socketInfrastructure.DefaultClientRMIWrapper -import org.jetbrains.kotlin.daemon.common.* import java.io.File import java.io.Serializable import java.rmi.NoSuchObjectException @@ -74,6 +72,7 @@ class CompileServiceRMIWrapper(val server: CompileServiceServerSide, daemonOptio server.scheduleShutdown(graceful) } + @Suppress("OverridingDeprecatedMember", "DEPRECATION") override fun remoteCompile( sessionId: Int, targetPlatform: CompileService.TargetPlatform, @@ -85,6 +84,7 @@ class CompileServiceRMIWrapper(val server: CompileServiceServerSide, daemonOptio operationsTracer: RemoteOperationsTracer? ) = deprecated() + @Suppress("OverridingDeprecatedMember", "DEPRECATION") override fun remoteIncrementalCompile( sessionId: Int, targetPlatform: CompileService.TargetPlatform, @@ -123,6 +123,7 @@ class CompileServiceRMIWrapper(val server: CompileServiceServerSide, daemonOptio server.clearJarCache() } + @Suppress("OverridingDeprecatedMember", "DEPRECATION") override fun leaseReplSession( aliveFlagPath: String?, targetPlatform: CompileService.TargetPlatform, diff --git a/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Client.kt b/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Client.kt index c353722e4bf..5c7ef93e28f 100644 --- a/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Client.kt +++ b/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Client.kt @@ -248,7 +248,7 @@ class DefaultClient( serverHost: String = LoopbackNetworkInterface.loopbackInetAddressName ) : DefaultAuthorizableClient(serverPort, serverHost) { override suspend fun clientHandshake(input: ByteReadChannelWrapper, output: ByteWriteChannelWrapper, log: Logger) = true - override suspend fun authorizeOnServer(output: ByteWriteChannelWrapper): Boolean = true + override suspend fun authorizeOnServer(serverOutputChannel: ByteWriteChannelWrapper): Boolean = true override fun startKeepAlives() {} override fun delayKeepAlives() {} } diff --git a/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Server.kt b/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Server.kt index 01c8f2d14fa..a82c56f577f 100644 --- a/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Server.kt +++ b/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Server.kt @@ -193,7 +193,7 @@ suspend fun runWithTimeout( ): T? = withTimeoutOrNull(unit.toMillis(timeout)) { block() } //@Throws(ConnectionResetException::class) -suspend fun tryAcquireHandshakeMessage(input: ByteReadChannelWrapper, log: Logger): Boolean { +suspend fun tryAcquireHandshakeMessage(input: ByteReadChannelWrapper): Boolean { val bytes = runWithTimeout { input.nextBytes() } ?: return false @@ -205,7 +205,7 @@ suspend fun tryAcquireHandshakeMessage(input: ByteReadChannelWrapper, log: Logge //@Throws(ConnectionResetException::class) -suspend fun trySendHandshakeMessage(output: ByteWriteChannelWrapper, log: Logger): Boolean { +suspend fun trySendHandshakeMessage(output: ByteWriteChannelWrapper): Boolean { runWithTimeout { output.writeBytesAndLength(FIRST_HANDSHAKE_BYTE_TOKEN.size, FIRST_HANDSHAKE_BYTE_TOKEN) } ?: return false diff --git a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompileService.kt b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompileService.kt index 03eadd5825c..79da9bbf0aa 100644 --- a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompileService.kt +++ b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompileService.kt @@ -105,6 +105,7 @@ interface CompileService : Remote { // TODO: consider adding async version of shutdown and release + @Suppress("DEPRECATION") @Deprecated("The usages should be replaced with `compile` method", ReplaceWith("compile")) @Throws(RemoteException::class) fun remoteCompile( @@ -118,6 +119,7 @@ interface CompileService : Remote { operationsTracer: RemoteOperationsTracer? ): CallResult + @Suppress("DEPRECATION") @Deprecated("The usages should be replaced with `compile` method", ReplaceWith("compile")) @Throws(RemoteException::class) fun remoteIncrementalCompile( @@ -149,6 +151,7 @@ interface CompileService : Remote { @Throws(RemoteException::class) fun clearJarCache() + @Suppress("DEPRECATION") @Deprecated("The usages should be replaced with other `leaseReplSession` method", ReplaceWith("leaseReplSession")) @Throws(RemoteException::class) fun leaseReplSession( diff --git a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompileServiceRMIWrapper.kt b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompileServiceRMIWrapper.kt index 2d4547bfbed..30c81e7ab13 100644 --- a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompileServiceRMIWrapper.kt +++ b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/CompileServiceRMIWrapper.kt @@ -23,6 +23,7 @@ class CompileServiceClientRMIWrapper( private fun reportNotImplemented(): Nothing = throw IllegalStateException("Unexpected call to deprecated method") // deprecated methods : + @Suppress("OverridingDeprecatedMember", "DEPRECATION") override fun remoteCompile( sessionId: Int, targetPlatform: CompileService.TargetPlatform, @@ -36,6 +37,7 @@ class CompileServiceClientRMIWrapper( reportNotImplemented() } + @Suppress("OverridingDeprecatedMember", "DEPRECATION") override fun remoteIncrementalCompile( sessionId: Int, targetPlatform: CompileService.TargetPlatform, @@ -49,6 +51,7 @@ class CompileServiceClientRMIWrapper( reportNotImplemented() } + @Suppress("OverridingDeprecatedMember", "DEPRECATION") override fun leaseReplSession( aliveFlagPath: String?, targetPlatform: CompileService.TargetPlatform, @@ -66,10 +69,12 @@ class CompileServiceClientRMIWrapper( reportNotImplemented() } + @Suppress("OverridingDeprecatedMember") override fun remoteReplLineCheck(sessionId: Int, codeLine: ReplCodeLine): CompileService.CallResult { reportNotImplemented() } + @Suppress("OverridingDeprecatedMember") override fun remoteReplLineCompile( sessionId: Int, codeLine: ReplCodeLine, @@ -78,6 +83,7 @@ class CompileServiceClientRMIWrapper( reportNotImplemented() } + @Suppress("OverridingDeprecatedMember") override fun remoteReplLineEval( sessionId: Int, codeLine: ReplCodeLine, diff --git a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/DaemonParams.kt b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/DaemonParams.kt index 3343e829764..44f942530a9 100644 --- a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/DaemonParams.kt +++ b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/DaemonParams.kt @@ -329,7 +329,7 @@ fun configureDaemonJVMOptions(vararg additionalParams: String, inheritAdditionalProperties: Boolean ): DaemonJVMOptions = configureDaemonJVMOptions(DaemonJVMOptions(), - additionalParams = *additionalParams, + additionalParams = additionalParams, inheritMemoryLimits = inheritMemoryLimits, inheritOtherJvmOptions = inheritOtherJvmOptions, inheritAdditionalProperties = inheritAdditionalProperties) diff --git a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/JpsCompilerServicesFacade.kt b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/JpsCompilerServicesFacade.kt index b47e58c8a7c..9ab58d34885 100644 --- a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/JpsCompilerServicesFacade.kt +++ b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/JpsCompilerServicesFacade.kt @@ -16,4 +16,5 @@ package org.jetbrains.kotlin.daemon.common -interface JpsCompilerServicesFacade : CompilerServicesFacadeBase, CompilerCallbackServicesFacade \ No newline at end of file +@Suppress("DEPRECATION") +interface JpsCompilerServicesFacade : CompilerServicesFacadeBase, CompilerCallbackServicesFacade diff --git a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/PerfUtils.kt b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/PerfUtils.kt index d8d3b6b855a..a2c037883a0 100644 --- a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/PerfUtils.kt +++ b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/PerfUtils.kt @@ -14,6 +14,8 @@ * limitations under the License. */ +@file:Suppress("NOTHING_TO_INLINE") + package org.jetbrains.kotlin.daemon.common import java.lang.management.ManagementFactory @@ -101,7 +103,7 @@ inline fun endMeasureWallTime(perfCounters: PerfCounters, startState: List } -inline fun beginMeasureWallAndThreadTimes(perfCounters: PerfCounters, threadMXBean: ThreadMXBean): List { +inline fun beginMeasureWallAndThreadTimes(threadMXBean: ThreadMXBean): List { val startTime = System.nanoTime() val startThreadTime = threadMXBean.threadCpuTime() val startThreadUserTime = threadMXBean.threadUserTime() @@ -117,12 +119,7 @@ inline fun endMeasureWallAndThreadTimes(perfCounters: PerfCounters, threadMXBean threadUser = threadMXBean.threadUserTime() - startThreadUserTime) } -inline fun beginMeasureWallAndThreadTimes(perfCounters: PerfCounters) = - beginMeasureWallAndThreadTimes(perfCounters, ManagementFactory.getThreadMXBean()) -inline fun endMeasureWallAndThreadTimes(perfCounters: PerfCounters, startState: List) = - endMeasureWallAndThreadTimes(perfCounters, ManagementFactory.getThreadMXBean(), startState) - -inline fun beginMeasureWallAndThreadTimesAndMemory(perfCounters: PerfCounters, withGC: Boolean = false, threadMXBean: ThreadMXBean): List { +inline fun beginMeasureWallAndThreadTimesAndMemory(withGC: Boolean = false, threadMXBean: ThreadMXBean): List { val startMem = usedMemory(withGC) val startTime = System.nanoTime() val startThreadTime = threadMXBean.threadCpuTime() @@ -141,13 +138,6 @@ inline fun endMeasureWallAndThreadTimesAndMemory(perfCounters: PerfCounters, wit memory = usedMemory(withGC) - startMem) } -inline fun beginMeasureWallAndThreadTimesAndMemory(perfCounters: PerfCounters, withGC: Boolean) = - beginMeasureWallAndThreadTimesAndMemory(perfCounters, withGC, ManagementFactory.getThreadMXBean()) - -inline fun endMeasureWallAndThreadTimesAndMemory(perfCounters: PerfCounters, withGC: Boolean, startState: List) = - endMeasureWallAndThreadTimesAndMemory(perfCounters, withGC, ManagementFactory.getThreadMXBean(), startState) - - class DummyProfiler : Profiler { override fun getCounters(): Map = mapOf(null to SimplePerfCounters()) override fun getTotalCounters(): PerfCounters = SimplePerfCounters() @@ -174,7 +164,7 @@ class WallTotalProfiler : TotalProfiler() { class WallAndThreadTotalProfiler : TotalProfiler() { @Suppress("OVERRIDE_BY_INLINE") - override inline fun beginMeasure(obj: Any?) = beginMeasureWallAndThreadTimes(total, threadMXBean) + override inline fun beginMeasure(obj: Any?) = beginMeasureWallAndThreadTimes(threadMXBean) @Suppress("OVERRIDE_BY_INLINE") override inline fun endMeasure(obj: Any?, startState: List) = endMeasureWallAndThreadTimes(total, threadMXBean, startState) } @@ -183,7 +173,7 @@ class WallAndThreadTotalProfiler : TotalProfiler() { class WallAndThreadAndMemoryTotalProfiler(val withGC: Boolean) : TotalProfiler() { @Suppress("OVERRIDE_BY_INLINE") override inline fun beginMeasure(obj: Any?) = - beginMeasureWallAndThreadTimesAndMemory(total, withGC, threadMXBean) + beginMeasureWallAndThreadTimesAndMemory(withGC, threadMXBean) @Suppress("OVERRIDE_BY_INLINE") override inline fun endMeasure(obj: Any?, startState: List) = endMeasureWallAndThreadTimesAndMemory(total, withGC, threadMXBean, startState) @@ -198,7 +188,7 @@ class WallAndThreadByClassProfiler() : TotalProfiler() { @Suppress("OVERRIDE_BY_INLINE") override inline fun beginMeasure(obj: Any?) = - beginMeasureWallAndThreadTimes(counters.getOrPut(obj?.javaClass?.name, { SimplePerfCountersWithTotal(total) }), threadMXBean) + beginMeasureWallAndThreadTimes(threadMXBean) @Suppress("OVERRIDE_BY_INLINE") override inline fun endMeasure(obj: Any?, startState: List) = endMeasureWallAndThreadTimes(counters.getOrPut(obj?.javaClass?.name, { SimplePerfCountersWithTotal(total) }), threadMXBean, startState) diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt index d359758681f..cd21966485c 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt @@ -309,6 +309,7 @@ abstract class CompileServiceImplBase( CompileService.CallResult.Good(ExitCode.COMPILATION_ERROR.code) } else when (compilationOptions.compilerMode) { CompilerMode.JPS_COMPILER -> { + @Suppress("UNCHECKED_CAST") servicesFacade as JpsServicesFacadeT withIC(enabled = servicesFacade.hasIncrementalCaches()) { doCompile(sessionId, daemonReporter, tracer = null) { eventManger, profiler -> @@ -609,6 +610,7 @@ abstract class CompileServiceImplBase( body: KotlinJvmReplServiceT.() -> CompileService.CallResult ): CompileService.CallResult = withValidClientOrSessionProxy(sessionId) { session -> + @Suppress("UNCHECKED_CAST") (session?.data as? KotlinJvmReplServiceT?)?.body() ?: CompileService.CallResult.Error("Not a REPL session $sessionId") } @@ -703,6 +705,7 @@ class CompileServiceImpl( CompileService.CallResult.Good(res) } + @Suppress("OverridingDeprecatedMember", "DEPRECATION") override fun remoteCompile( sessionId: Int, targetPlatform: CompileService.TargetPlatform, @@ -728,6 +731,7 @@ class CompileServiceImpl( } } + @Suppress("OverridingDeprecatedMember", "DEPRECATION") override fun remoteIncrementalCompile( sessionId: Int, targetPlatform: CompileService.TargetPlatform, @@ -784,7 +788,7 @@ class CompileServiceImpl( override fun leaseReplSession( aliveFlagPath: String?, targetPlatform: CompileService.TargetPlatform, - servicesFacade: CompilerCallbackServicesFacade, + @Suppress("DEPRECATION") servicesFacade: CompilerCallbackServicesFacade, templateClasspath: List, templateClassName: String, scriptArgs: Array?, @@ -819,15 +823,17 @@ class CompileServiceImpl( // TODO: add more checks (e.g. is it a repl session) override fun releaseReplSession(sessionId: Int): CompileService.CallResult = releaseCompileSession(sessionId) + @Suppress("OverridingDeprecatedMember") override fun remoteReplLineCheck(sessionId: Int, codeLine: ReplCodeLine): CompileService.CallResult = ifAlive(minAliveness = Aliveness.Alive) { withValidRepl(sessionId) { + @Suppress("DEPRECATION") CompileService.CallResult.Good(check(codeLine)) } } private fun createCompileServices( - facade: CompilerCallbackServicesFacade, + @Suppress("DEPRECATION") facade: CompilerCallbackServicesFacade, eventManager: EventManager, rpcProfiler: Profiler ): Services { @@ -835,7 +841,7 @@ class CompileServiceImpl( if (facade.hasIncrementalCaches()) { builder.register( IncrementalCompilationComponents::class.java, - RemoteIncrementalCompilationComponentsClient(facade, eventManager, rpcProfiler) + RemoteIncrementalCompilationComponentsClient(facade, rpcProfiler) ) } if (facade.hasLookupTracker()) { @@ -857,6 +863,7 @@ class CompileServiceImpl( return builder.build() } + @Suppress("OverridingDeprecatedMember") override fun remoteReplLineCompile( sessionId: Int, codeLine: ReplCodeLine, @@ -864,10 +871,12 @@ class CompileServiceImpl( ): CompileService.CallResult = ifAlive(minAliveness = Aliveness.Alive) { withValidRepl(sessionId) { + @Suppress("DEPRECATION") CompileService.CallResult.Good(compile(codeLine, history)) } } + @Suppress("OverridingDeprecatedMember") override fun remoteReplLineEval( sessionId: Int, codeLine: ReplCodeLine, diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinRemoteReplService.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinRemoteReplService.kt index cd3eed256dc..6657cf3b2e2 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinRemoteReplService.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinRemoteReplService.kt @@ -126,7 +126,7 @@ open class KotlinJvmReplService( templateClasspath: List, templateClassName: String, messageCollector: MessageCollector, - @Deprecated("drop it") + // TODO: drop it protected val operationsTracer: RemoteOperationsTracer? ) : KotlinJvmReplServiceBase(disposable, compilerId, templateClasspath, templateClassName, messageCollector) { @@ -142,9 +142,11 @@ open class KotlinJvmReplService( @Deprecated("remove after removal state-less check/compile/eval methods") protected val defaultStateFacade: RemoteReplStateFacadeServer by lazy { createRemoteState() } + @Suppress("DEPRECATION") @Deprecated("Use check(state, line) instead") fun check(codeLine: ReplCodeLine): ReplCheckResult = check(defaultStateFacade.state, codeLine) + @Suppress("DEPRECATION", "UNUSED_PARAMETER") @Deprecated("Use compile(state, line) instead") fun compile(codeLine: ReplCodeLine, verifyHistory: List?): ReplCompileResult = compile(defaultStateFacade.state, codeLine) diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteCompilationCanceledStatusClient.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteCompilationCanceledStatusClient.kt index d6c388c396d..c1d271b7814 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteCompilationCanceledStatusClient.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteCompilationCanceledStatusClient.kt @@ -17,14 +17,17 @@ package org.jetbrains.kotlin.daemon import org.jetbrains.kotlin.daemon.common.* -import org.jetbrains.kotlin.progress.CompilationCanceledStatus import org.jetbrains.kotlin.progress.CompilationCanceledException +import org.jetbrains.kotlin.progress.CompilationCanceledStatus import java.util.concurrent.TimeUnit import java.util.logging.Logger val CANCELED_STATUS_CHECK_THRESHOLD_NS = TimeUnit.MILLISECONDS.toNanos(100) -class RemoteCompilationCanceledStatusClient(val facade: CompilerCallbackServicesFacade, val profiler: Profiler = DummyProfiler()): CompilationCanceledStatus { +class RemoteCompilationCanceledStatusClient( + @Suppress("DEPRECATION") val facade: CompilerCallbackServicesFacade, + val profiler: Profiler = DummyProfiler() +): CompilationCanceledStatus { private val log by lazy { Logger.getLogger("compiler") } diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteExpectActualTracker.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteExpectActualTracker.kt index 5e145bc1d59..770a96ef5e9 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteExpectActualTracker.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteExpectActualTracker.kt @@ -5,7 +5,6 @@ package org.jetbrains.kotlin.daemon -import org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade import org.jetbrains.kotlin.daemon.common.DummyProfiler import org.jetbrains.kotlin.daemon.common.Profiler import org.jetbrains.kotlin.daemon.common.withMeasure @@ -13,7 +12,7 @@ import org.jetbrains.kotlin.incremental.components.ExpectActualTracker import java.io.File class RemoteExpectActualTracker( - val facade: CompilerCallbackServicesFacade, + @Suppress("DEPRECATION") val facade: org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade, val profiler: Profiler = DummyProfiler() ): ExpectActualTracker { override fun report(expectedFile: File, actualFile: File) { diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalCacheClient.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalCacheClient.kt index fc22b09022a..52661b69bb5 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalCacheClient.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalCacheClient.kt @@ -16,7 +16,6 @@ package org.jetbrains.kotlin.daemon -import org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade import org.jetbrains.kotlin.daemon.common.DummyProfiler import org.jetbrains.kotlin.daemon.common.Profiler import org.jetbrains.kotlin.daemon.common.withMeasure @@ -24,8 +23,11 @@ import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache import org.jetbrains.kotlin.load.kotlin.incremental.components.JvmPackagePartProto import org.jetbrains.kotlin.modules.TargetId -class RemoteIncrementalCacheClient(val facade: CompilerCallbackServicesFacade, val target: TargetId, val profiler: Profiler = DummyProfiler()): IncrementalCache { - +class RemoteIncrementalCacheClient( + @Suppress("DEPRECATION") val facade: org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade, + val target: TargetId, + val profiler: Profiler = DummyProfiler() +): IncrementalCache { override fun getObsoletePackageParts(): Collection = profiler.withMeasure(this) { facade.incrementalCache_getObsoletePackageParts(target) } override fun getObsoleteMultifileClasses(): Collection = profiler.withMeasure(this) { facade.incrementalCache_getObsoleteMultifileClassFacades(target) } diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalCompilationComponentsClient.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalCompilationComponentsClient.kt index 99c224182b0..f928cf1b60a 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalCompilationComponentsClient.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalCompilationComponentsClient.kt @@ -16,13 +16,15 @@ package org.jetbrains.kotlin.daemon +import org.jetbrains.kotlin.daemon.common.DummyProfiler +import org.jetbrains.kotlin.daemon.common.Profiler import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCompilationComponents import org.jetbrains.kotlin.modules.TargetId -import org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade -import org.jetbrains.kotlin.daemon.common.DummyProfiler -import org.jetbrains.kotlin.daemon.common.Profiler -class RemoteIncrementalCompilationComponentsClient(val facade: CompilerCallbackServicesFacade, eventManager: EventManager, val profiler: Profiler = DummyProfiler()) : IncrementalCompilationComponents { +class RemoteIncrementalCompilationComponentsClient( + @Suppress("DEPRECATION") val facade: org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade, + val profiler: Profiler = DummyProfiler() +) : IncrementalCompilationComponents { override fun getIncrementalCache(target: TargetId): IncrementalCache = RemoteIncrementalCacheClient(facade, target, profiler) } diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalDataProvider.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalDataProvider.kt index 7f996f9e6b0..6c86404bfb6 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalDataProvider.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalDataProvider.kt @@ -5,7 +5,6 @@ package org.jetbrains.kotlin.daemon -import org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade import org.jetbrains.kotlin.daemon.common.Profiler import org.jetbrains.kotlin.daemon.common.withMeasure import org.jetbrains.kotlin.incremental.js.IncrementalDataProvider @@ -13,8 +12,10 @@ import org.jetbrains.kotlin.incremental.js.IrTranslationResultValue import org.jetbrains.kotlin.incremental.js.TranslationResultValue import java.io.File -class RemoteIncrementalDataProvider(val facade: CompilerCallbackServicesFacade, val rpcProfiler: Profiler) : - IncrementalDataProvider { +class RemoteIncrementalDataProvider( + @Suppress("DEPRECATION") val facade: org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade, + val rpcProfiler: Profiler +) : IncrementalDataProvider { override val serializedIrFiles: Map get() = TODO("not implemented") //To change initializer of created properties use File | Settings | File Templates. diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalResultsConsumer.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalResultsConsumer.kt index 506c5a82a46..8e71abae354 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalResultsConsumer.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteIncrementalResultsConsumer.kt @@ -5,7 +5,6 @@ package org.jetbrains.kotlin.daemon -import org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade import org.jetbrains.kotlin.daemon.common.Profiler import org.jetbrains.kotlin.daemon.common.withMeasure import org.jetbrains.kotlin.incremental.js.FunctionWithSourceInfo @@ -13,8 +12,11 @@ import org.jetbrains.kotlin.incremental.js.IncrementalResultsConsumer import org.jetbrains.kotlin.incremental.js.JsInlineFunctionHash import java.io.File -class RemoteIncrementalResultsConsumer(val facade: CompilerCallbackServicesFacade, eventManager: EventManager, val rpcProfiler: Profiler) : - IncrementalResultsConsumer { +class RemoteIncrementalResultsConsumer( + @Suppress("DEPRECATION") val facade: org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade, + eventManager: EventManager, + val rpcProfiler: Profiler +) : IncrementalResultsConsumer { override fun processIrFile( sourceFile: File, fileData: ByteArray, diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteLookupTrackerClient.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteLookupTrackerClient.kt index a01aa402b36..4161b22ebb3 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteLookupTrackerClient.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/RemoteLookupTrackerClient.kt @@ -19,7 +19,6 @@ package org.jetbrains.kotlin.daemon import com.intellij.util.containers.StringInterner import gnu.trove.THashMap import gnu.trove.THashSet -import org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade import org.jetbrains.kotlin.daemon.common.DummyProfiler import org.jetbrains.kotlin.daemon.common.Profiler import org.jetbrains.kotlin.daemon.common.withMeasure @@ -28,9 +27,8 @@ import org.jetbrains.kotlin.incremental.components.LookupTracker import org.jetbrains.kotlin.incremental.components.Position import org.jetbrains.kotlin.incremental.components.ScopeKind - class RemoteLookupTrackerClient( - val facade: CompilerCallbackServicesFacade, + @Suppress("DEPRECATION") val facade: org.jetbrains.kotlin.daemon.common.CompilerCallbackServicesFacade, eventManager: EventManager, val profiler: Profiler = DummyProfiler() ) : LookupTracker { diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/CompileServiceServerSideImpl.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/CompileServiceServerSideImpl.kt index 2beea02c6bd..7a68b72a667 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/CompileServiceServerSideImpl.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/CompileServiceServerSideImpl.kt @@ -175,10 +175,10 @@ class CompileServiceServerSideImpl( } ?: false override suspend fun serverHandshake(input: ByteReadChannelWrapper, output: ByteWriteChannelWrapper, log: Logger): Boolean { - return tryAcquireHandshakeMessage(input, log) && trySendHandshakeMessage(output, log) + return tryAcquireHandshakeMessage(input) && trySendHandshakeMessage(output) } - private lateinit var scheduler: CompileServiceTaskScheduler + private var scheduler: CompileServiceTaskScheduler constructor( serverSocket: ServerSocketWrapper, @@ -651,7 +651,7 @@ class CompileServiceServerSideImpl( if (facade.hasIncrementalCaches()) { builder.register( IncrementalCompilationComponents::class.java, - RemoteIncrementalCompilationComponentsClient(facade, eventManager, rpcProfiler) + RemoteIncrementalCompilationComponentsClient(facade, rpcProfiler) ) } if (facade.hasLookupTracker()) { diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/KotlinCompileDaemon.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/KotlinCompileDaemon.kt index 5d398980992..7942f2c16f9 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/KotlinCompileDaemon.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/KotlinCompileDaemon.kt @@ -7,31 +7,14 @@ package org.jetbrains.kotlin.daemon.experimental import kotlinx.coroutines.Deferred import kotlinx.coroutines.runBlocking -import org.jetbrains.kotlin.cli.common.CLICompiler -import org.jetbrains.kotlin.cli.common.environment.setIdeaIoUseFallback -import org.jetbrains.kotlin.cli.js.K2JSCompiler -import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler -import org.jetbrains.kotlin.cli.metadata.K2MetadataCompiler import org.jetbrains.kotlin.daemon.CompileServiceImplBase import org.jetbrains.kotlin.daemon.CompilerSelector -import org.jetbrains.kotlin.daemon.common.* -import org.jetbrains.kotlin.daemon.common.experimental.findPortForSocket -import org.jetbrains.kotlin.daemon.common.ensureServerHostnameIsSetUp -import java.io.File -import java.io.IOException -import java.io.OutputStream -import java.io.PrintStream -import java.lang.management.ManagementFactory -import java.net.URLClassLoader -import java.text.SimpleDateFormat -import java.util.* -import java.util.jar.Manifest -import java.util.logging.Level -import java.util.logging.LogManager -import java.util.logging.Logger -import kotlin.concurrent.schedule import org.jetbrains.kotlin.daemon.KotlinCompileDaemonBase +import org.jetbrains.kotlin.daemon.common.* import org.jetbrains.kotlin.daemon.common.experimental.CompileServiceServerSide +import org.jetbrains.kotlin.daemon.common.experimental.findPortForSocket +import java.util.* +import kotlin.concurrent.schedule object KotlinCompileDaemon : KotlinCompileDaemonBase() { override fun runSynchronized(block: () -> T) = runBlocking { block() } @@ -73,7 +56,10 @@ object KotlinCompileDaemon : KotlinCompileDaemonBase() { override fun runCompileService(compileService: CompileServiceImplBase) = (compileService as CompileServiceServerSide).runServer() override fun awaitServerRun(serverRun: Any?) { - runBlocking { (serverRun as Deferred?)?.await() } + runBlocking { + @Suppress("UNCHECKED_CAST") + (serverRun as Deferred?)?.await() + } } @JvmStatic diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/RemoteIncrementalCompilationComponentsClient.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/RemoteIncrementalCompilationComponentsClient.kt index 13447f97b5e..4e9e1c9bf16 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/RemoteIncrementalCompilationComponentsClient.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/RemoteIncrementalCompilationComponentsClient.kt @@ -5,14 +5,13 @@ package org.jetbrains.kotlin.daemon.experimental -import org.jetbrains.kotlin.daemon.EventManager +import org.jetbrains.kotlin.daemon.common.DummyProfiler +import org.jetbrains.kotlin.daemon.common.Profiler import org.jetbrains.kotlin.daemon.common.experimental.CompilerCallbackServicesFacadeClientSide import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCompilationComponents import org.jetbrains.kotlin.modules.TargetId -import org.jetbrains.kotlin.daemon.common.DummyProfiler -import org.jetbrains.kotlin.daemon.common.Profiler -class RemoteIncrementalCompilationComponentsClient(val facade: CompilerCallbackServicesFacadeClientSide, eventManager: EventManager, val profiler: Profiler = DummyProfiler()) : IncrementalCompilationComponents { +class RemoteIncrementalCompilationComponentsClient(val facade: CompilerCallbackServicesFacadeClientSide, val profiler: Profiler = DummyProfiler()) : IncrementalCompilationComponents { override fun getIncrementalCache(target: TargetId): IncrementalCache = RemoteIncrementalCacheClient(facade, target, profiler) } diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/RemoteReplStateFacadeImpl.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/RemoteReplStateFacadeImpl.kt index dd7e8e16069..494f726297a 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/RemoteReplStateFacadeImpl.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/experimental/RemoteReplStateFacadeImpl.kt @@ -64,8 +64,8 @@ class RemoteReplStateFacadeClientSide(val serverPort: Int) : ReplStateFacadeClie } override suspend fun historyResetTo(id: ILineId): List { - val id = sendMessage(ReplStateFacadeServerSide.HistoryResetToMessage(id)) - return readMessage(id) + val message = sendMessage(ReplStateFacadeServerSide.HistoryResetToMessage(id)) + return readMessage(message) } } diff --git a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunner.kt b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunner.kt index 21e4560d679..df1c96b9987 100644 --- a/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunner.kt +++ b/compiler/incremental-compilation-impl/src/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunner.kt @@ -303,6 +303,8 @@ class IncrementalJvmCompilerRunner( KotlinClassHeader.Kind.MULTIFILE_CLASS_PART -> { result.addAll(partsByFacadeName(outputClass.classHeader.multifileClassName!!)) } + KotlinClassHeader.Kind.FILE_FACADE, KotlinClassHeader.Kind.SYNTHETIC_CLASS, KotlinClassHeader.Kind.UNKNOWN -> { + } } }