Kotlin/kotlinx.coroutines

`DelayWithTimeoutDiagnostics` missing from R8 rules?

louwers opened this issue · 3 comments

Getting this error when updating kotlinx.coroutines.test from 1.6.4 to 1.8.1:

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /home/runner/work/maplibre-native/maplibre-native/platform/android/MapLibreAndroidTestApp/build/outputs/mapping/drawableReleaseAndroidTest/missing_rules.txt.
Task :MapLibreAndroidTestApp:minifyDrawableReleaseAndroidTestWithR8 FAILED
ERROR: R8: Missing class kotlinx.coroutines.DelayWithTimeoutDiagnostics (referenced from: kotlinx.coroutines.test.TestDispatcher)
136 actionable tasks: 126 executed, 10 up-to-date
Missing class kotlinx.coroutines.internal.CoroutineExceptionHandlerImplKt (referenced from: void kotlinx.coroutines.test.TestScopeImpl.enter())
Missing class kotlinx.coroutines.internal.CoroutineExceptionHandlerImpl_commonKt (referenced from: void kotlinx.coroutines.test.TestCoroutineExceptionHandler.handleException(kotlin.coroutines.CoroutineContext, java.lang.Throwable))
Missing class kotlinx.coroutines.internal.ExceptionSuccessfullyProcessed (referenced from: void kotlinx.coroutines.test.internal.ExceptionCollector.handleException(kotlin.coroutines.CoroutineContext, java.lang.Throwable))
Missing class kotlinx.coroutines.selects.OnTimeoutKt (referenced from: java.lang.Object kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTestCoroutineLegacy-SYHnMyU(kotlinx.coroutines.CoroutineScope, kotlinx.coroutines.AbstractCoroutine, long, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function2, kotlin.jvm.functions.Function0, kotlin.coroutines.Continuation))
Missing class kotlinx.coroutines.selects.SelectImplementation (referenced from: java.lang.Object kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTestCoroutineLegacy-SYHnMyU(kotlinx.coroutines.CoroutineScope, kotlinx.coroutines.AbstractCoroutine, long, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function2, kotlin.jvm.functions.Function0, kotlin.coroutines.Continuation))

FAILURE: Build failed with an exception.

Did you also update kotlinx-coroutines-core?

We are not using kotlinx-coroutines-core. It is not declared as dependency at least...

I think @dkhalanskyjb identified the problem, we don't have that dependency for some reason. Not sure why it wasn't a problem before.