diff --git a/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/KotlinCompilerClient.kt b/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/KotlinCompilerClient.kt index b95bef24e38..6adf4bbc8fe 100644 --- a/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/KotlinCompilerClient.kt +++ b/compiler/daemon/daemon-client/src/org/jetbrains/kotlin/daemon/client/KotlinCompilerClient.kt @@ -341,7 +341,7 @@ object KotlinCompilerClient { daemon.inputStream .reader() .forEachLine { - if (daemonOptions.runFilesPath.isNotEmpty() && it.contains(daemonOptions.runFilesPath)) { + if (it == COMPILE_DAEMON_IS_READY_MESSAGE) { isEchoRead.release() return@forEachLine } diff --git a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/DaemonParams.kt b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/DaemonParams.kt index e6aeb7c0a41..9e811ce780a 100644 --- a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/DaemonParams.kt +++ b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/DaemonParams.kt @@ -48,6 +48,7 @@ val COMPILE_DAEMON_DEFAULT_SHUTDOWN_DELAY_MS: Long = 1000L // 1 sec val COMPILE_DAEMON_MEMORY_THRESHOLD_INFINITE: Long = 0L val COMPILE_DAEMON_FORCE_SHUTDOWN_DEFAULT_TIMEOUT_MS: Long = 10000L // 10 secs val COMPILE_DAEMON_TIMEOUT_INFINITE_MS: Long = 0L +val COMPILE_DAEMON_IS_READY_MESSAGE = "Kotlin compile daemon is ready" val COMPILE_DAEMON_DEFAULT_RUN_DIR_PATH: String get() = FileSystem.getRuntimeStateFilesPath("kotlin", "daemon") diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinCompileDaemon.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinCompileDaemon.kt index 9d7413d6416..c9c28e4bea8 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinCompileDaemon.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/KotlinCompileDaemon.kt @@ -35,7 +35,6 @@ import kotlin.concurrent.schedule val DAEMON_PERIODIC_CHECK_INTERVAL_MS = 1000L - class LogStream(name: String) : OutputStream() { val log by lazy { Logger.getLogger(name) } @@ -154,9 +153,7 @@ object KotlinCompileDaemon { } }) - if (daemonOptions.runFilesPath.isNotEmpty()) - println(daemonOptions.runFilesPath) - + println(COMPILE_DAEMON_IS_READY_MESSAGE) log.info("daemon is listening on port: $port") // this supposed to stop redirected streams reader(s) on the client side and prevent some situations with hanging threads, but doesn't work reliably