Use connect-and-lease when using daemon in JPS & Gradle
Relates to KT-15562 "Service is dying". This commit includes multiple changes: 1. JPS & Gradle daemon clients are refactored to use `connectAndLease` from `KotlinCompilerClient`. `connectAndLease` was introduced in previous commits 2. `withKotlin` was removed because `connectAndLease` already covers retrying on connection error 3. Gradle flag files creation is changed: * client-alive flag file lives as long as Gradle instance lives, * session-alive flag file lives until the end of a build.
This commit is contained in:
+2
-2
@@ -197,7 +197,7 @@ class SourceSectionsTest : TestCaseWithTmpdir() {
|
||||
messageCollector.clear()
|
||||
val outputs = arrayListOf<OutputMessageUtil.Output>()
|
||||
|
||||
val code = KotlinCompilerClient.compile(daemonWithSession!!.service, daemonWithSession.sessionId, CompileService.TargetPlatform.JVM,
|
||||
val code = KotlinCompilerClient.compile(daemonWithSession!!.compileService, daemonWithSession.sessionId, CompileService.TargetPlatform.JVM,
|
||||
args, messageCollector,
|
||||
{ outFile, srcFiles -> outputs.add(OutputMessageUtil.Output(srcFiles, outFile)) },
|
||||
reportSeverity = ReportSeverity.DEBUG)
|
||||
@@ -211,7 +211,7 @@ class SourceSectionsTest : TestCaseWithTmpdir() {
|
||||
}
|
||||
}
|
||||
finally {
|
||||
daemonWithSession!!.service.shutdown()
|
||||
daemonWithSession!!.compileService.shutdown()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user