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

Cannot combine scanner suppliers with different implementations of 'DefaultLocale': com.palantir.baseline.errorprone.DefaultLocale, com.google.errorprone.bugpatterns.DefaultLocale #4560

Closed
hugoncosta opened this issue Sep 2, 2024 · 1 comment

Comments

@hugoncosta
Copy link

hugoncosta commented Sep 2, 2024

Hello,

We're trying to update our internal usage of error-prone to 2.31.0 and all of the projects where both https://github.com/palantir/palantir-java-format and error-prone work are failing:

[javac]      An exception has occurred in the compiler (21.0.4). Please file a bug against the Java compiler via the Java bug reporting page (https://bugreport.java.com/) after checking the Bug Database (https://bugs.java.com/) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
[javac]      java.lang.AssertionError: java.lang.IllegalArgumentException: Cannot combine scanner suppliers with different implementations of 'DefaultLocale': com.palantir.baseline.errorprone.DefaultLocale, com.google.errorprone.bugpatterns.DefaultLocale
[javac]          at com.google.errorprone.ErrorProneAnalyzer.lambda$scansPlugins$2(ErrorProneAnalyzer.java:159)
[javac]          at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:186)
[javac]          at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:227)
[javac]          at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:133)
[javac]          at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1436)
[javac]          at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1383)
[javac]          at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:963)
[javac]          at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:319)
[javac]          at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:178)
[javac]          at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
[javac]          at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)
[javac]      Caused by: java.lang.IllegalArgumentException: Cannot combine scanner suppliers with different implementations of 'DefaultLocale': com.palantir.baseline.errorprone.DefaultLocale, com.google.errorprone.bugpatterns.DefaultLocale
[javac]          at com.google.errorprone.scanner.ScannerSupplier.lambda$plus$13(ScannerSupplier.java:262)
[javac]          at com.google.common.collect.RegularImmutableBiMap.forEach(RegularImmutableBiMap.java:171)
[javac]          at com.google.errorprone.scanner.ScannerSupplier.plus(ScannerSupplier.java:256)
[javac]          at com.google.errorprone.ErrorPronePlugins.loadPlugins(ErrorPronePlugins.java:51)
[javac]          at com.google.errorprone.ErrorProneAnalyzer.lambda$scansPlugins$2(ErrorProneAnalyzer.java:152)
[javac]          ... 10 more
[javac]      printing javac parameters to: /local/p4clients/pkgbuild-const/workspace/src/ACSStoreDetailsRestrictionJavaClient/javac.20240902_064006.args

I see that this DefaultLocale was released with 2.30.0 in 996d09c.

What strategy would you recommend us to take here?

@hugoncosta
Copy link
Author

Need to combine this upgrade with com.palantir.baseline:baseline-error-prone:2.62.0+ where Palantir removes their implementation of DefaultLocale - palantir/gradle-baseline#2839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant