From b8d0caa8ff6cfa1cbe54b5204f39f048d2127a68 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 31 Jul 2026 19:25:26 -0400 Subject: [PATCH] fix(commons): import kotlinx.coroutines.IO so the iOS targets build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `Dispatchers.IO` is an internal member in common code; the public form on Kotlin/Native is the `kotlinx.coroutines.IO` extension property. Without that import the member resolves on JVM and Android and fails only on iOS, which is precisely what commons' compile-only iOS spike exists to surface. MergedTopFeedAuthorListsState moved into commonMain in 3f4723437e and was the one file that came across without the import — the other 22 commonMain users of Dispatchers.IO already have it, and the only other three files that mention it do so in comments. One error, one file, one missing import. Reproduced locally with :commons:compileKotlinIosSimulatorArm64 before fixing; both iOS targets, JVM, Android and the full test suite pass after. Co-Authored-By: Claude Opus 5 (1M context) --- .../model/topNavFeeds/MergedTopFeedAuthorListsState.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/model/topNavFeeds/MergedTopFeedAuthorListsState.kt b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/model/topNavFeeds/MergedTopFeedAuthorListsState.kt index 670930f6c2..20c07e514c 100644 --- a/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/model/topNavFeeds/MergedTopFeedAuthorListsState.kt +++ b/commons/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/model/topNavFeeds/MergedTopFeedAuthorListsState.kt @@ -33,6 +33,7 @@ import com.vitorpamplona.quartz.nip01Core.relay.normalizer.NormalizedRelayUrl import com.vitorpamplona.quartz.utils.mapOfSet import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.IO import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.combine @@ -100,6 +101,9 @@ class MergedTopFeedAuthorListsState( notificationNavFilter.value, ), ) + // `kotlinx.coroutines.IO` must stay imported: `Dispatchers.IO` is an internal member in + // common, and the public form on Kotlin/Native is that extension. Drop the import and this + // still builds on JVM/Android, failing only the iOS targets. }.flowOn(Dispatchers.IO) .stateIn( scope,