Repository navigation
Build the Java models library with JDK 22 and newer - #9566
Draft
tautschnig wants to merge 1 commit into
Draft
tautschnig wants to merge 1 commit into
tautschnig wants to merge 1 commit into
Conversation
The java-models-library submodule did not compile with JDK 22 and
newer: javac rejects the statement in the constructor of the models'
java.lang.Object with -source 8 ("flexible constructors is not
supported"), and JDK 24 removed ClassLoader.checkClassLoaderPermission,
which the models' java.lang.Class called. Ubuntu 26.04, and with it
GitHub's ubuntu-latest runners, default to JDK 25, so that the CodeQL
workflow currently fails to build JBMC.
Update the submodule to a commit that applies the fix of
diffblue/java-models-library#49 to the version of the models that we
use. It only changes these two files, and (built with JDK 21) the
bytecode differs only in the constructor of Object no longer storing 0
(the default value) to cproverMonitorCount, in the removed call, and in
constant-pool indices. Updating to the current
master of the models instead would also bring in new models, with which
more than 100 JBMC regression tests fail (e.g., as Class.forName now
fails an assertion for classes that are not modelled).
With models built by JDK 25, all JBMC, janalyzer, jdiff and Java unit
tests pass. Update COMPILING.md, which said that JDK 22 and newer do not
work.
Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends-on: diffblue/java-models-library#52
The java-models-library submodule did not compile with JDK 22 and newer: javac rejects the statement in the constructor of the models' java.lang.Object with -source 8 ("flexible constructors is not supported"), and JDK 24 removed ClassLoader.checkClassLoaderPermission, which the models' java.lang.Class called. Ubuntu 26.04, and with it GitHub's ubuntu-latest runners, default to JDK 25, so that the CodeQL workflow currently fails to build JBMC.
Update the submodule to a commit that applies the fix of diffblue/java-models-library#49 to the version of the models that we use. It only changes these two files, and (built with JDK 21) the bytecode differs only in the constructor of Object no longer storing 0 (the default value) to cproverMonitorCount, in the removed call, and in constant-pool indices. Updating to the current
master of the models instead would also bring in new models, with which more than 100 JBMC regression tests fail (e.g., as Class.forName now fails an assertion for classes that are not modelled).
With models built by JDK 25, all JBMC, janalyzer, jdiff and Java unit tests pass. Update COMPILING.md, which said that JDK 22 and newer do not work.