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-8254721: Improve support for conditionally generated files #674
JDK-8254721: Improve support for conditionally generated files #674
Conversation
Improve support for conditionally generated files
👋 Welcome back jjg! A progress list of the required criteria for merging this PR into |
@jonathan-gibbons The following label 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 list. If you would like to change these labels, use the /label pull request command. |
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.
Looks good, Jon. The inline comments all refer to minor issues.
// System Properties | ||
if (configuration.conditionalPages.contains(HtmlConfiguration.PageKind.SYSTEM_PROPERTIES)) { | ||
section = newHelpSection(contents.systemPropertiesLabel); | ||
Content constantsBody = getContent("doclet.help.systemProperties.body", |
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.
Not an actual problem, but constantsBody
is the name used for the constant values page. Should be either a generic name or one hinting at the system properties content.
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.
Good catch; will fix.
*/ | ||
// Note: this should (eventually) be merged with Navigation.PageMode, | ||
// which performs a somewhat similar role | ||
public enum PageKind { |
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.
Maybe call it ConditionalPage
and change comment to "Kinds of conditional pages" to make purpose/scope clearer?
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.
That would be a reasonable short term fix, but I was hoping to merge with Navigation.PageMode
since both are enums for the different kinds of pages we generate. But I have not yet found the sweet spot for where to put this enum: it may be best for it to end up as a top-level enum in the formats.html
package. Or, we avoid merging them, and rename PageKind
as you suggest.
depr.generateDeprecatedListFile( | ||
new DeprecatedAPIListBuilder(configuration)); | ||
DeprecatedAPIListBuilder deprAPI = configuration.deprecatedAPIListBuilder; | ||
if (deprAPI != null && !deprAPI.isEmpty()) { |
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.
Just a note regarding consistency: everywhere else you are using configuration.conditionalPages.contains(HtmlConfiguration.PageKind.DEPRECATED)
for this check.
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.
Yes, thanks; noted; I guess this is a hangover from before I added the PageKind.
@jonathan-gibbons 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 28 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 |
Responded to all review feedback, and latest version builds and tests. Will integrate. /integrate |
@jonathan-gibbons Since your change was applied there have been 29 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit cb5cdd7. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The overall pages is very dynamic and depends on a lot of factors, such as the input files and the command-line options. Some of the summary files depend on the content of the classes being documented, such as:
This change is a step towards handling these files in a uniform manner.
There is a new test to test the consistency of the new behavior..
Progress
Testing
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/674/head:pull/674
$ git checkout pull/674