Skip to content

Commit 67577ab

Browse files
authored
Upgrade Kotlin to 2.3.21 (#4676)
1 parent e0bab56 commit 67577ab

10 files changed

Lines changed: 8 additions & 17 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ suspend fun main() = coroutineScope {
2121
}
2222
```
2323

24-
> Play with coroutines online [here](https://pl.kotl.in/xdbDf0NNk)
24+
> Play with coroutines online [here](https://pl.kotl.in/HRBW8W1bd)
2525
2626
## Modules
2727

buildSrc/src/main/kotlin/kotlin-multiplatform-conventions.gradle.kts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,17 @@ kotlin {
6161
js {
6262
outputModuleName = project.name
6363
nodejs()
64-
compilations["main"]?.dependencies {
65-
api("org.jetbrains.kotlinx:atomicfu:${version("atomicfu")}")
66-
}
6764
}
6865
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
6966
wasmJs {
7067
// Module name should be different from the one from JS
7168
// otherwise IC tasks that start clashing different modules with the same module name
7269
outputModuleName = project.name + "Wasm"
7370
nodejs()
74-
compilations["main"]?.dependencies {
75-
api("org.jetbrains.kotlinx:atomicfu:${version("atomicfu")}")
76-
}
7771
}
7872
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
7973
wasmWasi {
8074
nodejs()
81-
compilations["main"]?.dependencies {
82-
api("org.jetbrains.kotlinx:atomicfu:${version("atomicfu")}")
83-
}
8475
compilations.configureEach {
8576
compileTaskProvider.configure {
8677
compilerOptions {
@@ -112,7 +103,6 @@ kotlin {
112103
// workaround for #3968 until this is fixed on atomicfu's side
113104
api("org.jetbrains.kotlinx:atomicfu:0.23.1")
114105
}
115-
jsMain { }
116106
val wasmJsMain by getting {
117107
}
118108
val wasmJsTest by getting {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ group=org.jetbrains.kotlinx
44
# First-party dependencies.
55
# ONLY rename these properties alongside adapting kotlinx.train build chain
66
# and the `firstPartyDependencies` list in `buildSrc`.
7-
kotlin_version=2.2.20
7+
kotlin_version=2.3.21
88
atomicfu_version=0.32.1
99

1010
# Dependencies

integration-testing/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
kotlin_version=2.2.20
1+
kotlin_version=2.3.21
22
coroutines_version=1.11.0-SNAPSHOT
33
asm_version=9.3
44
junit5_version=5.7.0

kotlinx-coroutines-core/common/src/channels/BufferedChannel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ internal open class BufferedChannel<E>(
741741
index: Int,
742742
r: Long
743743
) = suspendCancellableCoroutineReusable { cont ->
744-
val waiter = ReceiveCatching(cont as CancellableContinuationImpl<ChannelResult<E>>)
744+
val waiter = ReceiveCatching(cont)
745745
receiveImplOnNoWaiter(
746746
segment, index, r,
747747
waiter = waiter,

kotlinx-coroutines-core/common/src/channels/Deprecated.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,6 @@ internal fun ReceiveChannel<*>.consumes(): CompletionHandler = { cause: Throwabl
656656
public fun <E> CoroutineScope.produce(
657657
context: Job,
658658
capacity: Int = Channel.RENDEZVOUS,
659-
@BuilderInference block: suspend ProducerScope<E>.() -> Unit
659+
block: suspend ProducerScope<E>.() -> Unit
660660
): ReceiveChannel<E> =
661661
produce(context as CoroutineContext, capacity, block)

kotlinx-coroutines-core/common/src/flow/operators/Transform.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public fun <T> Flow<T>.runningReduce(operation: suspend (accumulator: T, value:
126126
} else {
127127
operation(accumulator as T, value)
128128
}
129-
emit(accumulator as T)
129+
emit(accumulator)
130130
}
131131
}
132132

kotlinx-coroutines-core/js/src/Promise.js.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package kotlinx.coroutines
22

3+
@Suppress("USELESS_CAST") // on JS, arbitrary objects can be thrown
34
@OptIn(ExperimentalWasmJsInterop::class)
45
internal actual fun JsPromiseError.toThrowable(): Throwable = this as? Throwable ?:
56
Exception("Promise resolved with a non-Throwable exception '$this' (type ${this::class})")
5 Bytes
Binary file not shown.

kotlinx-coroutines-core/jvm/src/internal/StackTraceRecovery.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private fun createStackTrace(continuation: CoroutineStackFrame): ArrayDeque<Stac
180180

181181
var last = continuation
182182
while (true) {
183-
last = (last as? CoroutineStackFrame)?.callerFrame ?: break
183+
last = last.callerFrame ?: break
184184
last.getStackTraceElement()?.let { stack.add(it) }
185185
}
186186
return stack

0 commit comments

Comments
 (0)