-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
CodeQL 2.19.1 does not work with Java 23 projects #17681
Comments
👋 @danishnawab thanks a lot for reaching out to us! I will call in the team working on java support on this. In the meantime, it seems like https://github.com/danishnawab/codeql-java23/ is private: I'm guessing it's a small reproducer and it can be made public? That would be much appreciated! |
Ah yes, the intention was to have it public. I have updated the visibility now to make it public. |
The cause is that the sample project there uses What is supported at this point is use of the Java 23 toolchain building to a Java 22 or lower language version. |
@smowton the intention is to use Java 23. The stable libraries and language features. In this case, I have no intention to use the preview features, but I still want to run JDK 23 as each version of Java supersedes the older one. |
In the short term can you just pass |
No that doesn't work because we have a large number of services in my organization - an enterprise Github support customer - where we want to use Java 23 library and runtime updates. |
I'll have a go at getting full Java 23 support in time for CodeQL 2.19.2, but no promises -- upgrading the OpenJDK components varies quite a lot in difficulty from JDK release to release! |
Ok, we will wait then. |
Yes, this is always intended. We don't anticipate any difficulties on future JDK releases. |
The full upgrade turned out to be pretty straightforward this cycle. You should find Java 23 is fully supported (except preview / incubating features) as of CodeQL 2.19.2. |
Thank you @smowton. |
In the normal course of things, there should be full support for non-preview/incubator features on JDK release day. |
After upgrading to CodeQL 2.19.1 to get Java 23 support (see issue #17564), the Java 23 project is still not analyzed successfully by CodeQL.
Example project here: https://github.com/danishnawab/codeql-java23/tree/master
Java 23
The
master
branch is set up with Java 23 -> CodeQL analysis failsOutput:
codeql database create java-testing-repo --language=java --source-root=. --command="./gradlew clean assemble --no-build-cache" --overwrite
Output:
Exit status:
32
Java 22
The
java22
branch is set up with Java 22 -> CodeQL analysis succeedsOutput:
codeql database create java-testing-repo --language=java --source-root=. --command="./gradlew clean assemble --no-build-cache" --overwrite
Exit status:
0
The Java version is the only difference between the 2 branches: https://github.com/danishnawab/codeql-java23/compare/master...java22
The text was updated successfully, but these errors were encountered: