All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlin.daemon.common.CompileServiceAsync.kt Maven / Gradle / Ivy

There is a newer version: 2.0.20-RC
Show newest version
/*
 * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
 * that can be found in the license/LICENSE.txt file.
 */
package org.jetbrains.kotlin.daemon.common

import org.jetbrains.kotlin.cli.common.repl.ReplCheckResult
import org.jetbrains.kotlin.cli.common.repl.ReplCodeLine
import org.jetbrains.kotlin.cli.common.repl.ReplCompileResult
import java.io.File


interface CompileServiceAsync {

    suspend fun checkCompilerId(expectedCompilerId: CompilerId): Boolean

    suspend fun getUsedMemory(): CompileService.CallResult

    suspend fun getDaemonOptions(): CompileService.CallResult

    suspend fun getDaemonInfo(): CompileService.CallResult

    suspend fun getKotlinVersion(): CompileService.CallResult

    suspend fun getDaemonJVMOptions(): CompileService.CallResult

    suspend fun registerClient(aliveFlagPath: String?): CompileService.CallResult

    // TODO: (-old-) consider adding another client alive checking mechanism, e.g. socket/socketPort

    suspend fun getClients(): CompileService.CallResult>

    suspend fun leaseCompileSession(aliveFlagPath: String?): CompileService.CallResult

    suspend fun releaseCompileSession(sessionId: Int): CompileService.CallResult

    suspend fun shutdown(): CompileService.CallResult

    suspend fun scheduleShutdown(graceful: Boolean): CompileService.CallResult

    suspend fun compile(
        sessionId: Int,
        compilerArguments: Array,
        compilationOptions: CompilationOptions,
        servicesFacade: CompilerServicesFacadeBaseAsync,
        compilationResults: CompilationResultsAsync?
    ): CompileService.CallResult

    suspend fun clearJarCache()

    suspend fun releaseReplSession(sessionId: Int): CompileService.CallResult

    suspend fun leaseReplSession(
        aliveFlagPath: String?,
        compilerArguments: Array,
        compilationOptions: CompilationOptions,
        servicesFacade: CompilerServicesFacadeBaseAsync,
        templateClasspath: List,
        templateClassName: String
    ): CompileService.CallResult

    suspend fun replCreateState(sessionId: Int): CompileService.CallResult

    suspend fun replCheck(
        sessionId: Int,
        replStateId: Int,
        codeLine: ReplCodeLine
    ): CompileService.CallResult

    suspend fun replCompile(
        sessionId: Int,
        replStateId: Int,
        codeLine: ReplCodeLine
    ): CompileService.CallResult

    suspend fun classesFqNamesByFiles(sessionId: Int, sourceFiles: Set): CompileService.CallResult>

    val serverPort: Int
        get() = 0

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy