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

Jdk 23 now broken with Error prone after github updates to newer cut yesterday #4412

Closed
hazendaz opened this issue May 27, 2024 · 4 comments
Closed

Comments

@hazendaz
Copy link

See hazendaz/fileupload#257, it built fine for jdk 23 yesterday. During same day, the jdk was upgraded for EA on 23. Now all builds are failing with error prone as follows.

The above PR was merged and the merge exhibits the issue. All PRs being created across numerous repos I've seen are all having same issue.

https://github.com/hazendaz/fileupload/actions/runs/9237025003/job/25413522520

Error: [ERROR] error: An unhandled exception was thrown by the Error Prone static analysis plugin.

Error: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project fileupload: Compilation failure
Error: [ERROR] error: An unhandled exception was thrown by the Error Prone static analysis plugin.
Error: -> [Help 1]
Error:
Error: To see the full stack trace of the errors, re-run Maven with the -e switch.
Error: Re-run Maven using the -X switch to enable full debug logging.
Error:
Error: For more information about the errors and possible solutions, please read the following articles:
Error: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Error: Process completed with exit code 1.

@cushon
Copy link
Collaborator

cushon commented May 27, 2024

Error Prone will support JDK 23 when it's generally available in September, but I can't guarantee it'll be compatible with early access builds. If you want to include JDK 23 EA in your test matrix I would consider disabling Error Prone when testing in that configuration.

Error: To see the full stack trace of the errors, re-run Maven with the -e switch.
Error: Re-run Maven using the -X switch to enable full debug logging.

Can you try building those options enabled and sharing the stack trace you're seeing from Error Prone?

There are some known issues with Error Prone and the latest JDK 23 EAs due to some changes in internal API Error Prone relies on. There are fixes for those in progress, I'm curious if that's the issue you're seeing or if it's something different:

Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project error_prone_check_api: Compilation failure: Compilation failure: 
Error:  /home/runner/work/error-prone/error-prone/check_api/src/main/java/com/google/errorprone/util/ErrorProneTokens.java:[118,10] com.google.errorprone.util.ErrorProneTokens.CommentWithTextAndPosition is not abstract and does not override abstract method getPos() in com.sun.tools.javac.parser.Tokens.Comment
Error:  /home/runner/work/error-prone/error-prone/check_api/src/main/java/com/google/errorprone/util/ErrorProneTokens.java:[135,16] getPos() in com.google.errorprone.util.ErrorProneTokens.CommentWithTextAndPosition cannot implement getPos() in com.sun.tools.javac.parser.Tokens.Comment
Error:    return type int is not compatible with com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition
Error:  /home/runner/work/error-prone/error-prone/check_api/src/main/java/com/google/errorprone/util/Comments.java:[101,12] an enum switch case label must be the unqualified name of an enumeration constant
Error:  /home/runner/work/error-prone/error-prone/check_api/src/main/java/com/google/errorprone/util/OffsetComment.java:[22,7] com.google.errorprone.util.OffsetComment is not abstract and does not override abstract method getPos() in com.sun.tools.javac.parser.Tokens.Comment

https://github.com/google/error-prone/actions/runs/9231293447/job/25400938011

@hazendaz
Copy link
Author

Not sure as I didn't look deep enough. I've been using jdk 23 ea for months without issue with error prone. It was working on dozens if not more repos yesterday until sometime in the afternoon then jdk 23 started failing in this way. I just wanted to let you guys know they changed something that broken it. I'm just otherwise ignoring for now. The issue affects older copy of error prone (about 2 to 3 months ago) as well as the latest. Since you are aware based on comments there that some things are now broken, I'm ok for now. Main thing was that I wanted to bring awareness.

@cushon
Copy link
Collaborator

cushon commented May 31, 2024

I made a couple of fixes to JDK 23 EA compatibility issues (c2df1b6, 2dde254) and am preparing a 2.28.0 release. Please try updating to that and let us know if you run into additional issues on JDK 23, thanks!

@cushon cushon closed this as completed May 31, 2024
@hazendaz
Copy link
Author

hazendaz commented Jun 1, 2024

Works now. Thanks.

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

2 participants