Skip to content

Commit

Permalink
Do not shadow ByteBuddy agent
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dkhalanskyjb committed Mar 27, 2020
1 parent 5f1e27e commit 55231aa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Expand Up @@ -14,7 +14,7 @@ knit_version=0.1.3
html_version=0.6.8
lincheck_version=2.5.3
dokka_version=0.9.16-rdev-2-mpp-hacks
byte_buddy_version=1.9.3
byte_buddy_version=1.10.7
reactor_vesion=3.2.5.RELEASE
reactive_streams_version=1.0.2
rxjava2_version=2.2.8
Expand Down
4 changes: 3 additions & 1 deletion kotlinx-coroutines-debug/build.gradle
Expand Up @@ -21,9 +21,11 @@ configurations {
dependencies {
compileOnly "junit:junit:$junit_version"
shadowDeps "net.bytebuddy:byte-buddy:$byte_buddy_version"
shadowDeps "net.bytebuddy:byte-buddy-agent:$byte_buddy_version"
compile "net.bytebuddy:byte-buddy-agent:$byte_buddy_version"
compile 'io.projectreactor.tools:blockhound:1.0.1.BUILD-SNAPSHOT'
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
runtime "net.java.dev.jna:jna:5.5.0"
runtime "net.java.dev.jna:jna-platform:5.5.0"
}

jar {
Expand Down
2 changes: 1 addition & 1 deletion kotlinx-coroutines-debug/src/internal/DebugProbesImpl.kt
Expand Up @@ -57,7 +57,7 @@ internal object DebugProbesImpl {
public fun install(): Unit = coroutineStateLock.write {
if (++installations > 1) return

ByteBuddyAgent.install()
ByteBuddyAgent.install(ByteBuddyAgent.AttachmentProvider.ForEmulatedAttachment.INSTANCE)
val cl = Class.forName("kotlin.coroutines.jvm.internal.DebugProbesKt")
val cl2 = Class.forName("kotlinx.coroutines.debug.DebugProbesKt")

Expand Down

0 comments on commit 55231aa

Please sign in to comment.