[BT] Release daemon compile session right after compilation is finished
^KT-55322 In Progress
This commit is contained in:
committed by
Space Team
parent
3ccca58bb0
commit
95bc49054f
+7
@@ -38,6 +38,7 @@ import org.jetbrains.kotlin.scripting.compiler.plugin.impl.reporter
|
||||
import org.jetbrains.kotlin.scripting.definitions.ScriptDefinitionsFromClasspathDiscoverySource
|
||||
import java.io.File
|
||||
import java.net.URLClassLoader
|
||||
import java.rmi.RemoteException
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import kotlin.script.experimental.jvm.defaultJvmScriptingHostConfiguration
|
||||
|
||||
@@ -218,6 +219,12 @@ internal object CompilationServiceImpl : CompilationService {
|
||||
)
|
||||
).get()
|
||||
|
||||
try {
|
||||
daemon.releaseCompileSession(sessionId)
|
||||
} catch (e: RemoteException) {
|
||||
loggerAdapter.kotlinLogger.warn("Unable to release compile session, maybe daemon is already down: $e")
|
||||
}
|
||||
|
||||
return (ExitCode.entries.find { it.code == exitCode } ?: if (exitCode == 0) {
|
||||
ExitCode.OK
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user