Refactor JPS daemon client
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.progress.CompilationCanceledStatus
|
||||
import java.rmi.server.UnicastRemoteObject
|
||||
|
||||
|
||||
class CompilerCallbackServicesFacadeServer(
|
||||
open class CompilerCallbackServicesFacadeServer(
|
||||
val incrementalCompilationComponents: IncrementalCompilationComponents? = null,
|
||||
val compilationCanceledStatus: CompilationCanceledStatus? = null,
|
||||
port: Int = SOCKET_ANY_FREE_PORT
|
||||
|
||||
+2
-1
@@ -38,7 +38,8 @@ interface CompileService : Remote {
|
||||
|
||||
enum class CompilerMode : Serializable {
|
||||
NON_INCREMENTAL_COMPILER,
|
||||
INCREMENTAL_COMPILER
|
||||
INCREMENTAL_COMPILER,
|
||||
JPS_COMPILER
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
+3
-1
@@ -49,4 +49,6 @@ interface IncrementalCompilerServicesFacade : CompilerServicesFacadeBase {
|
||||
|
||||
@Throws(RemoteException::class)
|
||||
fun getChanges(artifact: File, sinceTS: Long): Iterable<SimpleDirtyData>?
|
||||
}
|
||||
}
|
||||
|
||||
interface JpsCompilerServicesFacade : CompilerServicesFacadeBase, CompilerCallbackServicesFacade
|
||||
@@ -334,6 +334,14 @@ class CompileServiceImpl(
|
||||
val serviceReporter = CompileServiceReporterImpl(servicesFacade, additionalCompilerArguments)
|
||||
|
||||
return when (compilerMode) {
|
||||
CompileService.CompilerMode.JPS_COMPILER -> {
|
||||
val jpsServicesFacade = servicesFacade as JpsCompilerServicesFacade
|
||||
|
||||
doCompile(sessionId, serviceReporter, operationsTracer) { eventManger, profiler ->
|
||||
val services = createCompileServices(jpsServicesFacade, eventManger, profiler)
|
||||
execCompiler(targetPlatform, services, compilerArguments, messageCollector)
|
||||
}
|
||||
}
|
||||
CompileService.CompilerMode.NON_INCREMENTAL_COMPILER -> {
|
||||
doCompile(sessionId, serviceReporter, operationsTracer) { eventManger, profiler ->
|
||||
execCompiler(targetPlatform, Services.EMPTY, compilerArguments, messageCollector)
|
||||
|
||||
Reference in New Issue
Block a user