From 2063fe06aa085016222dc0b58d04f0cc36fc9479 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Mon, 24 Aug 2026 23:17:14 -0500 Subject: [PATCH] Point the coroutines-test comments at the file that still uses it Both the dependency declaration and its catalog entry named EscapedCoroutineErrors.kt as the sole reason kotlinx-coroutines-test is on the test classpath. That file is gone, and nothing in the gate -- not ktlint, not detekt, not lint -- fails on prose naming a deleted file, so this would have survived as a reference a reader could only resolve through git history. The dependency itself stays, and for a reason worth restating where it is declared: `runTest` is what registers the collector callback, so the one test that deliberately lets an error escape is the scope that receives it. Co-Authored-By: Claude Opus 5 (1M context) --- app/build.gradle.kts | 6 +++--- gradle/libs.versions.toml | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a2565d9..b0de8c9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -333,9 +333,9 @@ dependencies { // the tests stay green. testImplementation(platform(libs.compose.bom)) testImplementation(libs.compose.ui.test.junit4) - // For `runTest` alone, in EscapedCoroutineErrors.kt. It arrives transitively with the - // rule above anyway; declared because a test file imports it directly, and an import of - // something nobody asked for breaks the day the library that pulled it in stops. + // For `runTest` alone, in ConversionViewModelProbeFailureTest. It arrives transitively + // with the rule above anyway; declared because a test file imports it directly, and an + // import of something nobody asked for breaks the day the library that pulled it in stops. testImplementation(libs.kotlinx.coroutines.test) androidTestImplementation(platform(libs.compose.bom)) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 69f21ea..1dee149 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -162,8 +162,9 @@ androidx-uiautomator = { group = "androidx.test.uiautomator", name = "uiautomato # a TDD loop anyone here can execute. robolectric = { group = "org.robolectric", name = "robolectric", version.ref = "robolectric" } -# Only for its `runTest`, and only to drain the collector kotlinx-coroutines-test installs -# process-wide. See EscapedCoroutineErrors.kt in the JVM test source set. +# Only for its `runTest`, and only so the one test that deliberately lets a coroutine error +# escape owns the collector callback while it does -- otherwise the error is kept process-wide +# and rethrown at whichever `runTest` starts next. See ConversionViewModelProbeFailureTest. kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutinesTest" } [plugins]