Skip to content

Commit

Permalink
Add workaround for atomicfu issue with coroutines 1.10.1
Browse files Browse the repository at this point in the history
When bumping coroutines to 1.10.1, we face the old-ish error:

IC internal error: can not find library org.jetbrains.kotlin:kotlinx-atomicfu-runtime

This can be worked around by declaring the runtime library
directly in the js source set.

See: https://youtrack.jetbrains.com/issue/KT-57235
  • Loading branch information
joffrey-bion committed Jan 8, 2025
1 parent 2794941 commit 77f3a41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jackson-core = { module = "com.fasterxml.jackson.core:jackson-core" }
jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin" }
java-websocket = { module = "org.java-websocket:Java-WebSocket", version.ref = "java-websocket" }
jettyWebsocketCient = { module = "org.eclipse.jetty.websocket:websocket-jetty-client", version.ref = "jetty-websocket" }
kotlinx-atomicfu-runtime = { module = "org.jetbrains.kotlin:kotlinx-atomicfu-runtime", version.ref = "kotlin" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" }
kotlinx-io-core = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version.ref = "kotlinx-io" }
Expand Down
6 changes: 6 additions & 0 deletions krossbow-websocket-ktor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ kotlin {
implementation(libs.ktor.client.cio)
}
}
val jsMain by getting {
dependencies {
// workaround for https://youtrack.jetbrains.com/issue/KT-57235
implementation(libs.kotlinx.atomicfu.runtime)
}
}
val jvmTest by getting {
dependsOn(cioSupportTest)
dependencies {
Expand Down

0 comments on commit 77f3a41

Please sign in to comment.