Skip to content
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-8252717: Integrate/merge legacy standard doclet diagnostics and doclint #9006

Conversation

jonathan-gibbons
Copy link
Contributor

@jonathan-gibbons jonathan-gibbons commented Jun 2, 2022

Please review a moderate change to enable (most) doclet warnings even if doclint is enabled.

Since the introduction of doclint, there was some (small) overlap between the small set of warnings generated by the doclet and the new larger set of diagnostics that could be generated by doclint. The solution, until now, has been to disable doclet warnings when doclint is enabled. But, neither set contains the other, and the policy has inappropriately suppressed some warnings and inhibited writing new code to generate new warnings by the doclet that could only be done by the doclet, and not doclint.

One notable group of warnings that has been inappropriately suppressed is the warnings generated by using the -serial warn option.

The fundamental core of the change is to remove the conditional checks in the doclet Messages.java, which would suppress messages when doclint was enabled. A consequence is that some specific messages have to disabled if they are duplicate checks if doclint is enabled. (The messages cannot be removed altogether because doclint might not be enabled.) A test is added to verify that either one message or the other is generated, but never both.

As previously noted, an issue with the earlier policy is that warnings generated by using the -serial warn option were inappropriately suppressed, and this change fixes that ... revealing a number of latent warnings in the JDK API that need to be addressed. The short term fix here is to temporarily remove the use of the -serialwarn option. See JDK-8287749.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8252717: Integrate/merge legacy standard doclet diagnostics and doclint

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/9006/head:pull/9006
$ git checkout pull/9006

Update a local copy of the PR:
$ git checkout pull/9006
$ git pull https://git.openjdk.java.net/jdk pull/9006/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9006

View PR using the GUI difftool:
$ git pr show -t 9006

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/9006.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 2, 2022

👋 Welcome back jjg! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 2, 2022
@openjdk
Copy link

openjdk bot commented Jun 2, 2022

@jonathan-gibbons The following labels will be automatically applied to this pull request:

  • build
  • javadoc

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.

@openjdk openjdk bot added javadoc javadoc-dev@openjdk.org build build-dev@openjdk.org labels Jun 2, 2022
@mlbridge
Copy link

mlbridge bot commented Jun 2, 2022

Webrevs

Copy link
Member

@erikj79 erikj79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build change looks ok.

@openjdk
Copy link

openjdk bot commented Jun 2, 2022

@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:

8252717: Integrate/merge legacy standard doclet diagnostics and doclint

Reviewed-by: erikj, prappo

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 22 new commits pushed to the master branch:

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 2, 2022
Copy link
Member

@pavelrappo pavelrappo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the introduction of doclint, there was some (small) overlap between the small set ... and the new larger set ... But, the sets do not overlap

Do or do they not overlap? :)

the policy has inappropriately suppressed some warnings and inhibited the generation of new warnings

What's the difference between "suppressed" and "inhibited" here?

Generally, how can we be sure that we haven't missed any double-reported cases?

@jonathan-gibbons
Copy link
Contributor Author

jonathan-gibbons commented Jun 3, 2022

Since the introduction of doclint, there was some (small) overlap between the small set ... and the new larger set ... But, the sets do not overlap

Do or do they not overlap? :)

Ooops. Wrong word. I was meaning that neither set contains the other.

the policy has inappropriately suppressed some warnings and inhibited the generation of new warnings

What's the difference between "suppressed" and "inhibited" here?

I was using "suppressed" with respect to existing doclet warnings, which have not been displayed if doclint was enabled, and was using "inhibited" with respect to writing code to generate new warnings, meaning that there was not much benefit to adding new warnings if they were typically going to be suppressed when doclint was enabled.

Generally, how can we be sure that we haven't missed any double-reported cases?

I did a visual inspection over the Checker class. Generally, Checker does more in the area of "missing" comments and HTML issues, with less focus on "reference" issues, while the doclet does not report missing comments and does not even attempt to detect HTML issues. The overlap is "syntax" issues and "reference" issues, which are covered here.

The test is set up to be a framework to accommodate new cases if any should arise.

@pavelrappo
Copy link
Member

I did a visual inspection over the Checker class.

The test is set up to be a framework to accommodate new cases if any should arise.

This is good. It would be even better if we had a mechanism to reduce risk of diagnostic duplication in the future. I don't have any concrete proposal, but unique internal error codes shared between doclint and doclet come to mind.

Copy link
Member

@pavelrappo pavelrappo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@jonathan-gibbons
Copy link
Contributor Author

I did a visual inspection over the Checker class.

The test is set up to be a framework to accommodate new cases if any should arise.

This is good. It would be even better if we had a mechanism to reduce risk of diagnostic duplication in the future. I don't have any concrete proposal, but unique internal error codes shared between doclint and doclet come to mind.

I would also like to have a policy to align the user-facing content of the diagnostic message. This includes the severity (warning or error) as well as the position and message text, including substituted values.

@jonathan-gibbons
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 3, 2022

Going to push as commit 59e9700.
Since your change was applied there have been 22 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 3, 2022
@openjdk openjdk bot closed this Jun 3, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 3, 2022
@openjdk
Copy link

openjdk bot commented Jun 3, 2022

@jonathan-gibbons Pushed as commit 59e9700.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@jonathan-gibbons jonathan-gibbons deleted the 8252717.doclint-messages branch June 3, 2022 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org integrated Pull request has been integrated javadoc javadoc-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants