-
Notifications
You must be signed in to change notification settings - Fork 6.2k
JDK-8274639: Provide a way to disable warnings for cross-modular links #5900
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 hannesw! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
/csr |
|
@hns this pull request will not be integrated until the CSR request JDK-8274969 for issue JDK-8274639 has been approved. |
jonathan-gibbons
left a comment
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.
It's OK, but I think it would be better off using a enum rather than a boolean to control the diagnostic generation.
...avadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties
Show resolved
Hide resolved
| * Argument for command-line option {@code --link-modularity-mismatch}. | ||
| * True if warnings on external documentation with non-matching modularity should be omitted. | ||
| */ | ||
| private boolean linkModularityNoWarning = false; |
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.
Would it be better to use a local enum that matches the option values?
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 introduced an enum, I agree it's an improvement. Hope you are ok with the naming.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java
Outdated
Show resolved
Hide resolved
jonathan-gibbons
left a comment
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.
Minor naming suggestions, but generally approved.
| Report external documentation with wrong modularity as either\n\ | ||
| warning or informational message. The default behaviour is to\n\ |
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.
suggest:
Report external documentation with wrong modularity with either\n
a warning or informational message.
(change "as" to "with"; add "a" before "warning")
| public enum ModularityMismatchPolicy { | ||
| info, | ||
| warn | ||
| } |
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.
enum name is good; constants could be upper case?
| public boolean process(String opt, List<String> args) { | ||
| String s = args.get(0); | ||
| switch (s) { | ||
| case "warn", "info" -> linkModularityMismatch = ModularityMismatchPolicy.valueOf(s); |
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.
If the constants were upper case, you could use s.toUpperCase(Locale.ROOT)
|
@hns 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 782 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 |
|
/integrate |
|
Going to push as commit 103da8f.
Your commit was automatically rebased without conflicts. |
This is a simple change to add a new
--link-modularity-mismatch (warn|info)command line option to allow messages about wrong modularity of externally linked documentation bundles to be issued as warnings or notices.CSR: https://bugs.openjdk.java.net/browse/JDK-8274969
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5900/head:pull/5900$ git checkout pull/5900Update a local copy of the PR:
$ git checkout pull/5900$ git pull https://git.openjdk.java.net/jdk pull/5900/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5900View PR using the GUI difftool:
$ git pr show -t 5900Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5900.diff