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

Version 0.10.0 seems to be incompatible with Error Prone 2.19.0. #622

Closed
2 tasks
ksiczek opened this issue May 10, 2023 · 6 comments
Closed
2 tasks

Version 0.10.0 seems to be incompatible with Error Prone 2.19.0. #622

ksiczek opened this issue May 10, 2023 · 6 comments
Labels
bug Something isn't working
Milestone

Comments

@ksiczek
Copy link

ksiczek commented May 10, 2023

Describe the bug

We tried upgrading to com.google.errorprone:error_prone_core:2.19.0 but it brakes compilation suggesting some stuff from Picnic.

  • I have verified that the issue is reproducible against the latest version
    of the project.
  • I have searched through existing issues to verify that this issue is not
    already known.

Minimal Reproducible Example

Running ./gradlew compileJava breaks with

IllegalArgumentException: Cannot combine scanner suppliers with different implementations of 'StringCaseLocaleUsage': tech.picnic.errorprone.bugpatterns.StringCaseLocaleUsage, com.google.errorprone.bugpatterns.StringCaseLocaleUsage
Logs
An exception has occurred in the compiler (19.0.2). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
java.lang.AssertionError: java.lang.IllegalArgumentException: Cannot combine scanner suppliers with different implementations of 'StringCaseLocaleUsage': tech.picnic.errorprone.bugpatterns.StringCaseLocaleUsage, com.google.errorprone.bugpatterns.StringCaseLocaleUsage
        at com.google.errorprone.ErrorProneAnalyzer.lambda$scansPlugins$0(ErrorProneAnalyzer.java:85)
        at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:183)
        at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:156)
        at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1394)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1341)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:933)
        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.AbstractIsolatedCompilerWorkerExecutor$CompilerWorkAction.execute(AbstractIsolatedCompilerWorkerExecutor.java:78)
        at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
        at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:54)
        at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:48)
        at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100)
        at org.gradle.workers.internal.AbstractClassLoaderWorker.executeInClassLoader(AbstractClassLoaderWorker.java:48)
        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:96)
        at org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:65)
        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:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        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:1589)
Caused by: java.lang.IllegalArgumentException: Cannot combine scanner suppliers with different implementations of 'StringCaseLocaleUsage': tech.picnic.errorprone.bugpatterns.StringCaseLocaleUsage, com.google.errorprone.bugpatterns.StringCaseLocaleUsage
        at com.google.errorprone.scanner.ScannerSupplier.lambda$plus$11(ScannerSupplier.java:255)
        at com.google.common.collect.RegularImmutableBiMap.forEach(RegularImmutableBiMap.java:166)
        at com.google.errorprone.scanner.ScannerSupplier.plus(ScannerSupplier.java:249)
        at com.google.errorprone.ErrorPronePlugins.loadPlugins(ErrorPronePlugins.java:51)
        at com.google.errorprone.ErrorProneAnalyzer.lambda$scansPlugins$0(ErrorProneAnalyzer.java:78)
        ... 40 more

Expected behavior

I hope both could work seamlessly ☺️

Setup

Gradle 8.1.1
Build time: 2023-04-21 12:31:26 UTC
Revision: 1cf537a851c635c364a4214885f8b9798051175b

Kotlin: 1.8.10
Groovy: 3.0.15
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 19.0.2 (Oracle Corporation 19.0.2+7-44)
OS: Mac OS X 13.3.1 aarch64

  • Error Prone version (e.g. 2.19.0).
  • Error Prone Support version (e.g. 0.10.0).

Additional context

It seems that the StringCaseLocaleUsage has been added by the Error Prone in 2.19.0.

@ksiczek ksiczek added the bug Something isn't working label May 10, 2023
@rickie
Copy link
Member

rickie commented May 10, 2023

Hi @ksiczek, thanks for reporting this in a timely manner.

Indeed, these versions are incompatible. In this PR we provided our check upstream to Error Prone.

In this PR we will upgrade Error Prone to 2.19.0. Internally we also use a fork of Error Prone which we have to update now that the new Error Prone version is out.

After we performed the upgrade we'll make sure to release a new version that is compatible with Error Prone 2.19.0. We'll make sure to post an update here when we released a new version.

@Stephan202
Copy link
Member

Thanks for using Error Prone Support @ksiczek! Can you share how urgent this issue is for you? As mentioned here, I'm somewhat torn about jumping on the Error Prone 2.19.0 release given the reported JDK 11 issues. (Picnic does not itself use JDK 11 anymore, but other OSS users might.) But maybe we should just bite the bullet... 🤔

@ksiczek
Copy link
Author

ksiczek commented May 10, 2023

I'd say it is just a little inconvenience for us because we do updates automatically and on a regular basis so if something brakes it makes some noise. We could skip the update and wait for you to catch up with it. We appreciate your effort in extending the Error Prone ☺️

@Stephan202
Copy link
Member

Thanks! Sounds familiar :). We might wait a few days to see whether there'll be a new Error Prone release. If not.... we might upgrade anyway ;)

@Stephan202
Copy link
Member

Quick update on this: with Error Prone 2.19.1 released we consider this topic unblocked. We'll wrap up #621 ~today and cut a new release either today or some time this weekend.

@Stephan202
Copy link
Member

@ksiczek @pzygielo version 0.11.0 is now available from Maven Central. Thanks for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants