Treat "daemon is dying" state as a case for fallback compilation strategy in jps
This commit is contained in:
@@ -147,7 +147,8 @@ class JpsKotlinCompilerRunner : KotlinCompilerRunner<JpsCompilerEnvironment>() {
|
||||
val verbose = compilerArgs.verbose
|
||||
val options = CompilationOptions(compilerMode, targetPlatform, reportCategories(verbose), reportSeverity(verbose), requestedCompilationResults = emptyArray())
|
||||
val res = daemon.compile(sessionId, withAdditionalCompilerArgs(compilerArgs), options, JpsCompilerServicesFacadeImpl(environment), null)
|
||||
return exitCodeFromProcessExitCode(res.get())
|
||||
// TODO: consider implementing connection retry, instead of fallback here
|
||||
return res.takeUnless { it is CompileService.CallResult.Dying }?.let { exitCodeFromProcessExitCode(it.get()) }
|
||||
}
|
||||
|
||||
private fun withAdditionalCompilerArgs(compilerArgs: CommonCompilerArguments): Array<String> {
|
||||
|
||||
Reference in New Issue
Block a user