-
Couldn't load subscription status.
- Fork 6.1k
8339631: Fix block @jls and @jvms tags #20879
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
Conversation
|
👋 Welcome back prappo! A progress list of the required criteria for merging this PR into |
|
@pavelrappo 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 24 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 |
|
@pavelrappo The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
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 fine; thanks.
Webrevs
|
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.
possibly for later, a separate pass might be to review and make consistent the use of {@code } in the tags, such as in The ... Attribute
For example, the addition |
Typography issues are less severe than those fixed in this PR, but I can fix them too. |
8.5.1 was removed in JDK 16. 8.1.3 seems an appropriate substitution. Alternatively, the link can be deleted altogether.
|
I understand that a PR might not be the best place for a comment like this. Still, it's highly relevant to the review feedback I've got so far. Also, a PR comment will be seen by more people sooner than a JBS comment. This is by the virtue of being fanned out by the mailing lists. Some reviewers suggested fixing the typography. I could do it, but I think it will pay us more if we pause and think what the broken typography tells us, which I think is that the design of these tags is not entirely what it should be. Currently, these tags are really a specialised form of Since the tag links to a specific resource, it saves the documentation author keystrokes on typing the link to that resource. Along with the visual consistency of the generated documentation, the author also gets some integrity: the tag links to the same version of the specification as that of the documentation. Unfortunately, mismatching versions is not the only source of broken integrity. Even if initially the tag is accurate, it may degrade over time by various means. This PR is a good evidence that specification sections can be reordered and that their text can be changed. The problem is not the degradation per se, but that it stays unnoticed indefinitely. In similar situations, we use external checkers as a post-build documentation test. While it's much better than nothing and is more flexible than changing the tags, failing tests are prone to stay problem-listed indefinitely. Which gets us back to square one. If like me you think that a broken or irrelevant link is bad, we could make these tags provide more integrity. The tags could check their contents against the actual specification and report an error if the contents are not the same (subject to some typographic and formatting leeway). As for the visual consistency, the tags could also make sure the text they generate is of a particular form by automatically carrying over (some) typography from the specification to the generated documentation. In my mind, this will require having (an extract from) the specification accessible to the tag. Because build system don't typically have access to the Internet, the specification could be stored in the repo and updated every release, which happens every 6 months. One problem though is what to do when (not if) a spec is not up-to-date. For example, consider these These tags relate to a preview feature, which is documented not in JLS but in an annex to it, which is currently missing due to a build error. If the tags are to strictly check their integrity, a problem like this would prevent a documentation build. Thoughts? |
My initial thought is, at least we're working with specific tags ( Preview-ness is a pervasive feature of JDK these days, on the command-line and in APIs. Perhaps the tags here can be augmented to indicate that a feature is a preview feature, for example, |
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 think we can ignore the title style aspect for now; the key of these tags has always been to provide a correct link to the specs, so fixing trailing period or section number is more important.
Note: any commit hashes below might be outdated due to subsequent history rewriting (e.g. git rebase). + update src/java.base/share/classes/java/lang/ClassLoader.java due to 51ffa5e + update src/java.base/share/classes/java/lang/Record.java due to 51ffa5e + update src/java.base/share/classes/java/lang/StackWalker.java due to 51ffa5e + update src/java.base/share/classes/java/lang/reflect/AccessFlag.java due to 51ffa5e + update src/java.base/share/classes/java/lang/reflect/InvocationHandler.java due to 51ffa5e + update src/java.compiler/share/classes/javax/lang/model/element/NestingKind.java due to 51ffa5e + update src/java.compiler/share/classes/javax/lang/model/type/NullType.java due to 51ffa5e + update src/jdk.compiler/share/classes/com/sun/source/tree/ClassTree.java due to 51ffa5e + update src/jdk.compiler/share/classes/com/sun/source/tree/InstanceOfTree.java due to 51ffa5e + update src/jdk.compiler/share/classes/com/sun/source/tree/LiteralTree.java due to 51ffa5e + update src/jdk.compiler/share/classes/com/sun/source/tree/MethodTree.java due to 51ffa5e + update src/jdk.compiler/share/classes/com/sun/source/tree/ModifiersTree.java due to 2c3d47a + update src/jdk.compiler/share/classes/com/sun/source/tree/StatementTree.java due to 51ffa5e + update src/jdk.compiler/share/classes/com/sun/source/tree/SwitchExpressionTree.java due to 51ffa5e + update src/jdk.compiler/share/classes/com/sun/source/tree/VariableTree.java due to 51ffa5e
|
/integrate |
|
@pavelrappo This pull request has not yet been marked as ready for integration. |
|
Ugh... The most recent change to copyright years caused the bot to remove the "ready" label. Please re-review; thanks. |
|
/integrate |
|
Going to push as commit 88cccc1.
Your commit was automatically rebased without conflicts. |
|
@pavelrappo Pushed as commit 88cccc1. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This fixes some of the recently discovered issues with the block variants of the specification tags. While reviewing, please check the proposed changes against the actual specifications. Since the specifications for JDK 23 are not yet available in the HTML format, you can use the specifications for JDK 22, which are reasonably up-to-date:
Note that this PR does NOT address any issues with the inline variants of the said tags. Those are harder to check. Even flagging suspicious tags requires a human. If you have some time, consider performing similar checks for inline
@jlsand@jvmstags in your area. Thanks.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20879/head:pull/20879$ git checkout pull/20879Update a local copy of the PR:
$ git checkout pull/20879$ git pull https://git.openjdk.org/jdk.git pull/20879/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20879View PR using the GUI difftool:
$ git pr show -t 20879Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20879.diff
Webrev
Link to Webrev Comment