Closed yschimke closed 3 weeks ago
@yschimke thanks for reporting the issue We will check it out and get back to you
@yschimke Apologies for replying so late, but when I tried to check out the branch in the reproducer, I am getting the following error: git checkout 7842d7da9f89d99b85f6a539a146b678c7558417 fatal: reference is not a tree: 7842d7da9f89d99b85f6a539a146b678c7558417
Hi @yschimke any update on this?
@mcraj017 my bad, I had pushed my commit to my fork, not the square org repo. I've updated the PR (SHA bff87d1fc6bf1527a4052b0b5251fab53238f714) and pushed to square org. Should work now.
This workaround fixes it
--- a/okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt
+++ b/okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt
@@ -76,22 +76,24 @@ class TaskQueue internal constructor(
}
/** Overload of [schedule] that uses a lambda for a repeating task. */
- inline fun schedule(
+ fun schedule(
name: String,
delayNanos: Long = 0L,
- crossinline block: () -> Long
+ block: () -> Long
) {
schedule(object : Task(name) {
- override fun runOnce() = block()
+ override fun runOnce(): Long {
+ return block()
+ }
}, delayNanos)
}
/** Executes [block] once on a task runner thread. */
- inline fun execute(
+ fun execute(
name: String,
delayNanos: Long = 0L,
cancelable: Boolean = true,
- crossinline block: () -> Unit
+ block: () -> Unit
) {
schedule(object : Task(name, cancelable) {
override fun runOnce(): Long {
@yschimke thanks for that, i will check it out and let you know
@yschimke I have raised the bug to native-image team
Updates?
Updates?
Since this ticket was reported, we had numerous fixes and improvements around unbalanced monitors; this should now be supported. Graal still enforces structured locking but won't bailout at build time anymore if unstructured locking or related monitor patterns are encountered.
Describe the issue
Kotlin 1.5.21 and nativeImage gradle builds fail
Steps to reproduce the issue
See https://github.com/square/okhttp/runs/2816094342?check_suite_focus=true
Please include both build steps as well as run steps
Describe GraalVM and your environment: