Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quarkus Upgrade with gradle kotlin dsl not working #33046

Open
anubhavjain24 opened this issue May 2, 2023 · 16 comments
Open

Quarkus Upgrade with gradle kotlin dsl not working #33046

anubhavjain24 opened this issue May 2, 2023 · 16 comments
Labels
area/gradle Gradle area/kotlin env/windows Impacts Windows machines kind/bug Something isn't working

Comments

@anubhavjain24
Copy link

Describe the bug

Below is the o/p of gradle update command

quarkus update --stream=3.0

Task :quarkusUpdate
quarkusUpdate is experimental, its options and output might change in future versions
Looking for the newly published extensions in registry.quarkus.io
The project does not import any Quarkus platform BOM

BUILD SUCCESSFUL in 12s

my gradle. properties

quarkusPluginId=io.quarkus
quarkusPluginVersion=3.0.1.Final
quarkusPlatformGroupId=io.quarkus
quarkusPlatformArtifactId=quarkus-universe-bom
quarkusPlatformVersion=3.0.1.Final

build.gradle.kts
plugins {
kotlin("jvm") version "1.8.10"
kotlin("plugin.allopen") version "1.8.10"
id("io.quarkus")
id("org.sonarqube") version "4.0.0.2929"
id("org.owasp.dependencycheck") version "8.2.1"
jacoco
}

repositories {
mavenCentral()
mavenLocal()
}

val quarkusPlatformGroupId: String by project
val quarkusPlatformArtifactId: String by project
val quarkusPlatformVersion: String by project

dependencies {
implementation(enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}"))
implementation(enforcedPlatform("org.jetbrains.kotlin:kotlin-bom:1.8.10"))
implementation("io.quarkus:quarkus-container-image-docker")
implementation("io.quarkus:quarkus-smallrye-openapi")
implementation("io.quarkus:quarkus-kotlin")
implementation("io.quarkus:quarkus-resteasy")
implementation("io.quarkus:quarkus-resteasy-jackson")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("io.quarkus:quarkus-arc")
implementation("com.zaxxer:HikariCP:5.0.1")
implementation("org.apache.commons:commons-lang3:3.12.0")
implementation("com.microsoft.sqlserver:mssql-jdbc:11.2.2.jre8")
implementation("io.quarkus:quarkus-smallrye-health")
implementation(enforcedPlatform("software.amazon.awssdk:bom:2.18.38"))
implementation("software.amazon.awssdk:secretsmanager")
implementation("software.amazon.awssdk:sts")

testImplementation("io.quarkus:quarkus-junit5")
testImplementation("io.rest-assured:rest-assured")
testImplementation("io.mockk:mockk:1.13.3")
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("io.quarkus:quarkus-jacoco")

testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")

}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

allOpen {
annotation("javax.ws.rs.Path")
annotation("jakarta.enterprise.context.ApplicationScoped")
annotation("io.quarkus.test.junit.QuarkusTest")
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
kotlinOptions.javaParameters = true
}

jacoco {
toolVersion = "0.8.9"
}

tasks.compileTestKotlin {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}

tasks.test {
outputs.file(layout.buildDirectory.file("reports/jacoco/test/jacoco.xml"))
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // tests are required to run before generating the report
reports{
xml.required.set(true)
xml.outputLocation.set(layout.buildDirectory.file("reports/jacoco/test/jacoco.xml"))
}
}
tasks.jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = "0.8".toBigDecimal()
}
}
}
}

settings.gradle.kts

pluginManagement {
val quarkusPluginVersion: String by settings
val quarkusPluginId: String by settings
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
plugins {
id(quarkusPluginId) version quarkusPluginVersion
}
}

Expected behavior

quarkus update changes should be applied

Actual behavior

Quarlkus not updating. Manually updated gradle.properties

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

Old Version : 2.16.5.Final

Build tool (ie. output of mvnw --version or gradlew --version)

------------------------------------------------------------ Gradle 8.0.2 ------------------------------------------------------------ Build time: 2023-03-03 16:41:37 UTC Revision: 7d6581558e226a580d91d399f7dfb9e3095c2b1d Kotlin: 1.8.10 Groovy: 3.0.13 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 17.0.7 (Oracle Corporation 17.0.7+8-LTS-224) OS: Windows 10 10.0 amd64

Additional information

No response

@anubhavjain24 anubhavjain24 added the kind/bug Something isn't working label May 2, 2023
@quarkus-bot quarkus-bot bot added area/gradle Gradle area/kotlin env/windows Impacts Windows machines labels May 2, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented May 2, 2023

/cc @evanchooly (kotlin), @geoand (kotlin), @glefloch, @quarkusio/devtools

@geoand
Copy link
Contributor

geoand commented May 2, 2023

I think this has already been reported but I can't find it right now.

cc @gsmet

@gsmet
Copy link
Member

gsmet commented May 2, 2023

@ia3andy could you have a look at this one? At a quick glance, it seems to be in your ballpark.

@anubhavjain24
Copy link
Author

Any fix for above issue ?

Also getting below error while running tests

java.lang.instrument.IllegalClassFormatException: Error while instrumenting io/quarkus/test/common/TestResourceManager with JaCoCo 0.8.9.202303310957/c0ad781.
at org.jacoco.agent.rt.internal_4481564.CoverageTransformer.transform(CoverageTransformer.java:94)
at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:244)
at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:541)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:506)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:466)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:516)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:466)
at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:227)
at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:592)
at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:640)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:395)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:395)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:211)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:84)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:110)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:90)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:85)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
at jdk.proxy2/jdk.proxy2.$Proxy5.stop(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: java.io.IOException: Error while instrumenting io/quarkus/test/common/TestResourceManager with JaCoCo 0.8.9.202303310957/c0ad781.
at org.jacoco.agent.rt.internal_4481564.core.instr.Instrumenter.instrumentError(Instrumenter.java:161)
at org.jacoco.agent.rt.internal_4481564.core.instr.Instrumenter.instrument(Instrumenter.java:111)
at org.jacoco.agent.rt.internal_4481564.CoverageTransformer.transform(CoverageTransformer.java:92)
... 69 more
Caused by: java.lang.IllegalStateException: Cannot process instrumented class io/quarkus/test/common/TestResourceManager. Please supply original non-instrumented classes.
at org.jacoco.agent.rt.internal_4481564.core.internal.instr.InstrSupport.assertNotInstrumented(InstrSupport.java:238)
at org.jacoco.agent.rt.internal_4481564.core.internal.instr.ClassInstrumenter.visitMethod(ClassInstrumenter.java:65)
at org.jacoco.agent.rt.internal_4481564.core.internal.flow.ClassProbesAdapter.visitMethod(ClassProbesAdapter.java:66)
at org.jacoco.agent.rt.internal_4481564.asm.ClassReader.readMethod(ClassReader.java:1353)
at org.jacoco.agent.rt.internal_4481564.asm.ClassReader.accept(ClassReader.java:744)
at org.jacoco.agent.rt.internal_4481564.asm.ClassReader.accept(ClassReader.java:424)
at org.jacoco.agent.rt.internal_4481564.core.instr.Instrumenter.instrument(Instrumenter.java:91)
at org.jacoco.agent.rt.internal_4481564.core.instr.Instrumenter.instrument(Instrumenter.java:109)
... 70 more
java.lang.instrument.IllegalClassFormatException: Error while instrumenting io/quarkus/test/common/TestStatus with JaCoCo 0.8.9.202303310957/c0ad781.
at org.jacoco.agent.rt.internal_4481564.CoverageTransformer.transform(CoverageTransformer.java:94)
at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:244)
at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:541)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:506)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:466)
at io.quarkus.test.common.TestResourceManager.(TestResourceManager.java:45)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:229)
at io.quarkus.test.junit.QuarkusTestExtension.ensureStarted(QuarkusTestExtension.java:592)
at io.quarkus.test.junit.QuarkusTestExtension.beforeAll(QuarkusTestExtension.java:640)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$12(ClassBasedTestDescriptor.java:395)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:395)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:211)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:84)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:148)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:110)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:90)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:85)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
at jdk.proxy2/jdk.proxy2.$Proxy5.stop(Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)
Caused by: java.io.IOException: Error while instrumenting io/quarkus/test/common/TestStatus with JaCoCo 0.8.9.202303310957/c0ad781.
at org.jacoco.agent.rt.internal_4481564.core.instr.Instrumenter.instrumentError(Instrumenter.java:161)
at org.jacoco.agent.rt.internal_4481564.core.instr.Instrumenter.instrument(Instrumenter.java:111)
at org.jacoco.agent.rt.internal_4481564.CoverageTransformer.transform(CoverageTransformer.java:92)
... 73 more

@mdportnov
Copy link

same problem:

Caused by: io.quarkus.devtools.commands.data.QuarkusCommandException: Error while running the project update script
at io.quarkus.devtools.commands.handlers.UpdateProjectCommandHandler.execute(UpdateProjectCommandHandler.java:102)
at io.quarkus.devtools.commands.UpdateProject.execute(UpdateProject.java:83)
at io.quarkus.gradle.tasks.QuarkusUpdate.logUpdates(QuarkusUpdate.java:156)
... 117 more
Caused by: io.quarkus.devtools.project.update.QuarkusUpdateException: gradle-kotlin-dsl is not supported yet
at io.quarkus.devtools.project.update.QuarkusUpdateCommand.handle(QuarkusUpdateCommand.java:51)
at io.quarkus.devtools.commands.handlers.UpdateProjectCommandHandler.execute(UpdateProjectCommandHandler.java:92)
... 119 more

@ia3andy
Copy link
Contributor

ia3andy commented Jun 1, 2023

As explained in the log: "gradle-kotlin-dsl is not supported yet", AFAIK OpenRewrite doesn't yet support Gradle with Kotlin DSL.

@ia3andy
Copy link
Contributor

ia3andy commented Jun 1, 2023

@anubhavjain24 in the issue logs I also see: The project does not import any Quarkus platform BOM this is because the project is using the legacy quarkus bom which should be replaced by io.quarkus.platform:quarkus-bom.

@ia3andy
Copy link
Contributor

ia3andy commented Jun 1, 2023

As explained in the log: "gradle-kotlin-dsl is not supported yet", AFAIK OpenRewrite doesn't yet support Gradle with Kotlin DSL.

Wrong statement it seems they do, I need to check again but last time I tested, our recipe didn't work with Kotlin DSL for some reason I don't remember.

@AdrianAulbach
Copy link

@ia3andy are there plans to make it work with kotlin DSL in the near future? As I'm struggling with the manual upgrade I'm considering if it's worth moving back to Groovy. (Currently it's mixed which causes it's own exception when running the script, so I'd have to move in one or the other direction anyways).
If not I suggest mention that in the gradle-tooling guide to warn new projects about kotlin DSL not being supported for this feature as well as in the upgrade guides.

@ia3andy
Copy link
Contributor

ia3andy commented Aug 16, 2023

@AdrianAulbach I can't find a similar article for Gradle with Kotlin:
https://docs.openrewrite.org/running-recipes/running-rewrite-on-a-gradle-project-without-modifying-the-build

I need the init script if we want to support Gradle with Kotlin.

@AdrianAulbach
Copy link

@ia3andy sorry, I missed the notification

I don't need it necessarily to work with Kotlin, it's just helpful to know that it won't be supported (or at least any time soon) so we can decide to move back to groovy (and don't start new projects with Kotlin DSL).

So my suggestion would be to update https://quarkus.io/guides/gradle-tooling and discourage using Kotlin DSL with the warning that it's not supported by OpenRewrite / quarkus update)

@ia3andy
Copy link
Contributor

ia3andy commented Sep 22, 2023

@AdrianAulbach this is not as final as this :)

FYI I will soon initiate a discussion with the OpenRewrite team to see if they have or can do something to help us solve this problem.

@ia3andy
Copy link
Contributor

ia3andy commented Oct 23, 2023

Here is the upstream issue: openrewrite/rewrite-docs#234

@Siedlerchr
Copy link

Still getting the error Caused by: io.quarkus.devtools.project.update.rewrite.QuarkusUpdateException: gradle-kotlin-dsl is not supported yet
Anyone figured it out in the meantime if it's possible?

@sken130
Copy link

sken130 commented Jun 6, 2024

Can Quarkus team update the doc to mention that quarkus update doesn't support Kotlin DSL yet, to give a proper warning?

@maxandersen
Copy link
Member

opened #43009 to at least mention it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gradle Gradle area/kotlin env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants