-
Notifications
You must be signed in to change notification settings - Fork 745
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
HidingField: NoSuchMethodError: com.sun.tools.javac.util.List com.sun.tools.javac.code.Symbol$TypeSymbol.getEnclosedElements()
#3895
Comments
Looks similar to closed #2092 |
* Bump com.google.errorprone:error_prone_core from 2.18.0 to 2.19.0 Bumps [com.google.errorprone:error_prone_core](https://github.com/google/error-prone) from 2.18.0 to 2.19.0. - [Release notes](https://github.com/google/error-prone/releases) - [Commits](google/error-prone@v2.18.0...v2.19.0) --- updated-dependencies: - dependency-name: com.google.errorprone:error_prone_core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * applied suggested workaround for compiling with jdk 11 See here: google/error-prone#3895 and google/error-prone#2092 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: -Denux <[email protected]>
For anyone who runs into this, it would be helpful to know if you're seeing issues with checks other than The latest release was performed on JDK 17, using The motivation for that was that there were some javadoc changes that depend on building on a newer version than 11 (7976d8f, ebbf729), so I decided to try building on JDK 17. There are ways to work around this specific issue with |
For us, setting |
-Xep:HidingField:OFF fixes the build on Java 17 as well. |
I faced the same issue at https://github.com/spotbugs/spotbugs-gradle-plugin/actions/runs/4930832052/jobs/8812232200?pr=893 For reference, you can use this branch to reproduce this issue. |
@cushon is it possible to support both JDK 11 and JDK 17 at the same time? |
After disabling Full stacktrace:
|
We're also seeing this issue in PicnicSupermarket/error-prone-support#621. In our case |
I am planning to look at using maven toolchains or similar so we have a way to test the artifacts built on JDK 17 running on JDK 11. If anyone has pointers for the best way of going about that, suggestions are welcome! If you see similar crashes that don't look like the two below, please report them in the bug:
|
Ah, we have a PR open that does this (well, |
Thanks @Stephan202, that was extremely helpful! I was able to reproduce the crashes following your example. |
…n JDK 11, and prepare to add test coverage for that configuration Thanks to Stephan202's suggestion in #3895 (comment) #3895 PiperOrigin-RevId: 530929411
…n JDK 11, and prepare to add test coverage for that configuration Thanks to Stephan202's suggestion in #3895 (comment) #3895 PiperOrigin-RevId: 530929411
…n JDK 11, and prepare to add test coverage for that configuration Thanks to Stephan202's suggestion in #3895 (comment) #3895 PiperOrigin-RevId: 530929411
…n JDK 11, and prepare to add test coverage for that configuration Thanks to Stephan202's suggestion in #3895 (comment) #3895 PiperOrigin-RevId: 530957571
*** Reason for rollback *** Just testing *** Original change description *** Fix binary compatibility issues when building on JDK 17 and running on JDK 11, and prepare to add test coverage for that configuration Thanks to Stephan202's suggestion in #3895 (comment) #3895 PiperOrigin-RevId: 530962639
*** Reason for rollback *** Just testing *** Original change description *** Fix binary compatibility issues when building on JDK 17 and running on JDK 11, and prepare to add test coverage for that configuration Thanks to Stephan202's suggestion in #3895 (comment) #3895 PiperOrigin-RevId: 530962639
I pushed a 2.19.1 release with the fix: https://github.com/google/error-prone/releases/tag/v2.19.1 The binary compatibility issue was fixed in 5da8e9a, and we now have test coverage that would have prevented this (thanks @Stephan202's for the pointers!) |
…779) Error Prone ran into a similar issue in google/error-prone#3895. We re-use the same fix, and also add a CI job to test this case. We could avoid this problem by only building releases on JDK 11, but might as well fix to avoid that requirement.
After upgrading ErrorProne from 2.18.0 to 2.19.0, I get
NoSuchMethodError
exception forHidingField
rule. I'm using JDK 11 to build my project.Stacktrace:
Full stacktrace
The text was updated successfully, but these errors were encountered: