diff --git a/build-common/src/org/jetbrains/kotlin/build/BuildMetaInfo.kt b/build-common/src/org/jetbrains/kotlin/build/BuildMetaInfo.kt index 5a3d395f026..81df16be9e4 100644 --- a/build-common/src/org/jetbrains/kotlin/build/BuildMetaInfo.kt +++ b/build-common/src/org/jetbrains/kotlin/build/BuildMetaInfo.kt @@ -40,7 +40,7 @@ abstract class BuildMetaInfoFactory(private val metaInfoClass ): T fun create(args: CommonCompilerArguments): T { - val languageVersion = args.languageVersion?.let((LanguageVersion)::fromVersionString) ?: LanguageVersion.LATEST_STABLE + val languageVersion = args.languageVersion?.let { LanguageVersion.fromVersionString(it) } ?: LanguageVersion.LATEST_STABLE return create( isEAP = languageVersion.isPreRelease(), @@ -51,7 +51,7 @@ abstract class BuildMetaInfoFactory(private val metaInfoClass ownVersion = OWN_VERSION, coroutinesVersion = COROUTINES_VERSION, multiplatformVersion = MULTIPLATFORM_VERSION, - metadataVersionArray = args.metadataVersion?.let((BinaryVersion)::parseVersionArray) + metadataVersionArray = args.metadataVersion?.let { BinaryVersion.parseVersionArray(it) } ) } diff --git a/compiler/daemon/build.gradle.kts b/compiler/daemon/build.gradle.kts index 02797935cbc..451d2995f93 100644 --- a/compiler/daemon/build.gradle.kts +++ b/compiler/daemon/build.gradle.kts @@ -39,3 +39,11 @@ runtimeJar() sourcesJar() javadocJar() + +tasks { + val compileKotlin by existing(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) { + kotlinOptions { + freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.DelicateCoroutinesApi" + } + } +} diff --git a/compiler/daemon/daemon-client-new/build.gradle.kts b/compiler/daemon/daemon-client-new/build.gradle.kts index bf93f440a3d..f045c410863 100644 --- a/compiler/daemon/daemon-client-new/build.gradle.kts +++ b/compiler/daemon/daemon-client-new/build.gradle.kts @@ -66,3 +66,11 @@ runtimeJar() sourcesJar() javadocJar() + +tasks { + val compileKotlin by existing(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) { + kotlinOptions { + freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.DelicateCoroutinesApi" + } + } +} diff --git a/compiler/daemon/daemon-common-new/build.gradle.kts b/compiler/daemon/daemon-common-new/build.gradle.kts index 3604f4aba5b..57ab06edd7b 100644 --- a/compiler/daemon/daemon-common-new/build.gradle.kts +++ b/compiler/daemon/daemon-common-new/build.gradle.kts @@ -25,3 +25,11 @@ sourceSets { "main" { projectDefault() } "test" {} } + +tasks { + val compileKotlin by existing(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class) { + kotlinOptions { + freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.DelicateCoroutinesApi" + } + } +} diff --git a/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Client.kt b/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Client.kt index 04d3f15854f..895bea0c178 100644 --- a/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Client.kt +++ b/compiler/daemon/daemon-common-new/src/org/jetbrains/kotlin/daemon/common/experimental/socketInfrastructure/Client.kt @@ -103,7 +103,7 @@ abstract class DefaultAuthorizableClient( } override fun sendNoReplyMessage(msg: AnyMessage) { - writeActor.offer(SendNoreplyMessageQuery(msg)) + writeActor.trySend(SendNoreplyMessageQuery(msg)) } override suspend fun readMessage(id: Int): T {