Skip to content

Commit a818a4a

Browse files
committed
Do not shadow ByteBuddy agent
This way, it can work even with BlockHound on JDK8, which also uses ByteBuddy and thus was in conflict. Kind of solves #1060, but since now the debugging routine depends on BlockHound, where, it seems, the same problem was not fixed, the original cause for concern probably still stands.
1 parent 26a8fde commit a818a4a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ atomicfu_version=0.14.1
1313
html_version=0.6.8
1414
lincheck_version=2.5.3
1515
dokka_version=0.9.16-rdev-2-mpp-hacks
16-
byte_buddy_version=1.9.3
16+
byte_buddy_version=1.10.7
1717
reactor_vesion=3.2.5.RELEASE
1818
reactive_streams_version=1.0.2
1919
rxjava2_version=2.2.8

kotlinx-coroutines-debug/build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ configurations {
2121
dependencies {
2222
compileOnly "junit:junit:$junit_version"
2323
shadowDeps "net.bytebuddy:byte-buddy:$byte_buddy_version"
24-
shadowDeps "net.bytebuddy:byte-buddy-agent:$byte_buddy_version"
24+
compile "net.bytebuddy:byte-buddy-agent:$byte_buddy_version"
2525
compile 'io.projectreactor.tools:blockhound:1.0.1.BUILD-SNAPSHOT'
2626
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
27+
runtime "net.java.dev.jna:jna:5.5.0"
2728
}
2829

2930
jar {

kotlinx-coroutines-debug/src/internal/DebugProbesImpl.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ internal object DebugProbesImpl {
4747
public fun install() {
4848
if (++installations > 1) return
4949

50-
ByteBuddyAgent.install()
50+
ByteBuddyAgent.install(ByteBuddyAgent.AttachmentProvider.ForEmulatedAttachment.INSTANCE)
5151
val cl = Class.forName("kotlin.coroutines.jvm.internal.DebugProbesKt")
5252
val cl2 = Class.forName("kotlinx.coroutines.debug.DebugProbesKt")
5353

0 commit comments

Comments
 (0)