Skip to content

Commit

Permalink
Update BlockHound version to be compatible with JDK 17 (#3771)
Browse files Browse the repository at this point in the history
* Also, exclude integration from docs, it shouldn't be there

Fixes #3701
  • Loading branch information
qwwdfsad authored Jun 5, 2023
1 parent 5db3dab commit 0288b72
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
5 changes: 1 addition & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ javafx_version=17.0.2
javafx_plugin_version=0.0.8
binary_compatibility_validator_version=0.12.0
kover_version=0.7.0-Beta
blockhound_version=1.0.2.RELEASE
blockhound_version=1.0.8.RELEASE
jna_version=5.9.0

# Android versions
Expand All @@ -49,9 +49,6 @@ jsdom_global_version=3.0.2
kotlin.incremental.multiplatform=true
kotlin.native.ignoreDisabledTargets=true

# Site generation
jekyll_version=4.0

# JS IR backend sometimes crashes with out-of-memory
# TODO: Remove once KT-37187 is fixed
org.gradle.jvmargs=-Xmx3g
Expand Down
2 changes: 1 addition & 1 deletion kotlinx-coroutines-debug/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ of coroutines hierarchy referenced by a [Job] or [CoroutineScope] instances usin
This module also provides an automatic [BlockHound](https://github.com/reactor/BlockHound) integration
that detects when a blocking operation was called in a coroutine context that prohibits it. In order to use it,
please follow the BlockHound [quick start guide](
https://github.com/reactor/BlockHound/blob/1.0.2.RELEASE/docs/quick_start.md).
https://github.com/reactor/BlockHound/blob/1.0.8.RELEASE/docs/quick_start.md).

### Using in your project

Expand Down
7 changes: 7 additions & 0 deletions kotlinx-coroutines-debug/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ java {
disableAutoTargetJvm()
}

// This is required for BlockHound tests to work, see https://github.com/Kotlin/kotlinx.coroutines/issues/3701
tasks.withType(Test).configureEach {
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_13)) {
jvmArgs += ["-XX:+AllowRedefinitionToAddDeleteMethods"]
}
}

jar {
setEnabled(false)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
* Copyright 2016-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/

@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
Expand All @@ -10,6 +10,9 @@ import kotlinx.coroutines.scheduling.*
import reactor.blockhound.*
import reactor.blockhound.integration.*

/**
* @suppress
*/
public class CoroutinesBlockHoundIntegration : BlockHoundIntegration {

override fun applyTo(builder: BlockHound.Builder): Unit = with(builder) {
Expand Down

0 comments on commit 0288b72

Please sign in to comment.