From e65d3af976cf90c9a5e961bd928dbcab02182f58 Mon Sep 17 00:00:00 2001 From: Stuart McCulloch Date: Fri, 16 Oct 2026 15:25:14 +0100 Subject: [PATCH 1/7] Fix Kotlin coroutine context isolation and continuation ownership Extract the Kotlin fixes and independent regression tests from PR #12864. Give builder-created coroutines fresh context elements while preserving context element order. Only release an element's continuation when its owning coroutine completes, including children of already-cancelled jobs. Skip redundant trace continuations for eligible structured children. Keep the existing context capture and swap/restore behavior. Parent live stack seeding, shared scope stacks, AgentTracer/CoreTracer/scope-manager changes, and the handoff tests requiring them are deliberately excluded. Include context replacement and trace-lifetime regressions, run the latest dependency suite on kotlinx-coroutines 1.8, and regenerate the module lockfile. Source: https://github.com/DataDog/dd-trace-java/pull/12864 Validation: test and latestDepTest on JDK 17 (276 tests per run), with both legacy and non-legacy context managers; module spotlessCheck. --- .../kotlin-coroutines-1.3/build.gradle | 4 +- .../kotlin-coroutines-1.3/gradle.lockfile | 29 +-- .../DatadogThreadContextElementTest.java | 3 + .../kotlin/KotlinCoroutineTests.kt | 12 ++ .../DatadogThreadContextElement.java | 129 +++++++++++-- .../DatadogThreadContextElementTest.java | 3 + .../src/test/kotlin/KotlinCoroutineTests.kt | 12 ++ ...tKotlinCoroutineInstrumentationTest.groovy | 121 ++++++++++++ ...stractDatadogThreadContextElementTest.java | 166 +++++++++++++++++ .../coroutines/CoreKotlinCoroutineTests.kt | 176 ++++++++++++++++++ 10 files changed, 622 insertions(+), 33 deletions(-) create mode 100644 dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElementTest.java create mode 100644 dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElementTest.java create mode 100644 dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/java/datadog/trace/instrumentation/kotlin/coroutines/AbstractDatadogThreadContextElementTest.java diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle index 86abd12eb08..0ca36dd63d6 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle @@ -53,9 +53,11 @@ dependencies { testImplementation testFixtures(project(':dd-java-agent:instrumentation:kotlin-coroutines-1.3')) latestDepTestImplementation libs.kotlin - latestDepTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.+" + latestDepTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.+" latestDepTestImplementation testFixtures(project(':dd-java-agent:instrumentation:kotlin-coroutines-1.3')) testFixturesCompileOnly(libs.bundles.groovy) testFixturesCompileOnly(libs.bundles.spock) + testFixturesCompileOnly libs.junit.jupiter + testFixturesCompileOnly libs.tabletest } diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile index 31525e3b1ca..b66cf574341 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile @@ -99,23 +99,24 @@ org.jetbrains.kotlin:kotlin-scripting-common:2.1.20=kotlinBuildToolsApiClasspath org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures org.jetbrains.kotlin:kotlin-scripting-jvm:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures -org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=compileClasspath,compileOnlyDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:1.6.21=compileClasspath,compileOnlyDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=compileClasspath,compileOnlyDependenciesMetadata,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21=latestDepTestImplementationDependenciesMetadata +org.jetbrains.kotlin:kotlin-stdlib:1.6.21=compileClasspath,compileOnlyDependenciesMetadata,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib:1.9.21=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath org.jetbrains.kotlin:kotlin-stdlib:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures,kotlinKlibCommonizerClasspath -org.jetbrains.kotlinx:atomicfu:0.17.3=latestDepTestImplementationDependenciesMetadata -org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath +org.jetbrains.kotlinx:atomicfu:0.23.1=latestDepTestImplementationDependenciesMetadata +org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0=compileClasspath,compileOnlyDependenciesMetadata,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath -org.jetbrains:annotations:13.0=compileClasspath,compileOnlyDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures,kotlinKlibCommonizerClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath +org.jetbrains:annotations:13.0=compileClasspath,compileOnlyDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures,kotlinKlibCommonizerClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains:annotations:23.0.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath org.jspecify:jspecify:1.0.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-api:5.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-api:5.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.junit.jupiter:junit-jupiter-engine:5.14.1=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:5.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:5.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-params:5.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.junit.jupiter:junit-jupiter:5.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.junit.platform:junit-platform-commons:1.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.junit.platform:junit-platform-engine:1.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.junit.platform:junit-platform-launcher:1.14.1=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath @@ -144,7 +145,7 @@ org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j org.snakeyaml:snakeyaml-engine:2.9=buildTimeInstrumentationPlugin,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath org.spockframework:spock-bom:2.4-groovy-3.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath org.spockframework:spock-core:2.4-groovy-3.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath -org.tabletest:tabletest-junit:1.2.2=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.tabletest:tabletest-parser:1.2.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.tabletest:tabletest-junit:1.2.2=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath +org.tabletest:tabletest-parser:1.2.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath org.xmlresolver:xmlresolver:5.3.3=spotbugs empty=apiDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,latestDepTestApiDependenciesMetadata,latestDepTestIntransitiveDependenciesMetadata,latestDepTestKotlinScriptDefExtensions,spotbugsPlugins,testApiDependenciesMetadata,testFixturesAnnotationProcessor,testFixturesIntransitiveDependenciesMetadata,testFixturesKotlinScriptDefExtensions,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElementTest.java b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElementTest.java new file mode 100644 index 00000000000..e45a22d4b23 --- /dev/null +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElementTest.java @@ -0,0 +1,3 @@ +package datadog.trace.instrumentation.kotlin.coroutines; + +class DatadogThreadContextElementTest extends AbstractDatadogThreadContextElementTest {} diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt index 77be265ed46..8bd598d68ed 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt @@ -51,6 +51,18 @@ class KotlinCoroutineTests(dispatcher: CoroutineDispatcher) : CoreKotlinCoroutin 3 } + @Trace + override fun structuredChildrenOutliveSeedSpan(): Int = super.structuredChildrenOutliveSeedSpan() + + @Trace + override fun structuredChildrenOfScopedCoroutines(): Int = super.structuredChildrenOfScopedCoroutines() + + @Trace + override fun childWithReplacedJob(supervisor: Boolean): Int = super.childWithReplacedJob(supervisor) + + @Trace + override fun structuredChildOfCancelledCoroutine(): Int = super.structuredChildOfCancelledCoroutine() + @Trace override fun tracePreventedByCancellation(): Int = super.tracePreventedByCancellation() diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java index 55516db89e0..e400a76ed04 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java @@ -2,16 +2,24 @@ import datadog.context.Context; import datadog.context.ContextContinuation; +import datadog.trace.api.GenericClassValue; +import datadog.trace.bootstrap.instrumentation.api.AgentSpan; +import datadog.trace.bootstrap.instrumentation.api.AgentTraceCollector; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; import javax.annotation.Nonnull; import javax.annotation.Nullable; import kotlin.coroutines.CoroutineContext; +import kotlin.coroutines.EmptyCoroutineContext; import kotlin.jvm.functions.Function2; import kotlinx.coroutines.AbstractCoroutine; +import kotlinx.coroutines.Job; import kotlinx.coroutines.ThreadContextElement; +import kotlinx.coroutines.internal.ScopeCoroutine; /** Manages the Datadog context for coroutines, switching contexts as coroutines switch threads. */ -public final class DatadogThreadContextElement implements ThreadContextElement { +public final class DatadogThreadContextElement + implements ThreadContextElement, + Function2 { private static final AtomicReferenceFieldUpdater CONTINUATION = AtomicReferenceFieldUpdater.newUpdater( @@ -20,16 +28,61 @@ public final class DatadogThreadContextElement implements ThreadContextElement DATADOG_KEY = new CoroutineContext.Key() {}; + /** Coroutines built by coroutineScope, withContext, etc. that their caller waits for. */ + private static final ClassValue SCOPED_COROUTINE = + GenericClassValue.of( + type -> + ScopeCoroutine.class.isAssignableFrom(type) + // older timeout coroutines are scoped but don't extend ScopeCoroutine + || (AbstractCoroutine.class.isAssignableFrom(type) + && "kotlinx.coroutines.TimeoutCoroutine".equals(type.getName()))); + + /** Adds a fresh Datadog element, replacing any inherited element in place. */ public static CoroutineContext addDatadogElement(CoroutineContext coroutineContext) { - if (coroutineContext.get(DATADOG_KEY) != null) { - return coroutineContext; // already added + DatadogThreadContextElement existing = coroutineContext.get(DATADOG_KEY); + if (existing == null) { + return coroutineContext.plus(new DatadogThreadContextElement(null)); } - return coroutineContext.plus(new DatadogThreadContextElement()); + DatadogThreadContextElement fresh = + new DatadogThreadContextElement(existing.traceKeptOpenFor(coroutineContext.get(Job.Key))); + // keep the element's position, so elements added after it can still update scopes on top + return coroutineContext.fold(EmptyCoroutineContext.INSTANCE, fresh); + } + + /** Rebuilds the context using this replacement element, avoiding a capturing fold lambda. */ + @Override + public CoroutineContext invoke(CoroutineContext rebuilt, CoroutineContext.Element element) { + return rebuilt.plus(element.getKey() == DATADOG_KEY ? this : element); } - private Context context; + @Nullable private AgentTraceCollector traceKeptOpenByParent; + private volatile Context context; private volatile ContextContinuation continuation; + /** The coroutine this element was created for. */ + @Nullable private volatile Job owner; + + /** The trace kept open until this coroutine completes, by its own continuation or its parent. */ + @Nullable private volatile AgentTraceCollector traceKeptOpen; + + private DatadogThreadContextElement(@Nullable AgentTraceCollector traceKeptOpenByParent) { + this.traceKeptOpenByParent = traceKeptOpenByParent; + } + + /** Returns the trace this coroutine keeps open, if coroutines of this job are its children. */ + @Nullable + private AgentTraceCollector traceKeptOpenFor(@Nullable Job job) { + AgentTraceCollector trace = traceKeptOpen; + // structured children complete before their parent, which keeps its trace open until then + return trace != null && job != null && (job == owner || isScopedBy(job)) ? trace : null; + } + + /** Scoped coroutines share their caller's element and complete before the caller does. */ + private boolean isScopedBy(Job job) { + return SCOPED_COROUTINE.get(job.getClass()) + && ((AbstractCoroutine) job).getContext().get(DATADOG_KEY) == this; + } + @Nonnull @Override public Key getKey() { @@ -38,18 +91,55 @@ public Key getKey() { public static void captureDatadogContext(@Nonnull AbstractCoroutine coroutine) { DatadogThreadContextElement datadog = coroutine.getContext().get(DATADOG_KEY); - if (datadog != null && datadog.context == null) { - // record context to use for this coroutine - datadog.context = Context.current(); - // stop enclosing trace from finishing early - datadog.continuation = datadog.context.capture(); + if (datadog != null) { + if (datadog.owner == null) { + // scoped coroutines built later share this element, but aren't its owner + datadog.owner = coroutine; + } + if (datadog.context == null) { + datadog.captureInitialContext(); + } + } + } + + private synchronized void captureInitialContext() { + if (context == null) { + Context initial = Context.current(); + // this coroutine isn't running yet, so its context can't change under us + AgentTraceCollector trace = traceOf(initial); + if (trace != null) { + if (trace == traceKeptOpenByParent) { + // the parent keeps this trace open until after this child completes + traceKeptOpen = trace; + } else { + // stop enclosing trace from finishing early + ContextContinuation captured = initial.capture(); + continuation = captured; + if (captured.context() != Context.root()) { + // only when the capture was accepted, e.g. async propagation is enabled + traceKeptOpen = trace; + } + } + } + context = initial; + traceKeptOpenByParent = null; } } + @Nullable + private static AgentTraceCollector traceOf(Context context) { + AgentSpan span = AgentSpan.fromContext(context); + return span != null ? span.spanContext().getTraceCollector() : null; + } + public static void cancelDatadogContext(@Nonnull AbstractCoroutine coroutine) { DatadogThreadContextElement datadog = coroutine.getContext().get(DATADOG_KEY); - ContextContinuation continuation = - datadog == null ? null : CONTINUATION.getAndSet(datadog, null); + if (datadog == null || datadog.owner != coroutine) { + // scoped coroutines share their caller's element, but must not release its trace hold + return; + } + datadog.traceKeptOpen = null; + ContextContinuation continuation = CONTINUATION.getAndSet(datadog, null); if (continuation != null) { // release enclosing trace now the coroutine has completed continuation.release(); @@ -58,13 +148,16 @@ public static void cancelDatadogContext(@Nonnull AbstractCoroutine coroutine) @Override public Context updateThreadContext(@Nonnull CoroutineContext coroutineContext) { - if (context == null) { - // record context to use for this coroutine - context = Context.current(); - // stop enclosing trace from finishing early - continuation = context.capture(); + Context current = context; + if (current == null) { + if (owner == null) { + // an already-cancelled coroutine can skip constructor capture but still install context + owner = coroutineContext.get(Job.Key); + } + captureInitialContext(); + current = context; } - return context.swap(); + return current.swap(); } @Override diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElementTest.java b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElementTest.java new file mode 100644 index 00000000000..e45a22d4b23 --- /dev/null +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElementTest.java @@ -0,0 +1,3 @@ +package datadog.trace.instrumentation.kotlin.coroutines; + +class DatadogThreadContextElementTest extends AbstractDatadogThreadContextElementTest {} diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/kotlin/KotlinCoroutineTests.kt b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/kotlin/KotlinCoroutineTests.kt index 8ba909ae74d..65f2352c6ed 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/kotlin/KotlinCoroutineTests.kt +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/kotlin/KotlinCoroutineTests.kt @@ -32,6 +32,18 @@ class KotlinCoroutineTests(dispatcher: CoroutineDispatcher) : CoreKotlinCoroutin 7 } + @Trace + override fun structuredChildrenOutliveSeedSpan(): Int = super.structuredChildrenOutliveSeedSpan() + + @Trace + override fun structuredChildrenOfScopedCoroutines(): Int = super.structuredChildrenOfScopedCoroutines() + + @Trace + override fun childWithReplacedJob(supervisor: Boolean): Int = super.childWithReplacedJob(supervisor) + + @Trace + override fun structuredChildOfCancelledCoroutine(): Int = super.structuredChildOfCancelledCoroutine() + @Trace override fun tracePreventedByCancellation(): Int = super.tracePreventedByCancellation() diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy index 4298933db84..153b195d519 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy @@ -1,5 +1,7 @@ package datadog.trace.instrumentation.kotlin.coroutines +import static datadog.trace.agent.test.utils.TraceUtils.runUnderTrace + import datadog.trace.agent.test.InstrumentationSpecification import datadog.trace.core.DDSpan import kotlinx.coroutines.CoroutineDispatcher @@ -11,6 +13,19 @@ abstract class AbstractKotlinCoroutineInstrumentationTest trace = TEST_WRITER.get(0) + + expect: + TEST_WRITER.size() == 1 + trace.size() == expectedNumberOfSpans + findSpan(trace, "child").spanContext().getParentId() == findSpan(trace, "seed").spanContext().getSpanId() + findSpan(trace, "grandchild").spanContext().getParentId() == findSpan(trace, "child").spanContext().getSpanId() + + where: + [dispatcherName, dispatcher] << dispatchersToTest + } + + def "child launched after a scoped coroutine keeps the trace open scoped=#scoped #dispatcherName"() { + setup: + CoreKotlinCoroutineTests kotlinTest = getCoreKotlinCoroutineTestsInstance(dispatcher) + int expectedNumberOfSpans = kotlinTest.structuredChildAfterScopedCoroutine(scoped) + kotlinTest.finishDetached() + TEST_WRITER.waitForTraces(1) + List trace = TEST_WRITER.get(0) + + expect: + TEST_WRITER.size() == 1 + trace.size() == expectedNumberOfSpans + findSpan(trace, "child").spanContext().getParentId() == findSpan(trace, "seed").spanContext().getSpanId() + findSpan(trace, "seed").spanContext().getParentId() == findSpan(trace, "root").spanContext().getSpanId() + + where: + [dispatcherName, dispatcher, scoped] << dispatchersToTest.collectMany { dispatcher -> + ["none", "withContext", "coroutineScope", "withTimeout"].collect { dispatcher + it } + } + } + + def "children of scoped coroutines keep the trace open #dispatcherName"() { + setup: + CoreKotlinCoroutineTests kotlinTest = getCoreKotlinCoroutineTestsInstance(dispatcher) + int expectedNumberOfSpans = kotlinTest.structuredChildrenOfScopedCoroutines() + kotlinTest.finishDetached() + TEST_WRITER.waitForTraces(1) + List trace = TEST_WRITER.get(0) + + expect: + TEST_WRITER.size() == 1 + trace.size() == expectedNumberOfSpans + findSpan(trace, "scope-child").spanContext().getParentId() == findSpan(trace, "seed").spanContext().getSpanId() + findSpan(trace, "context-child").spanContext().getParentId() == findSpan(trace, "seed").spanContext().getSpanId() + + where: + [dispatcherName, dispatcher] << dispatchersToTest + } + + def "structured child keeps the trace open when its parent started without one #dispatcherName"() { + setup: + CoreKotlinCoroutineTests kotlinTest = getCoreKotlinCoroutineTestsInstance(dispatcher) + int expectedNumberOfSpans = kotlinTest.structuredChildOfUntracedCoroutine() + kotlinTest.finishDetached() + TEST_WRITER.waitForTraces(1) + List trace = TEST_WRITER.get(0) + + expect: + TEST_WRITER.size() == 1 + trace.size() == expectedNumberOfSpans + findSpan(trace, "child").spanContext().getParentId() == findSpan(trace, "root").spanContext().getSpanId() + where: + [dispatcherName, dispatcher] << dispatchersToTest + } + + def "child with a replaced job keeps the trace open supervisor=#supervisor #dispatcherName"() { + setup: + CoreKotlinCoroutineTests kotlinTest = getCoreKotlinCoroutineTestsInstance(dispatcher) + int expectedNumberOfSpans = kotlinTest.childWithReplacedJob(supervisor) + kotlinTest.finishDetached() + TEST_WRITER.waitForTraces(1) + List trace = TEST_WRITER.get(0) + + expect: + TEST_WRITER.size() == 1 + trace.size() == expectedNumberOfSpans + findSpan(trace, "child").spanContext().getParentId() == findSpan(trace, "trace.annotation").spanContext().getSpanId() + + where: + [dispatcherName, dispatcher, supervisor] << dispatchersToTest.collectMany { [it + false, it + true] } + } + + def "cancelled coroutine keeps the trace open for its structured child #dispatcherName"() { + setup: + CoreKotlinCoroutineTests kotlinTest = getCoreKotlinCoroutineTestsInstance(dispatcher) + int expectedNumberOfSpans = kotlinTest.structuredChildOfCancelledCoroutine() + kotlinTest.cancelDetached() + TEST_WRITER.waitForTraces(1) + List trace = TEST_WRITER.get(0) + + expect: + TEST_WRITER.size() == 1 + trace.size() == expectedNumberOfSpans + findSpan(trace, "cleanup").spanContext().getParentId() == findSpan(trace, "trace.annotation").spanContext().getSpanId() + + where: + [dispatcherName, dispatcher] << dispatchersToTest + } + protected static DDSpan findSpan(List trace, String opName) { for (DDSpan span : trace) { if (span.getOperationName() == opName) { diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/java/datadog/trace/instrumentation/kotlin/coroutines/AbstractDatadogThreadContextElementTest.java b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/java/datadog/trace/instrumentation/kotlin/coroutines/AbstractDatadogThreadContextElementTest.java new file mode 100644 index 00000000000..da1a2234bdd --- /dev/null +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/java/datadog/trace/instrumentation/kotlin/coroutines/AbstractDatadogThreadContextElementTest.java @@ -0,0 +1,166 @@ +package datadog.trace.instrumentation.kotlin.coroutines; + +import static datadog.trace.instrumentation.kotlin.coroutines.DatadogThreadContextElement.addDatadogElement; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotSame; +import static org.junit.jupiter.api.Assertions.assertSame; + +import java.util.ArrayList; +import java.util.List; +import kotlin.coroutines.AbstractCoroutineContextElement; +import kotlin.coroutines.Continuation; +import kotlin.coroutines.ContinuationInterceptor; +import kotlin.coroutines.CoroutineContext; +import kotlin.coroutines.EmptyCoroutineContext; +import kotlin.jvm.functions.Function2; +import kotlinx.coroutines.ThreadContextElement; +import org.junit.jupiter.api.Test; +import org.tabletest.junit.TableTest; + +/** Context replacement checks shared by the oldest and latest dependency suites. */ +public abstract class AbstractDatadogThreadContextElementTest { + @TableTest({ + "Scenario | Ordinary before | Ordinary after | Hooks before | Hooks after | Dispatcher | Custom view", + "Singleton | 0 | 0 | 0 | 0 | false | false ", + "Ordinary middle | 2 | 2 | 0 | 0 | true | false ", + "Later hook | 1 | 1 | 0 | 1 | true | false ", + "Hooks either side | 1 | 1 | 2 | 2 | false | false ", + "Custom later hook | 2 | 2 | 1 | 1 | true | true " + }) + void replacementPreservesContentsAndCallbackOrder( + int ordinaryBefore, + int ordinaryAfter, + int hooksBefore, + int hooksAfter, + boolean dispatcher, + boolean customView) { + DatadogThreadContextElement original = + (DatadogThreadContextElement) addDatadogElement(EmptyCoroutineContext.INSTANCE); + CoroutineContext input = EmptyCoroutineContext.INSTANCE; + for (int i = 0; i < ordinaryBefore; i++) { + input = input.plus(new Element()); + } + for (int i = 0; i < hooksBefore; i++) { + input = input.plus(new Hook()); + } + input = input.plus(original); + for (int i = 0; i < ordinaryAfter; i++) { + input = input.plus(new Element()); + } + for (int i = 0; i < hooksAfter; i++) { + input = input.plus(new Hook()); + } + if (dispatcher) { + input = input.plus(new Interceptor()); + } + if (customView) { + input = new ContextView(input); + } + assertReplacement(input, original); + } + + @Test + void contextWithoutDatadogElementRetainsItsContents() { + Element ordinary = new Element(); + Hook hook = new Hook(); + CoroutineContext input = ordinary.plus(hook); + CoroutineContext output = addDatadogElement(input); + assertSame(ordinary, lookup(output, ordinary)); + assertSame(hook, lookup(output, hook)); + assertEquals(3, keys(output).size()); + assertEquals(ordinary.getKey(), keys(output).get(0)); + assertEquals(hook.getKey(), keys(output).get(1)); + } + + private static void assertReplacement( + CoroutineContext input, DatadogThreadContextElement original) { + CoroutineContext output = addDatadogElement(input); + assertSame(original, lookup(input, original)); + assertNotSame(original, lookup(output, original)); + assertEquals(keys(input), keys(output)); + input.fold( + output, + (rebuilt, element) -> { + if (element != original) { + assertSame(element, lookup(rebuilt, element)); + } + return rebuilt; + }); + } + + @SuppressWarnings("unchecked") + private static CoroutineContext.Element lookup( + CoroutineContext context, CoroutineContext.Element element) { + return context.get((CoroutineContext.Key) element.getKey()); + } + + private static List> keys(CoroutineContext context) { + return context.fold( + new ArrayList>(), + (keys, element) -> { + keys.add(element.getKey()); + return keys; + }); + } + + private static class Element extends AbstractCoroutineContextElement { + Element() { + super(new CoroutineContext.Key() {}); + } + } + + private static final class Hook extends Element implements ThreadContextElement { + @Override + public Object updateThreadContext(CoroutineContext context) { + return null; + } + + @Override + public void restoreThreadContext(CoroutineContext context, Object state) {} + } + + private static final class Interceptor extends AbstractCoroutineContextElement + implements ContinuationInterceptor { + Interceptor() { + super(ContinuationInterceptor.Key); + } + + @SuppressWarnings("unchecked") + @Override + public Continuation interceptContinuation(Continuation continuation) { + return (Continuation) continuation; + } + + @Override + public void releaseInterceptedContinuation(Continuation continuation) {} + } + + private static final class ContextView implements CoroutineContext { + private final CoroutineContext delegate; + + ContextView(CoroutineContext delegate) { + this.delegate = delegate; + } + + @Override + public E get(CoroutineContext.Key key) { + return delegate.get(key); + } + + @Override + public R fold( + R initial, Function2 operation) { + return delegate.fold(initial, operation); + } + + @Override + public CoroutineContext minusKey(CoroutineContext.Key key) { + return delegate.minusKey(key); + } + + @Override + public CoroutineContext plus(CoroutineContext other) { + return CoroutineContext.DefaultImpls.plus(this, other); + } + } +} diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/kotlin/datadog/trace/instrumentation/kotlin/coroutines/CoreKotlinCoroutineTests.kt b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/kotlin/datadog/trace/instrumentation/kotlin/coroutines/CoreKotlinCoroutineTests.kt index 4e6e4fcda64..fbfabd5c199 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/kotlin/datadog/trace/instrumentation/kotlin/coroutines/CoreKotlinCoroutineTests.kt +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/kotlin/datadog/trace/instrumentation/kotlin/coroutines/CoreKotlinCoroutineTests.kt @@ -11,6 +11,9 @@ import kotlinx.coroutines.CoroutineName import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineStart import kotlinx.coroutines.Deferred +import kotlinx.coroutines.Job +import kotlinx.coroutines.NonCancellable +import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.cancelAndJoin @@ -21,14 +24,36 @@ import kotlinx.coroutines.runBlocking import kotlinx.coroutines.selects.select import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock +import kotlinx.coroutines.withContext import kotlinx.coroutines.withTimeout import kotlinx.coroutines.yield import java.util.concurrent.CancellationException import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicInteger +import kotlin.coroutines.CoroutineContext abstract class CoreKotlinCoroutineTests(private val dispatcher: CoroutineDispatcher) { + fun launchWithCancelledParent() { + val queuedDispatcher = object : CoroutineDispatcher() { + var pending: Runnable? = null + + override fun dispatch(context: CoroutineContext, block: Runnable) { + check(pending == null) { "Unexpected second dispatch" } + pending = block + } + } + val parent = Job() + parent.cancel() + + val child = CoroutineScope(parent + queuedDispatcher).launch { + error("A child of an already-cancelled parent must not execute") + } + + checkNotNull(queuedDispatcher.pending) { "Cancellation was not dispatched" }.run() + check(child.isCompleted && child.isCancelled) { "Child did not complete cancellation" } + } + @Trace open fun tracePreventedByCancellation(): Int { kotlin.runCatching { @@ -387,4 +412,155 @@ abstract class CoreKotlinCoroutineTests(private val dispatcher: CoroutineDispatc setAsyncPropagationEnabled(asyncPropagation) return runBlocking(jobName("test") + dispatcher, block = block) } + + // The following tests start a detached coroutine that outlives the method's root span. Its + // children wait on a gate that is only released by finishDetached(), after the root span has + // finished, so only coroutine continuations can keep the trace open until the children finish. + + private val gate = CompletableDeferred() + private var detached: Job? = null + + /** Releases the children of the detached coroutine and waits for it to complete. */ + fun finishDetached() { + gate.complete(Unit) + runBlocking { detached?.join() } + } + + /** Cancels the detached coroutine and waits for it to complete. */ + fun cancelDetached() { + detached?.cancel() + runBlocking { detached?.join() } + } + + /** Children launched with their parent's context, from a span the parent finishes early. */ + @Trace + open fun structuredChildrenOutliveSeedSpan(): Int { + runTest { + detached = launch(Job() + jobName("detached")) { + childSpan("seed").activateAndUse { + launch(coroutineContext + jobName("child")) { + gate.await() + childSpan("child").activateAndUse { + launch(coroutineContext + jobName("grandchild")) { + childSpan("grandchild").finish() + } + } + } + } + } + } + return 4 + } + + /** A structured child launched after a scoped coroutine has completed in its parent. */ + open fun structuredChildAfterScopedCoroutine(scoped: String): Int { + runTest { + childSpan("root").activateAndUse { + val seedFinished = CompletableDeferred() + detached = launch(Job() + jobName("detached")) { + childSpan("seed").activateAndUse { + when (scoped) { + "none" -> Unit + "withContext" -> withContext(jobName("scoped")) {} + "coroutineScope" -> coroutineScope {} + "withTimeout" -> withTimeout(30_000) {} + else -> error("Unknown scoped coroutine: $scoped") + } + launch(coroutineContext + jobName("child")) { + gate.await() + childSpan("child").finish() + } + } + seedFinished.complete(Unit) + } + // Finish both spans before opening the child's gate, regardless of dispatcher timing. + seedFinished.await() + } + } + return 3 + } + + /** Children launched with the context of scoped coroutines inside their parent. */ + @Trace + open fun structuredChildrenOfScopedCoroutines(): Int { + runTest { + detached = launch(Job() + jobName("detached")) { + childSpan("seed").activateAndUse { + coroutineScope { + launch(coroutineContext + jobName("scope-child")) { + gate.await() + childSpan("scope-child").finish() + } + } + withContext(jobName("with-context")) { + launch(coroutineContext + jobName("context-child")) { + gate.await() + childSpan("context-child").finish() + } + } + } + } + } + return 4 + } + + /** A child launched with its parent's context, when the parent started without a trace. */ + open fun structuredChildOfUntracedCoroutine(): Int { + runTest { + detached = launch(Job() + jobName("detached")) { + childSpan("root").activateAndUse { + val started = CompletableDeferred() + launch(coroutineContext + jobName("child")) { + started.complete(Unit) + gate.await() + childSpan("child").finish() + } + // the child's first dispatch can keep the trace open, so finish the root after it + started.await() + } + } + } + return 2 + } + + /** A child launched with its parent's context but a different job, so not a structured child. */ + @Trace + open fun childWithReplacedJob(supervisor: Boolean): Int { + runTest { + val job = if (supervisor) SupervisorJob() else Job() + val started = CompletableDeferred() + detached = launch(coroutineContext + job + jobName("detached")) { + started.complete(Unit) + gate.await() + childSpan("child").finish() + } + // the child's first dispatch can keep the trace open, so finish the root after it + started.await() + } + return 2 + } + + /** A structured child that only adds its span while its cancelled parent waits for it. */ + @Trace + open fun structuredChildOfCancelledCoroutine(): Int { + runTest { + val started = CompletableDeferred() + detached = launch(Job() + jobName("detached")) { + launch(coroutineContext + jobName("child")) { + try { + started.complete(Unit) + CompletableDeferred().await() + } finally { + withContext(NonCancellable) { + delay(50) + childSpan("cleanup").finish() + } + } + } + } + // a child cancelled before it starts never runs its finally block + started.await() + } + return 2 + } } From 8247992acf668bcda03aeb64dd8e75b2e77380be Mon Sep 17 00:00:00 2001 From: Stuart McCulloch Date: Fri, 16 Oct 2026 15:33:24 +0100 Subject: [PATCH 2/7] Test Kotlin coroutine instrumentation across supported runtime versions Add coroutines16Test and coroutines18Test suites pinned to 1.6.4 and 1.8.1, reusing the existing latest-dependency test sources and shared fixtures. Keep the minimum-version suite on 1.3.0 and advance latestDepTest to 1.+, currently locked to 1.11.0. Give the flow builders explicit Int element types so the shared tests compile with the newer dependency using the existing Kotlin compiler. Regenerate the module dependency lockfile for all suites. Validation: all four suites on JDK 17 with both legacy and non-legacy context managers (562 tests per matrix); module spotlessCheck. --- .../kotlin-coroutines-1.3/build.gradle | 8 +- .../kotlin-coroutines-1.3/gradle.lockfile | 214 +++++++++--------- .../kotlin/KotlinCoroutineTests.kt | 4 +- 3 files changed, 120 insertions(+), 106 deletions(-) diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle index 0ca36dd63d6..48faf322f98 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle @@ -35,6 +35,9 @@ kotlin { } } +// Reuse the flow and context-lifecycle tests across intermediate and current releases. +addTestSuiteForDir('coroutines16Test', 'latestDepTest') +addTestSuiteForDir('coroutines18Test', 'latestDepTest') addTestSuite('latestDepTest') dependencies { @@ -52,8 +55,11 @@ dependencies { testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0" testImplementation testFixtures(project(':dd-java-agent:instrumentation:kotlin-coroutines-1.3')) + coroutines16TestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4" + coroutines18TestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.1" + latestDepTestImplementation libs.kotlin - latestDepTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.+" + latestDepTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.+" latestDepTestImplementation testFixtures(project(':dd-java-agent:instrumentation:kotlin-coroutines-1.3')) testFixturesCompileOnly(libs.bundles.groovy) diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile index b66cf574341..888f92e1b4c 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile @@ -2,63 +2,63 @@ # Manual edits can break the build and are not advised. # This file is expected to be part of source control. # To regenerate this file, run: ./gradlew :dd-java-agent:instrumentation:kotlin-coroutines-1.3:dependencies --write-locks -cafe.cryptography:curve25519-elisabeth:0.1.0=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -cafe.cryptography:ed25519-elisabeth:0.1.0=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -ch.qos.logback:logback-classic:1.2.13=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -ch.qos.logback:logback-core:1.2.13=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.blogspot.mydailyjava:weak-lock-free:0.17=buildTimeInstrumentationPlugin,compileClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.datadoghq.okhttp3:okhttp:3.12.15=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.datadoghq.okio:okio:1.17.6=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.datadoghq:dd-instrument-java:0.0.6=buildTimeInstrumentationPlugin,compileClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleBootstrap,muzzleTooling,runtimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.datadoghq:dd-javac-plugin-client:0.2.2=buildTimeInstrumentationPlugin,compileClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleBootstrap,muzzleTooling,runtimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.datadoghq:java-dogstatsd-client:4.4.5=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -com.datadoghq:sketches-java:0.8.3=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +cafe.cryptography:curve25519-elisabeth:0.1.0=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +cafe.cryptography:ed25519-elisabeth:0.1.0=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +ch.qos.logback:logback-classic:1.2.13=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +ch.qos.logback:logback-core:1.2.13=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.blogspot.mydailyjava:weak-lock-free:0.17=buildTimeInstrumentationPlugin,compileClasspath,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.datadoghq.okhttp3:okhttp:3.12.15=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.datadoghq.okio:okio:1.17.6=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.datadoghq:dd-instrument-java:0.0.6=buildTimeInstrumentationPlugin,compileClasspath,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleBootstrap,muzzleTooling,runtimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.datadoghq:dd-javac-plugin-client:0.2.2=buildTimeInstrumentationPlugin,compileClasspath,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleBootstrap,muzzleTooling,runtimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.datadoghq:java-dogstatsd-client:4.4.5=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +com.datadoghq:sketches-java:0.8.3=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath com.github.javaparser:javaparser-core:3.25.6=codenarc -com.github.jnr:jffi:1.3.15=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-a64asm:1.0.0=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-constants:0.10.4=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-enxio:0.32.20=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-ffi:2.2.19=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-posix:3.1.22=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-unixsocket:0.38.25=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -com.github.jnr:jnr-x86asm:1.0.2=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +com.github.jnr:jffi:1.3.15=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-a64asm:1.0.0=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-constants:0.10.4=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-enxio:0.32.20=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-ffi:2.2.19=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-posix:3.1.22=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-unixsocket:0.38.25=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +com.github.jnr:jnr-x86asm:1.0.2=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath com.github.spotbugs:spotbugs-annotations:4.10.4=compileClasspath,compileOnlyDependenciesMetadata,spotbugs com.github.spotbugs:spotbugs:4.10.4=spotbugs com.github.stephenc.jcip:jcip-annotations:1.0-1=spotbugs -com.google.auto.service:auto-service-annotations:1.1.1=annotationProcessor,compileClasspath,compileOnlyDependenciesMetadata,latestDepTestAnnotationProcessor,latestDepTestCompileClasspath,latestDepTestCompileOnlyDependenciesMetadata,testAnnotationProcessor,testCompileClasspath,testCompileOnlyDependenciesMetadata -com.google.auto.service:auto-service:1.1.1=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.auto:auto-common:1.2.1=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,compileClasspath,compileOnlyDependenciesMetadata,latestDepTestAnnotationProcessor,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.google.auto.service:auto-service-annotations:1.1.1=annotationProcessor,compileClasspath,compileOnlyDependenciesMetadata,coroutines16TestAnnotationProcessor,coroutines16TestCompileClasspath,coroutines16TestCompileOnlyDependenciesMetadata,coroutines18TestAnnotationProcessor,coroutines18TestCompileClasspath,coroutines18TestCompileOnlyDependenciesMetadata,latestDepTestAnnotationProcessor,latestDepTestCompileClasspath,latestDepTestCompileOnlyDependenciesMetadata,testAnnotationProcessor,testCompileClasspath,testCompileOnlyDependenciesMetadata +com.google.auto.service:auto-service:1.1.1=annotationProcessor,coroutines16TestAnnotationProcessor,coroutines18TestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.auto:auto-common:1.2.1=annotationProcessor,coroutines16TestAnnotationProcessor,coroutines18TestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,compileClasspath,compileOnlyDependenciesMetadata,coroutines16TestAnnotationProcessor,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestAnnotationProcessor,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestAnnotationProcessor,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,spotbugs,testAnnotationProcessor,testCompileClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath com.google.code.gson:gson:2.14.0=spotbugs -com.google.errorprone:error_prone_annotations:2.18.0=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.errorprone:error_prone_annotations:2.47.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.google.errorprone:error_prone_annotations:2.18.0=annotationProcessor,coroutines16TestAnnotationProcessor,coroutines18TestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.errorprone:error_prone_annotations:2.47.0=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath com.google.errorprone:error_prone_annotations:2.48.0=spotbugs -com.google.guava:failureaccess:1.0.1=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.guava:failureaccess:1.0.3=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.google.guava:guava:32.0.1-jre=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.guava:guava:33.6.0-jre=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,latestDepTestAnnotationProcessor,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testAnnotationProcessor,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.google.j2objc:j2objc-annotations:2.8=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor -com.google.j2objc:j2objc-annotations:3.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.google.re2j:re2j:1.8=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -com.squareup.moshi:moshi:1.11.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.squareup.okhttp3:logging-interceptor:3.12.12=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.squareup.okhttp3:okhttp:3.12.12=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -com.squareup.okio:okio:1.17.5=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.google.guava:failureaccess:1.0.1=annotationProcessor,coroutines16TestAnnotationProcessor,coroutines18TestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.guava:failureaccess:1.0.3=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.google.guava:guava:32.0.1-jre=annotationProcessor,coroutines16TestAnnotationProcessor,coroutines18TestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.guava:guava:33.6.0-jre=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,coroutines16TestAnnotationProcessor,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestAnnotationProcessor,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestAnnotationProcessor,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testAnnotationProcessor,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.google.j2objc:j2objc-annotations:2.8=annotationProcessor,coroutines16TestAnnotationProcessor,coroutines18TestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +com.google.j2objc:j2objc-annotations:3.1=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.google.re2j:re2j:1.8=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +com.squareup.moshi:moshi:1.11.0=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.squareup.okhttp3:logging-interceptor:3.12.12=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.squareup.okhttp3:okhttp:3.12.12=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +com.squareup.okio:okio:1.17.5=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath com.thoughtworks.qdox:qdox:1.12.1=codenarc -commons-fileupload:commons-fileupload:1.5=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -commons-io:commons-io:2.11.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +commons-fileupload:commons-fileupload:1.5=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +commons-io:commons-io:2.11.0=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath commons-io:commons-io:2.21.0=spotbugs -de.thetaphi:forbiddenapis:3.11=compileClasspath,compileOnlyDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -io.leangen.geantyref:geantyref:1.3.16=latestDepTestRuntimeClasspath,testRuntimeClasspath -io.sqreen:libsqreen:17.5.0=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -javax.servlet:javax.servlet-api:3.1.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +de.thetaphi:forbiddenapis:3.11=compileClasspath,compileOnlyDependenciesMetadata,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +io.leangen.geantyref:geantyref:1.3.16=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +io.sqreen:libsqreen:17.5.0=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +javax.servlet:javax.servlet-api:3.1.0=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath jaxen:jaxen:2.0.6=spotbugs -junit:junit:4.13.2=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -net.bytebuddy:byte-buddy-agent:1.18.12=buildTimeInstrumentationPlugin,compileClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -net.bytebuddy:byte-buddy:1.18.12=buildTimeInstrumentationPlugin,compileClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -net.java.dev.jna:jna-platform:5.8.0=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -net.java.dev.jna:jna:5.8.0=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +junit:junit:4.13.2=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +net.bytebuddy:byte-buddy-agent:1.18.12=buildTimeInstrumentationPlugin,compileClasspath,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +net.bytebuddy:byte-buddy:1.18.12=buildTimeInstrumentationPlugin,compileClasspath,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +net.java.dev.jna:jna-platform:5.8.0=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +net.java.dev.jna:jna:5.8.0=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath net.sf.saxon:Saxon-HE:12.10=spotbugs org.apache.ant:ant-antlr:1.10.14=codenarc org.apache.ant:ant-junit:1.10.14=codenarc @@ -67,24 +67,24 @@ org.apache.commons:commons-lang3:3.20.0=spotbugs org.apache.commons:commons-text:1.15.0=spotbugs org.apache.logging.log4j:log4j-api:2.26.1=spotbugs org.apache.logging.log4j:log4j-core:2.26.1=spotbugs -org.apiguardian:apiguardian-api:1.1.2=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata -org.checkerframework:checker-qual:3.33.0=annotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor +org.apiguardian:apiguardian-api:1.1.2=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata +org.checkerframework:checker-qual:3.33.0=annotationProcessor,coroutines16TestAnnotationProcessor,coroutines18TestAnnotationProcessor,latestDepTestAnnotationProcessor,testAnnotationProcessor org.codehaus.groovy:groovy-ant:3.0.23=codenarc org.codehaus.groovy:groovy-docgenerator:3.0.23=codenarc org.codehaus.groovy:groovy-groovydoc:3.0.23=codenarc org.codehaus.groovy:groovy-json:3.0.23=codenarc -org.codehaus.groovy:groovy-json:3.0.25=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath +org.codehaus.groovy:groovy-json:3.0.25=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath org.codehaus.groovy:groovy-templates:3.0.23=codenarc org.codehaus.groovy:groovy-xml:3.0.23=codenarc org.codehaus.groovy:groovy:3.0.23=codenarc -org.codehaus.groovy:groovy:3.0.25=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath +org.codehaus.groovy:groovy:3.0.25=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath org.codenarc:CodeNarc:3.7.0=codenarc org.dom4j:dom4j:2.2.0=spotbugs org.gmetrics:GMetrics:2.1.0=codenarc -org.hamcrest:hamcrest-core:1.3=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -org.hamcrest:hamcrest:3.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath -org.jctools:jctools-core-jdk11:4.0.6=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -org.jctools:jctools-core:4.0.6=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +org.hamcrest:hamcrest-core:1.3=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +org.hamcrest:hamcrest:3.0=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jctools:jctools-core-jdk11:4.0.6=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +org.jctools:jctools-core:4.0.6=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath org.jetbrains.intellij.deps:trove4j:1.0.20200330=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath org.jetbrains.kotlin:kotlin-build-tools-api:2.1.20=kotlinBuildToolsApiClasspath org.jetbrains.kotlin:kotlin-build-tools-impl:2.1.20=kotlinBuildToolsApiClasspath @@ -94,58 +94,66 @@ org.jetbrains.kotlin:kotlin-daemon-client:2.1.20=kotlinBuildToolsApiClasspath org.jetbrains.kotlin:kotlin-daemon-embeddable:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:2.1.20=kotlinKlibCommonizerClasspath org.jetbrains.kotlin:kotlin-reflect:1.6.10=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath -org.jetbrains.kotlin:kotlin-script-runtime:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures,kotlinKlibCommonizerClasspath -org.jetbrains.kotlin:kotlin-scripting-common:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures -org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures -org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures -org.jetbrains.kotlin:kotlin-scripting-jvm:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures -org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=compileClasspath,compileOnlyDependenciesMetadata,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21=latestDepTestImplementationDependenciesMetadata -org.jetbrains.kotlin:kotlin-stdlib:1.6.21=compileClasspath,compileOnlyDependenciesMetadata,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:1.9.21=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures,kotlinKlibCommonizerClasspath -org.jetbrains.kotlinx:atomicfu:0.23.1=latestDepTestImplementationDependenciesMetadata -org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath +org.jetbrains.kotlin:kotlin-script-runtime:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathCoroutines16Test,kotlinCompilerPluginClasspathCoroutines18Test,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures,kotlinKlibCommonizerClasspath +org.jetbrains.kotlin:kotlin-scripting-common:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathCoroutines16Test,kotlinCompilerPluginClasspathCoroutines18Test,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures +org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathCoroutines16Test,kotlinCompilerPluginClasspathCoroutines18Test,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures +org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathCoroutines16Test,kotlinCompilerPluginClasspathCoroutines18Test,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures +org.jetbrains.kotlin:kotlin-scripting-jvm:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerPluginClasspathCoroutines16Test,kotlinCompilerPluginClasspathCoroutines18Test,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures +org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=compileClasspath,compileOnlyDependenciesMetadata,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21=coroutines18TestImplementationDependenciesMetadata +org.jetbrains.kotlin:kotlin-stdlib-common:2.2.20=latestDepTestImplementationDependenciesMetadata +org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib:1.6.21=compileClasspath,compileOnlyDependenciesMetadata,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib:1.9.21=coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathCoroutines16Test,kotlinCompilerPluginClasspathCoroutines18Test,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures,kotlinKlibCommonizerClasspath +org.jetbrains.kotlin:kotlin-stdlib:2.2.20=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath +org.jetbrains.kotlinx:atomicfu:0.23.1=coroutines18TestImplementationDependenciesMetadata,latestDepTestImplementationDependenciesMetadata +org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.11.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1=coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.11.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0=compileClasspath,compileOnlyDependenciesMetadata,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath -org.jetbrains:annotations:13.0=compileClasspath,compileOnlyDependenciesMetadata,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures,kotlinKlibCommonizerClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.jetbrains:annotations:23.0.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath -org.jspecify:jspecify:1.0.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-api:5.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-engine:5.14.1=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -org.junit.jupiter:junit-jupiter-params:5.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.junit.jupiter:junit-jupiter:5.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.junit.platform:junit-platform-commons:1.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.junit.platform:junit-platform-engine:1.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.junit.platform:junit-platform-launcher:1.14.1=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-runner:1.14.1=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-suite-api:1.14.1=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -org.junit.platform:junit-platform-suite-commons:1.14.1=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -org.junit:junit-bom:5.14.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.mockito:mockito-core:4.4.0=latestDepTestRuntimeClasspath,testRuntimeClasspath -org.objenesis:objenesis:3.3=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath -org.opentest4j:opentest4j:1.3.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.1=coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0=compileClasspath,compileOnlyDependenciesMetadata,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1=coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath +org.jetbrains:annotations:13.0=compileClasspath,compileOnlyDependenciesMetadata,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathCoroutines16Test,kotlinCompilerPluginClasspathCoroutines18Test,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures,kotlinKlibCommonizerClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains:annotations:23.0.0=coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath +org.jspecify:jspecify:1.0.0=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-api:5.14.1=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-engine:5.14.1=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +org.junit.jupiter:junit-jupiter-params:5.14.1=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.junit.jupiter:junit-jupiter:5.14.1=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.junit.platform:junit-platform-commons:1.14.1=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.junit.platform:junit-platform-engine:1.14.1=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.junit.platform:junit-platform-launcher:1.14.1=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-runner:1.14.1=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-suite-api:1.14.1=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +org.junit.platform:junit-platform-suite-commons:1.14.1=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +org.junit:junit-bom:5.14.1=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.mockito:mockito-core:4.4.0=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testRuntimeClasspath +org.objenesis:objenesis:3.3=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath +org.opentest4j:opentest4j:1.3.0=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.ow2.asm:asm-analysis:9.10.1=spotbugs -org.ow2.asm:asm-analysis:9.7.1=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -org.ow2.asm:asm-commons:9.10.1=latestDepTestRuntimeClasspath,spotbugs,testFixturesRuntimeClasspath,testRuntimeClasspath -org.ow2.asm:asm-tree:9.10.1=latestDepTestRuntimeClasspath,spotbugs,testFixturesRuntimeClasspath,testRuntimeClasspath +org.ow2.asm:asm-analysis:9.7.1=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +org.ow2.asm:asm-commons:9.10.1=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,spotbugs,testFixturesRuntimeClasspath,testRuntimeClasspath +org.ow2.asm:asm-tree:9.10.1=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,spotbugs,testFixturesRuntimeClasspath,testRuntimeClasspath org.ow2.asm:asm-util:9.10.1=spotbugs -org.ow2.asm:asm-util:9.7.1=latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -org.ow2.asm:asm:9.10.1=buildTimeInstrumentationPlugin,compileClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,spotbugs,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.slf4j:jcl-over-slf4j:1.7.30=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.slf4j:jul-to-slf4j:1.7.30=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.slf4j:log4j-over-slf4j:1.7.30=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.ow2.asm:asm-util:9.7.1=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +org.ow2.asm:asm:9.10.1=buildTimeInstrumentationPlugin,compileClasspath,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,implementationDependenciesMetadata,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,spotbugs,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.slf4j:jcl-over-slf4j:1.7.30=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.slf4j:jul-to-slf4j:1.7.30=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.slf4j:log4j-over-slf4j:1.7.30=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.slf4j:slf4j-api:1.7.30=buildTimeInstrumentationPlugin,compileClasspath,implementationDependenciesMetadata,muzzleBootstrap,muzzleTooling,runtimeClasspath -org.slf4j:slf4j-api:1.7.32=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.slf4j:slf4j-api:1.7.32=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.slf4j:slf4j-api:2.0.17=spotbugsSlf4j org.slf4j:slf4j-api:2.0.18=spotbugs org.slf4j:slf4j-simple:2.0.17=spotbugsSlf4j -org.snakeyaml:snakeyaml-engine:2.9=buildTimeInstrumentationPlugin,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath -org.spockframework:spock-bom:2.4-groovy-3.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath -org.spockframework:spock-core:2.4-groovy-3.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath -org.tabletest:tabletest-junit:1.2.2=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath -org.tabletest:tabletest-parser:1.2.1=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath +org.snakeyaml:snakeyaml-engine:2.9=buildTimeInstrumentationPlugin,coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,muzzleTooling,runtimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath +org.spockframework:spock-bom:2.4-groovy-3.0=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath +org.spockframework:spock-core:2.4-groovy-3.0=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath +org.tabletest:tabletest-junit:1.2.2=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath +org.tabletest:tabletest-parser:1.2.1=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testImplementationDependenciesMetadata,testRuntimeClasspath org.xmlresolver:xmlresolver:5.3.3=spotbugs -empty=apiDependenciesMetadata,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,latestDepTestApiDependenciesMetadata,latestDepTestIntransitiveDependenciesMetadata,latestDepTestKotlinScriptDefExtensions,spotbugsPlugins,testApiDependenciesMetadata,testFixturesAnnotationProcessor,testFixturesIntransitiveDependenciesMetadata,testFixturesKotlinScriptDefExtensions,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions +empty=apiDependenciesMetadata,coroutines16TestApiDependenciesMetadata,coroutines16TestIntransitiveDependenciesMetadata,coroutines16TestKotlinScriptDefExtensions,coroutines18TestApiDependenciesMetadata,coroutines18TestIntransitiveDependenciesMetadata,coroutines18TestKotlinScriptDefExtensions,intransitiveDependenciesMetadata,kotlinCompilerPluginClasspath,kotlinNativeCompilerPluginClasspath,kotlinScriptDefExtensions,latestDepTestApiDependenciesMetadata,latestDepTestIntransitiveDependenciesMetadata,latestDepTestKotlinScriptDefExtensions,spotbugsPlugins,testApiDependenciesMetadata,testFixturesAnnotationProcessor,testFixturesIntransitiveDependenciesMetadata,testFixturesKotlinScriptDefExtensions,testIntransitiveDependenciesMetadata,testKotlinScriptDefExtensions diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt index 8bd598d68ed..d267de0d076 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt @@ -12,7 +12,7 @@ class KotlinCoroutineTests(dispatcher: CoroutineDispatcher) : CoreKotlinCoroutin @Trace fun tracedAcrossFlows(withModifiedContext: Boolean): Int = runTest { - val producer = flow { + val producer = flow { repeat(3) { tracedChild("produce_$it") if (withModifiedContext) { @@ -36,7 +36,7 @@ class KotlinCoroutineTests(dispatcher: CoroutineDispatcher) : CoreKotlinCoroutin @Trace fun traceAfterFlow(): Int = runTest { - val f = flow { + val f = flow { childSpan("inside-flow").activateAndUse { println("insideFlowSpan") } From 9a8b48c79eeac34bbff89b236627628073ae7529 Mon Sep 17 00:00:00 2001 From: Stuart McCulloch Date: Fri, 16 Oct 2026 15:44:15 +0100 Subject: [PATCH 3/7] Use local root spans to track coroutine trace ownership Identify the trace held open by a coroutine or its parent using the local root AgentSpan rather than AgentTraceCollector. Compare local root span identity when deciding whether a structured child needs its own trace continuation, and rename the ownership fields and helper accordingly. Validation: all four coroutine version suites on JDK 17 with legacy and non-legacy context managers (562 tests per matrix); module spotlessCheck. --- .../DatadogThreadContextElement.java | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java index e400a76ed04..b72d3307830 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java @@ -4,7 +4,6 @@ import datadog.context.ContextContinuation; import datadog.trace.api.GenericClassValue; import datadog.trace.bootstrap.instrumentation.api.AgentSpan; -import datadog.trace.bootstrap.instrumentation.api.AgentTraceCollector; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -44,7 +43,7 @@ public static CoroutineContext addDatadogElement(CoroutineContext coroutineConte return coroutineContext.plus(new DatadogThreadContextElement(null)); } DatadogThreadContextElement fresh = - new DatadogThreadContextElement(existing.traceKeptOpenFor(coroutineContext.get(Job.Key))); + new DatadogThreadContextElement(existing.localRootFor(coroutineContext.get(Job.Key))); // keep the element's position, so elements added after it can still update scopes on top return coroutineContext.fold(EmptyCoroutineContext.INSTANCE, fresh); } @@ -55,26 +54,26 @@ public CoroutineContext invoke(CoroutineContext rebuilt, CoroutineContext.Elemen return rebuilt.plus(element.getKey() == DATADOG_KEY ? this : element); } - @Nullable private AgentTraceCollector traceKeptOpenByParent; + @Nullable private AgentSpan parentLocalRootSpan; private volatile Context context; private volatile ContextContinuation continuation; /** The coroutine this element was created for. */ @Nullable private volatile Job owner; - /** The trace kept open until this coroutine completes, by its own continuation or its parent. */ - @Nullable private volatile AgentTraceCollector traceKeptOpen; + /** The local root of the trace kept open by this coroutine or its parent. */ + @Nullable private volatile AgentSpan localRootSpan; - private DatadogThreadContextElement(@Nullable AgentTraceCollector traceKeptOpenByParent) { - this.traceKeptOpenByParent = traceKeptOpenByParent; + private DatadogThreadContextElement(@Nullable AgentSpan parentLocalRootSpan) { + this.parentLocalRootSpan = parentLocalRootSpan; } - /** Returns the trace this coroutine keeps open, if coroutines of this job are its children. */ + /** Returns the local root kept open for structured children launched with this job. */ @Nullable - private AgentTraceCollector traceKeptOpenFor(@Nullable Job job) { - AgentTraceCollector trace = traceKeptOpen; + private AgentSpan localRootFor(@Nullable Job job) { + AgentSpan rootSpan = localRootSpan; // structured children complete before their parent, which keeps its trace open until then - return trace != null && job != null && (job == owner || isScopedBy(job)) ? trace : null; + return rootSpan != null && job != null && (job == owner || isScopedBy(job)) ? rootSpan : null; } /** Scoped coroutines share their caller's element and complete before the caller does. */ @@ -106,30 +105,30 @@ private synchronized void captureInitialContext() { if (context == null) { Context initial = Context.current(); // this coroutine isn't running yet, so its context can't change under us - AgentTraceCollector trace = traceOf(initial); - if (trace != null) { - if (trace == traceKeptOpenByParent) { + AgentSpan rootSpan = localRootOf(initial); + if (rootSpan != null) { + if (rootSpan == parentLocalRootSpan) { // the parent keeps this trace open until after this child completes - traceKeptOpen = trace; + localRootSpan = rootSpan; } else { // stop enclosing trace from finishing early ContextContinuation captured = initial.capture(); continuation = captured; if (captured.context() != Context.root()) { // only when the capture was accepted, e.g. async propagation is enabled - traceKeptOpen = trace; + localRootSpan = rootSpan; } } } context = initial; - traceKeptOpenByParent = null; + parentLocalRootSpan = null; } } @Nullable - private static AgentTraceCollector traceOf(Context context) { + private static AgentSpan localRootOf(Context context) { AgentSpan span = AgentSpan.fromContext(context); - return span != null ? span.spanContext().getTraceCollector() : null; + return span != null ? span.getLocalRootSpan() : null; } public static void cancelDatadogContext(@Nonnull AbstractCoroutine coroutine) { @@ -138,7 +137,7 @@ public static void cancelDatadogContext(@Nonnull AbstractCoroutine coroutine) // scoped coroutines share their caller's element, but must not release its trace hold return; } - datadog.traceKeptOpen = null; + datadog.localRootSpan = null; ContextContinuation continuation = CONTINUATION.getAndSet(datadog, null); if (continuation != null) { // release enclosing trace now the coroutine has completed From c81cde8b9bae7e32e359b08a4ac580bcf9997aca Mon Sep 17 00:00:00 2001 From: Stuart McCulloch Date: Fri, 16 Oct 2026 18:27:53 +0100 Subject: [PATCH 4/7] Release completed coroutine owners with a sentinel --- .../DatadogThreadContextElement.java | 7 ++- ...stractDatadogThreadContextElementTest.java | 46 +++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java index b72d3307830..9d6ff1bbf49 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java @@ -27,6 +27,8 @@ public final class DatadogThreadContextElement private static final CoroutineContext.Key DATADOG_KEY = new CoroutineContext.Key() {}; + private static final Object COMPLETED = new Object(); + /** Coroutines built by coroutineScope, withContext, etc. that their caller waits for. */ private static final ClassValue SCOPED_COROUTINE = GenericClassValue.of( @@ -58,8 +60,8 @@ public CoroutineContext invoke(CoroutineContext rebuilt, CoroutineContext.Elemen private volatile Context context; private volatile ContextContinuation continuation; - /** The coroutine this element was created for. */ - @Nullable private volatile Job owner; + /** The owning Job, null before initialization, or COMPLETED after releasing the owner. */ + @Nullable private volatile Object owner; /** The local root of the trace kept open by this coroutine or its parent. */ @Nullable private volatile AgentSpan localRootSpan; @@ -137,6 +139,7 @@ public static void cancelDatadogContext(@Nonnull AbstractCoroutine coroutine) // scoped coroutines share their caller's element, but must not release its trace hold return; } + datadog.owner = COMPLETED; datadog.localRootSpan = null; ContextContinuation continuation = CONTINUATION.getAndSet(datadog, null); if (continuation != null) { diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/java/datadog/trace/instrumentation/kotlin/coroutines/AbstractDatadogThreadContextElementTest.java b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/java/datadog/trace/instrumentation/kotlin/coroutines/AbstractDatadogThreadContextElementTest.java index da1a2234bdd..0664a648a0b 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/java/datadog/trace/instrumentation/kotlin/coroutines/AbstractDatadogThreadContextElementTest.java +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/java/datadog/trace/instrumentation/kotlin/coroutines/AbstractDatadogThreadContextElementTest.java @@ -1,12 +1,17 @@ package datadog.trace.instrumentation.kotlin.coroutines; import static datadog.trace.instrumentation.kotlin.coroutines.DatadogThreadContextElement.addDatadogElement; +import static datadog.trace.instrumentation.kotlin.coroutines.DatadogThreadContextElement.cancelDatadogContext; +import static datadog.trace.instrumentation.kotlin.coroutines.DatadogThreadContextElement.captureDatadogContext; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNotSame; import static org.junit.jupiter.api.Assertions.assertSame; +import java.lang.reflect.Field; import java.util.ArrayList; import java.util.List; +import kotlin.Unit; import kotlin.coroutines.AbstractCoroutineContextElement; import kotlin.coroutines.Continuation; import kotlin.coroutines.ContinuationInterceptor; @@ -14,11 +19,52 @@ import kotlin.coroutines.EmptyCoroutineContext; import kotlin.jvm.functions.Function2; import kotlinx.coroutines.ThreadContextElement; +import kotlinx.coroutines.internal.ScopeCoroutine; import org.junit.jupiter.api.Test; import org.tabletest.junit.TableTest; /** Context replacement checks shared by the oldest and latest dependency suites. */ public abstract class AbstractDatadogThreadContextElementTest { + @Test + void completionReleasesOwnerWithoutAllowingAnotherCoroutineToClaimElement() throws Exception { + DatadogThreadContextElement element = + (DatadogThreadContextElement) addDatadogElement(EmptyCoroutineContext.INSTANCE); + Continuation completion = + new Continuation() { + @Override + public CoroutineContext getContext() { + return EmptyCoroutineContext.INSTANCE; + } + + @Override + public void resumeWith(Object result) {} + }; + ScopeCoroutine owner = new ScopeCoroutine<>(element, completion); + captureDatadogContext(owner); + Field ownerField = DatadogThreadContextElement.class.getDeclaredField("owner"); + ownerField.setAccessible(true); + assertSame(owner, ownerField.get(element)); + + ScopeCoroutine scoped = new ScopeCoroutine<>(owner.getContext(), completion); + captureDatadogContext(scoped); + scoped.resumeWith(Unit.INSTANCE); + cancelDatadogContext(scoped); + assertSame(owner, ownerField.get(element), "Scoped completion must preserve the owner"); + + owner.resumeWith(Unit.INSTANCE); + cancelDatadogContext(owner); + Object completed = ownerField.get(element); + assertNotNull(completed, "Completed elements must remain distinct from uninitialized elements"); + assertNotSame(owner, completed, "Completed elements must release the owning coroutine"); + + ScopeCoroutine later = new ScopeCoroutine<>(element, completion); + captureDatadogContext(later); + later.resumeWith(Unit.INSTANCE); + cancelDatadogContext(later); + assertSame( + completed, ownerField.get(element), "Completed elements must not acquire a new owner"); + } + @TableTest({ "Scenario | Ordinary before | Ordinary after | Hooks before | Hooks after | Dispatcher | Custom view", "Singleton | 0 | 0 | 0 | 0 | false | false ", From d4ed998976e326712056027f21b64e845d4b1110 Mon Sep 17 00:00:00 2001 From: Stuart McCulloch Date: Fri, 16 Oct 2026 18:32:28 +0100 Subject: [PATCH 5/7] Align coroutine test dependencies with their core modules --- .../kotlin-coroutines-1.3/build.gradle | 6 +++--- .../kotlin-coroutines-1.3/gradle.lockfile | 20 ++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle index 48faf322f98..27c7a630608 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/build.gradle @@ -55,11 +55,11 @@ dependencies { testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0" testImplementation testFixtures(project(':dd-java-agent:instrumentation:kotlin-coroutines-1.3')) - coroutines16TestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4" - coroutines18TestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.1" + coroutines16TestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" + coroutines18TestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1" latestDepTestImplementation libs.kotlin - latestDepTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.+" + latestDepTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.+" latestDepTestImplementation testFixtures(project(':dd-java-agent:instrumentation:kotlin-coroutines-1.3')) testFixturesCompileOnly(libs.bundles.groovy) diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile index 888f92e1b4c..1bcca5a8846 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/gradle.lockfile @@ -102,24 +102,26 @@ org.jetbrains.kotlin:kotlin-scripting-jvm:2.1.20=kotlinBuildToolsApiClasspath,ko org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21=compileClasspath,compileOnlyDependenciesMetadata,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.jetbrains.kotlin:kotlin-stdlib-common:1.9.21=coroutines18TestImplementationDependenciesMetadata org.jetbrains.kotlin:kotlin-stdlib-common:2.2.20=latestDepTestImplementationDependenciesMetadata -org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21=coroutines16TestCompileClasspath,coroutines16TestRuntimeClasspath +org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21=coroutines16TestCompileClasspath,coroutines16TestRuntimeClasspath org.jetbrains.kotlin:kotlin-stdlib:1.6.21=compileClasspath,compileOnlyDependenciesMetadata,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.jetbrains.kotlin:kotlin-stdlib:1.9.21=coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath org.jetbrains.kotlin:kotlin-stdlib:2.1.20=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathCoroutines16Test,kotlinCompilerPluginClasspathCoroutines18Test,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures,kotlinKlibCommonizerClasspath org.jetbrains.kotlin:kotlin-stdlib:2.2.20=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath +org.jetbrains.kotlinx:atomicfu:0.17.3=coroutines16TestImplementationDependenciesMetadata org.jetbrains.kotlinx:atomicfu:0.23.1=coroutines18TestImplementationDependenciesMetadata,latestDepTestImplementationDependenciesMetadata -org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.11.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1=coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.11.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.11.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1=coroutines18TestCompileClasspath,coroutines18TestRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.11.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4=coroutines16TestCompileClasspath,coroutines16TestRuntimeClasspath org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.0=kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinKlibCommonizerClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.1=coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.1=coroutines18TestCompileClasspath,coroutines18TestRuntimeClasspath org.jetbrains.kotlinx:kotlinx-coroutines-core:1.11.0=latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath -org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0=compileClasspath,compileOnlyDependenciesMetadata,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0=compileClasspath,compileOnlyDependenciesMetadata,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath +org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1=coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath org.jetbrains:annotations:13.0=compileClasspath,compileOnlyDependenciesMetadata,coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,kotlinBuildToolsApiClasspath,kotlinCompilerClasspath,kotlinCompilerPluginClasspathCoroutines16Test,kotlinCompilerPluginClasspathCoroutines18Test,kotlinCompilerPluginClasspathLatestDepTest,kotlinCompilerPluginClasspathMain,kotlinCompilerPluginClasspathTest,kotlinCompilerPluginClasspathTestFixtures,kotlinKlibCommonizerClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath -org.jetbrains:annotations:23.0.0=coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath +org.jetbrains:annotations:23.0.0=coroutines18TestCompileClasspath,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestRuntimeClasspath org.jspecify:jspecify:1.0.0=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesApiDependenciesMetadata,testFixturesCompileClasspath,testFixturesImplementationDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.junit.jupiter:junit-jupiter-api:5.14.1=coroutines16TestCompileClasspath,coroutines16TestImplementationDependenciesMetadata,coroutines16TestRuntimeClasspath,coroutines18TestCompileClasspath,coroutines18TestImplementationDependenciesMetadata,coroutines18TestRuntimeClasspath,latestDepTestCompileClasspath,latestDepTestImplementationDependenciesMetadata,latestDepTestRuntimeClasspath,testCompileClasspath,testFixturesCompileClasspath,testFixturesCompileOnlyDependenciesMetadata,testFixturesRuntimeClasspath,testImplementationDependenciesMetadata,testRuntimeClasspath org.junit.jupiter:junit-jupiter-engine:5.14.1=coroutines16TestRuntimeClasspath,coroutines18TestRuntimeClasspath,latestDepTestRuntimeClasspath,testFixturesRuntimeClasspath,testRuntimeClasspath From 54df510fc775e75e826ca5c0593bc728bc1c9c93 Mon Sep 17 00:00:00 2001 From: Stuart McCulloch Date: Mon, 19 Oct 2026 11:47:42 +0100 Subject: [PATCH 6/7] Preserve active span changes when a scoped coroutine reinstalls the Datadog element --- .../src/latestDepTest/kotlin/KotlinCoroutineTests.kt | 2 +- .../kotlin/coroutines/DatadogThreadContextElement.java | 3 +++ .../src/test/kotlin/KotlinCoroutineTests.kt | 2 +- .../AbstractKotlinCoroutineInstrumentationTest.groovy | 8 +++++--- .../kotlin/coroutines/CoreKotlinCoroutineTests.kt | 8 +++++--- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt index d267de0d076..74da3dd1bff 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/latestDepTest/kotlin/KotlinCoroutineTests.kt @@ -55,7 +55,7 @@ class KotlinCoroutineTests(dispatcher: CoroutineDispatcher) : CoreKotlinCoroutin override fun structuredChildrenOutliveSeedSpan(): Int = super.structuredChildrenOutliveSeedSpan() @Trace - override fun structuredChildrenOfScopedCoroutines(): Int = super.structuredChildrenOfScopedCoroutines() + override fun structuredChildrenOfScopedCoroutines(suspendScope: Boolean): Int = super.structuredChildrenOfScopedCoroutines(suspendScope) @Trace override fun childWithReplacedJob(supervisor: Boolean): Int = super.childWithReplacedJob(supervisor) diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java index 9d6ff1bbf49..25129df46e3 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/main/java/datadog/trace/instrumentation/kotlin/coroutines/DatadogThreadContextElement.java @@ -99,6 +99,9 @@ public static void captureDatadogContext(@Nonnull AbstractCoroutine coroutine } if (datadog.context == null) { datadog.captureInitialContext(); + } else if (datadog.owner != coroutine && datadog.isScopedBy(coroutine)) { + // preserve active span changes when a scoped coroutine reinstalls this element + datadog.context = Context.current(); } } } diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/kotlin/KotlinCoroutineTests.kt b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/kotlin/KotlinCoroutineTests.kt index 65f2352c6ed..a04bd04c99f 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/kotlin/KotlinCoroutineTests.kt +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/test/kotlin/KotlinCoroutineTests.kt @@ -36,7 +36,7 @@ class KotlinCoroutineTests(dispatcher: CoroutineDispatcher) : CoreKotlinCoroutin override fun structuredChildrenOutliveSeedSpan(): Int = super.structuredChildrenOutliveSeedSpan() @Trace - override fun structuredChildrenOfScopedCoroutines(): Int = super.structuredChildrenOfScopedCoroutines() + override fun structuredChildrenOfScopedCoroutines(suspendScope: Boolean): Int = super.structuredChildrenOfScopedCoroutines(suspendScope) @Trace override fun childWithReplacedJob(supervisor: Boolean): Int = super.childWithReplacedJob(supervisor) diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy index 153b195d519..37c44595760 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy @@ -489,10 +489,10 @@ abstract class AbstractKotlinCoroutineInstrumentationTest trace = TEST_WRITER.get(0) @@ -504,7 +504,9 @@ abstract class AbstractKotlinCoroutineInstrumentationTest + [false, true].collect { dispatcher + it } + } } def "structured child keeps the trace open when its parent started without one #dispatcherName"() { diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/kotlin/datadog/trace/instrumentation/kotlin/coroutines/CoreKotlinCoroutineTests.kt b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/kotlin/datadog/trace/instrumentation/kotlin/coroutines/CoreKotlinCoroutineTests.kt index fbfabd5c199..b4d36e2122c 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/kotlin/datadog/trace/instrumentation/kotlin/coroutines/CoreKotlinCoroutineTests.kt +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/kotlin/datadog/trace/instrumentation/kotlin/coroutines/CoreKotlinCoroutineTests.kt @@ -482,12 +482,14 @@ abstract class CoreKotlinCoroutineTests(private val dispatcher: CoroutineDispatc /** Children launched with the context of scoped coroutines inside their parent. */ @Trace - open fun structuredChildrenOfScopedCoroutines(): Int { + open fun structuredChildrenOfScopedCoroutines(suspendScope: Boolean): Int { + if (!suspendScope) gate.complete(Unit) runTest { - detached = launch(Job() + jobName("detached")) { + detached = launch(Job() + jobName("detached"), start = CoroutineStart.UNDISPATCHED) { childSpan("seed").activateAndUse { + // Enter the child inline so the closed gate always suspends this scope. coroutineScope { - launch(coroutineContext + jobName("scope-child")) { + launch(coroutineContext + jobName("scope-child"), start = CoroutineStart.UNDISPATCHED) { gate.await() childSpan("scope-child").finish() } From 3717bb6f3fa6201efad69c31a68700b3980317f3 Mon Sep 17 00:00:00 2001 From: Stuart McCulloch Date: Mon, 19 Oct 2026 12:03:10 +0100 Subject: [PATCH 7/7] Mark this lazy coroutine test as flaky when using the legacy context manager --- .../AbstractKotlinCoroutineInstrumentationTest.groovy | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy index 37c44595760..0e24eb97c0b 100644 --- a/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy +++ b/dd-java-agent/instrumentation/kotlin-coroutines-1.3/src/testFixtures/groovy/datadog/trace/instrumentation/kotlin/coroutines/AbstractKotlinCoroutineInstrumentationTest.groovy @@ -2,8 +2,10 @@ package datadog.trace.instrumentation.kotlin.coroutines import static datadog.trace.agent.test.utils.TraceUtils.runUnderTrace +import datadog.trace.api.InstrumenterConfig import datadog.trace.agent.test.InstrumentationSpecification import datadog.trace.core.DDSpan +import datadog.trace.test.util.Flaky import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ThreadPoolDispatcherKt @@ -329,6 +331,12 @@ abstract class AbstractKotlinCoroutineInstrumentationTest