-
Notifications
You must be signed in to change notification settings - Fork 49
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
Upgrade Gradle to version 8.5 fails #977
Comments
A workaround is to use Gradle's toolchain feature, which relatively simple to implement: #978 - and enables parallel work on an update of Gradle and working on Java 21 related issues. |
@koppor I just tried to build locally using the Gradle toolchain config that is currently provided in #978. Regrettably my build fails with a similar stack trace as the one triggered on the build server: > Task :palantir-java-format-spi:compileJava FAILED
error: An unhandled exception was thrown by the Error Prone static analysis plugin.
Please report this at https://github.com/google/error-prone/issues/new and include the following:
error-prone version: 2.19.1
BugPattern: (see stack trace)
Stack Trace:
java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.JCTree$JCExpression com.sun.tools.javac.tree.TreeMaker.Select(com.sun.tools.javac.tree.JCTree$JCExpression, com.sun.tools.javac.code.Symbol)'
at org.checkerframework.errorprone.javacutil.trees.TreeBuilder.buildValueOfMethodAccess(TreeBuilder.java:392)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.box(CFGTranslationPhaseOne.java:872)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.commonConvert(CFGTranslationPhaseOne.java:1187)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.methodInvocationConvert(CFGTranslationPhaseOne.java:1232)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.convertCallArguments(CFGTranslationPhaseOne.java:1310)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.visitMethodInvocation(CFGTranslationPhaseOne.java:1453)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.visitMethodInvocation(CFGTranslationPhaseOne.java:198)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1832)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.scan(CFGTranslationPhaseOne.java:550)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.convertCallArguments(CFGTranslationPhaseOne.java:1309)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.visitNewClass(CFGTranslationPhaseOne.java:3338)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.visitNewClass(CFGTranslationPhaseOne.java:198)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1893)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.scan(CFGTranslationPhaseOne.java:550)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.visitReturn(CFGTranslationPhaseOne.java:3385)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.visitReturn(CFGTranslationPhaseOne.java:198)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1736)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.scan(CFGTranslationPhaseOne.java:550)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.visitBlock(CFGTranslationPhaseOne.java:2218)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.visitBlock(CFGTranslationPhaseOne.java:198)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1104)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.scan(CFGTranslationPhaseOne.java:550)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.process(CFGTranslationPhaseOne.java:447)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGTranslationPhaseOne.process(CFGTranslationPhaseOne.java:498)
at org.checkerframework.errorprone.dataflow.cfg.builder.CFGBuilder.build(CFGBuilder.java:73)
at com.google.errorprone.dataflow.DataFlow$2.load(DataFlow.java:125)
at com.google.errorprone.dataflow.DataFlow$2.load(DataFlow.java:93)
at com.github.benmanes.caffeine.cache.LocalLoadingCache.lambda$newMappingFunction$3(LocalLoadingCache.java:183)
at com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2688)
at java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1916)
at com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2686)
at com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2669)
at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:112)
at com.github.benmanes.caffeine.cache.LocalLoadingCache.get(LocalLoadingCache.java:58)
at com.google.errorprone.dataflow.DataFlow.methodDataflow(DataFlow.java:172)
at com.google.errorprone.dataflow.DataFlow.expressionDataflow(DataFlow.java:229)
at com.palantir.baseline.errorprone.safety.SafetyAnalysis.of(SafetyAnalysis.java:35)
at com.palantir.baseline.errorprone.SafeLoggingPropagation$ReturnStatementSafetyScanner.visitReturn(SafeLoggingPropagation.java:364)
at com.palantir.baseline.errorprone.SafeLoggingPropagation$ReturnStatementSafetyScanner.visitReturn(SafeLoggingPropagation.java:347)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1736)
at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:92)
at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:96)
at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:111)
at jdk.compiler/com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:272)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1104)
at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:92)
at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:96)
at jdk.compiler/com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:224)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:948)
at com.palantir.baseline.errorprone.SafeLoggingPropagation.matchMethod(SafeLoggingPropagation.java:340)
at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:449)
at com.google.errorprone.scanner.ErrorProneScanner.visitMethod(ErrorProneScanner.java:739)
at com.google.errorprone.scanner.ErrorProneScanner.visitMethod(ErrorProneScanner.java:150)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:948)
at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:92)
at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:111)
at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:119)
at jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:203)
at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:548)
at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:150)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:855)
at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:92)
at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:111)
at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:119)
at jdk.compiler/com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:152)
at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:560)
at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:150)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:623)
at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:66)
at com.google.errorprone.scanner.Scanner.scan(Scanner.java:58)
at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43)
at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:156)
at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:133)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1436)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1383)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:963)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
at org.gradle.internal.compiler.java.IncrementalCompileTask.call(IncrementalCompileTask.java:92)
at org.gradle.api.internal.tasks.compile.AnnotationProcessingCompileTask.call(AnnotationProcessingCompileTask.java:94)
at org.gradle.api.internal.tasks.compile.ResourceCleaningCompilationTask.call(ResourceCleaningCompilationTask.java:57)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:55)
at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:39)
at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerWorkAction.execute(AbstractDaemonCompiler.java:135)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:49)
at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:43)
at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100)
at org.gradle.workers.internal.AbstractClassLoaderWorker.executeInClassLoader(AbstractClassLoaderWorker.java:43)
at org.gradle.workers.internal.FlatClassLoaderWorker.run(FlatClassLoaderWorker.java:32)
at org.gradle.workers.internal.FlatClassLoaderWorker.run(FlatClassLoaderWorker.java:22)
at org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:87)
at org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:56)
at org.gradle.process.internal.worker.request.WorkerAction$1.call(WorkerAction.java:138)
at org.gradle.process.internal.worker.child.WorkerLogEventListener.withWorkerLoggingProtocol(WorkerLogEventListener.java:41)
at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:135)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
1 error
FAILURE: Build failed with an exception. |
@matsev Thank you for investigating. Had the same issue, but I forgot to mention 🙈. I tried to remove error prone from the build, but did not find "errorprone" in the build files. Maybe, it is injected from some upstream palantir projects? -- While quickly checking, I found palantir/gradle-baseline#2651, thus, it shoujld be "easy" to do an error prone update? |
@koppor I am sorry, I don't know how errorprone is used in this project or whether or not it is up for removal. |
Are you still seeing issues with the latest errorprone version on the develop branch of this repo? Errorprone can be temporarily disabled using: allprojects {
pluginManager.withPlugin('java') {
tasks.withType(JavaCompile) {
options.errorprone {
enabled = false
}
}
}
} |
Thank you for the hint! I tried it, and now I got stuck at
I think, the export is needed. As it is not possible to disable the |
Details were provided at #997. As far as I understood, we need to wait for the release of 2.0 of the IntelliJ gradle plugin. https://github.com/JetBrains/gradle-intellij-plugin/milestone/85 |
According to #1011 (comment), #1028 got merged. According to
Thus, this ticket can be closed, can't it? |
👍 closing. I checked out bf9e642 (which is the current version of the ./gradlew -v
------------------------------------------------------------
Gradle 8.8
------------------------------------------------------------
Build time: 2024-05-31 21:46:56 UTC
Revision: 4bd1b3d3fc3f31db5a26eecb416a165b8cc36082
Kotlin: 1.9.22
Groovy: 3.0.21
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 17.0.1 (Eclipse Adoptium 17.0.1+12)
OS: Mac OS X 11.4 x86_64 |
What happened?
Upgrading Gradle wrapper to version 8.5 does not currently work:
This is documented in the Configurations no longer allowed as Dependencies in the Gradle user guide:
What did you want to happen?
Upgrading Gradle wrapper should work
Why this is relevant
The Gradle Compatibility Matrix states that:
Consequently, upgrading Gradle is a blocker for Java 21 related tickets, e.g. #931, #933, #934, #952, #966
The text was updated successfully, but these errors were encountered: