-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8347063: Add comments in ClassFileFormatVersion for class file format evolution history #22934
Conversation
👋 Welcome back liach! A progress list of the required criteria for merging this PR into |
@liach This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 91 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
/reviewers 2 reviewer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks fine and the changes per release look plausible; I didn't double-check them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified via consultation of the various platform JSRs.
Though this isn't done in SourceVersion, I'm wondering if it would be helpful to reference the associated JEPs which describe these changes (e.g. JEP 12 for Preview Features, 359 for Records (Preview), 384 Records (Second Preview), 395 Records, etc.).
* 8: private, static, and non-abstract (default) methods in interfaces; | ||
* type annotations (Runtime(Inv/V)isibleTypeAnnotations); | ||
* MethodParameters | ||
* 9: modules (Module, ModuleMainClass, ModulePackages, CONSTANT_Module, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider referencing JSR 376 for the introduction of Modules. JEP 261 describes the changes to class files.
I have added the JEP and JSR numbers for some of the features, and clarified if the changed features are attributes, modifiers, constant pool entries, or instructions/opcodes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Note that changes in JDK 7 and earlier pre-date JEPs, so no reference of that type is possible.
* 1: InnerClasses, Synthetic, Deprecated attributes | ||
* 2: ACC_STRICT modifier | ||
* 3: no changes | ||
* 4: no changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version mapping can be tricky here: is "1" 1.0 plus 1.1? I presume "2" is 1.2, "3" is 1.3.x, "4" is 1.4.x
Might be useful to include the actual JVMS classfile version numbers for ease of reference back to JVMS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the wording implicitly is referring to the enum position, which uses a "RELEASE_$N" convention. However, I agree that adding the major version in some form would aid people more familiar with those numbers. One possibility:
3 (47.0) no changes
4 (48.0) no changes
If that is adopted, perhaps the preview features could be listed with the minor version set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about versions like 1.1, ... 1.8, 9, ... which follows the since versions of libraries and should have no ambiguity? I will commit if everyone agrees.
Joe and David, can you look at this updated versioning that uses the core libraries since scheme? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Versions matching java.specification.version
look good.
Yep that looks fine. Thanks. |
I think it is fine it its current form, but would be better also listing the class file format version: 1.1/45.3 etc. However, I'll approve the PR in it current state. |
Technically this 45.0 vs 45.3 only matters for 1.0 vs 1.1; those are intricate details like "Oak classes" with u1 max stacks and locals which was removed from hotspot around JDK 14 or so and never part of the JVMS. Now we really only care about majors, and we have the majors in the enums themselves, so I wasn't too eager to jam up the list of versions with the major versions. Thanks for the reviews. /integrate |
Going to push as commit 6f1f2f2.
Your commit was automatically rebased without conflicts. |
javax.lang.model.SourceVersion
has a series of comments describing the new language features present in each source version. Similar comments for theClassFileFormatVersion
would be helpful, so readers no longer need to search through the JVMS to find changes in new versions.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22934/head:pull/22934
$ git checkout pull/22934
Update a local copy of the PR:
$ git checkout pull/22934
$ git pull https://git.openjdk.org/jdk.git pull/22934/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22934
View PR using the GUI difftool:
$ git pr show -t 22934
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22934.diff
Using Webrev
Link to Webrev Comment