From 301beddb9ad89ed49acb5a678efc86b09c2c73cd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:52:58 -0400 Subject: [PATCH] Update kotlinx.coroutines to v1.9.0 (#2300) * Update kotlinx.coroutines to v1.9.0 * Update experimental coroutine APIs to delicate opt-in --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jake Wharton --- gradle/libs.versions.toml | 2 +- .../kotlin/app/cash/redwood/treehouse/CodeSession.kt | 4 ++-- .../kotlin/app/cash/redwood/treehouse/RealTreehouseApp.kt | 2 -- .../kotlin/app/cash/redwood/treehouse/TreehouseAppContent.kt | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 50d287ec6e..c648a413b1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "2.0.20" -kotlinx-coroutines = "1.8.1" +kotlinx-coroutines = "1.9.0" kotlinx-serialization = "1.7.2" androidx-activity = "1.9.2" androidx-compose-ui = "1.7.1" diff --git a/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/CodeSession.kt b/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/CodeSession.kt index 7450a4c356..bd5ce68130 100644 --- a/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/CodeSession.kt +++ b/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/CodeSession.kt @@ -20,7 +20,7 @@ import kotlin.coroutines.CoroutineContext import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart -import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.cancel import kotlinx.coroutines.job @@ -68,7 +68,7 @@ internal abstract class CodeSession( /** Invoked on [TreehouseDispatchers.zipline]. */ protected abstract fun ziplineStart() - @OptIn(ExperimentalCoroutinesApi::class) + @OptIn(DelicateCoroutinesApi::class) fun stop() { dispatchers.checkUi() diff --git a/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/RealTreehouseApp.kt b/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/RealTreehouseApp.kt index 97ad169cdc..a8ced5001d 100644 --- a/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/RealTreehouseApp.kt +++ b/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/RealTreehouseApp.kt @@ -25,7 +25,6 @@ import app.cash.zipline.loader.ZiplineHttpClient import app.cash.zipline.loader.ZiplineLoader import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.mapNotNull @@ -108,7 +107,6 @@ internal class RealTreehouseApp private constructor( * Continuously polls for updated code, and emits a new [LoadResult] instance when new code is * found. */ - @OptIn(ExperimentalCoroutinesApi::class) // limitedParallelism is experimental. private fun ziplineFlow( eventListenerFactory: EventListener.Factory, ): Flow { diff --git a/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/TreehouseAppContent.kt b/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/TreehouseAppContent.kt index d6f1704862..e1cc4001f3 100644 --- a/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/TreehouseAppContent.kt +++ b/redwood-treehouse-host/src/commonMain/kotlin/app/cash/redwood/treehouse/TreehouseAppContent.kt @@ -32,7 +32,7 @@ import kotlinx.coroutines.CancellationException import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart -import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.DelicateCoroutinesApi import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.cancel import kotlinx.coroutines.flow.MutableStateFlow @@ -504,7 +504,7 @@ private class ViewContentCodeBinding( } } - @OptIn(ExperimentalCoroutinesApi::class) + @OptIn(DelicateCoroutinesApi::class) fun cancel(exception: Throwable?) { dispatchers.checkUi()