Carter
05/01/2024, 1:47 PM./gradlew check
is invoked?
I’ve got a relatively large Kotlin multiplatform project with JVM, JS, and native targets. I do have caching, configuration cache, and configure on demand enabled. Overall there are about 1,000 tests. I’m currently running Kotlin 2.0.0-RC2, although this reproduced with Kotlin 1.9 as well.
Sometimes, I run ./gradlew check
and it “succeeds” but only a few hundred tests run. Once it gets in this state, check
continues to only run a subset of tests. It seems like the other tasks are skipped. --rerun-tasks
doesn’t seem to resolve it. If I turn off caching, configuration cache, or configuration on demand, it also continues to reproduce once it has started. I’ve tried adding this to my gradle scripts but it didn’t seem to have an effect on this issue either:
tasks.withType<Test>().configureEach {
outputs.upToDateWhen { false }
}
Have others seen this? I’ve been working on this project for over a year, and it seems to have started maybe with Kotlin 1.9 which added configuration cache support? The issue is so intermittent (maybe once a week), that I’ve had a hard time isolating it further.