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-8223355: Redundant output by javadoc #2652

Closed

Conversation

jonathan-gibbons
Copy link
Contributor

@jonathan-gibbons jonathan-gibbons commented Feb 19, 2021

This change addresses a bug that was observed while playing with small demo API: some files may be generated twice.

The fix is to build a single set of the files to be generated.

Note: this bug also affected the generation of the main JDK API docs. According to the log file, before the fix we were generating 14812 files; now, we are generating only 10146 files! That's a drop of 4466 files or over 30%!


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2652/head:pull/2652
$ git checkout pull/2652

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Feb 19, 2021

👋 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 label Feb 19, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 19, 2021

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

  • javadoc

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.

@openjdk openjdk bot added the javadoc label Feb 19, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Feb 19, 2021

Webrevs

(primarily about generating files)

Remove a redundant misleading "Generating" message: it only showed the base filename and if it had shown the full name, it would have been a duplicate
@liach
Copy link
Contributor

@liach liach commented Feb 20, 2021

Just curious, does this bug affect users who specify all files individually or users who just specify a directory without detailing selection rules for classes or packages?

@jonathan-gibbons
Copy link
Contributor Author

@jonathan-gibbons jonathan-gibbons commented Feb 21, 2021

Just curious, does this bug affect users who specify all files individually or users who just specify a directory without detailing selection rules for classes or packages?

Somewhat surprisingly, this happens in all the following cases:

  • specify a module on the module source path (--module-source-path path --module m)
  • specify a module on the source path (--source-path path --module m)
  • specify files on the command line ($(find path -name \*.java))

It does not occur when specifying a package on the source path:

  • specify a module on the source path (--source-path path p)

hns
hns approved these changes Feb 22, 2021
Copy link
Member

@hns hns left a comment

That was quite the oversight. Kudos for spotting this!

@@ -198,7 +198,6 @@ private void handleHtmlFile(DocFile srcfile, DocPath dstPath) throws DocFileIOEx
PackageElement pkg = dfElement.getPackageElement();

HtmlDocletWriter docletWriter = new DocFileWriter(configuration, dfilePath, element, pkg);
configuration.messages.notice("doclet.Generating_0", docletWriter.filename.getPath());
Copy link
Member

@hns hns Feb 22, 2021

Choose a reason for hiding this comment

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

I guess this is to prevent duplicate output. It could probably have been solved by printing the HTML file's whole path (docletWriter.filename just contains the base name), or including the destination path. But I'm not convinced we need to generate a message for each and every file we copy, so it's probably fine as it is.

Copy link
Member

@hns hns Feb 22, 2021

Choose a reason for hiding this comment

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

Please ignore that comment, I just saw there's already a message with the full path.

Copy link
Contributor Author

@jonathan-gibbons jonathan-gibbons Feb 23, 2021

Choose a reason for hiding this comment

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

FWIW, based on other recent experiences, I think there is the potential to have more versatile control of which messages to suppress. -quiet just does everything. But this is another discussion.

@openjdk
Copy link

@openjdk openjdk bot commented Feb 22, 2021

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

8223355: Redundant output by javadoc

Reviewed-by: hannesw

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

  • 26c1db9: 8254239: G1ConcurrentMark.hpp unnecessarily disables MSVC++ warning 4522.
  • 0c21dd0: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method
  • 2b55501: 8261949: fileStream::readln returns incorrect line string
  • 539c80b: 8261702: ClhsdbFindPC can fail due to PointerFinder incorrectly thinking an address is in a .so
  • 564011c: 8261290: Improve error message for NumberFormatException on null input
  • 18188c2: 8261692: Bugs in clhsdb history support
  • 0825bc5: 8261929: ClhsdbFindPC fails with java.lang.RuntimeException: 'In java stack' missing from stdout/stderr
  • c2509ea: 8261857: serviceability/sa/ClhsdbPrintAll.java failed with "Test ERROR java.lang.RuntimeException: 'cannot be cast to' found in stdout"
  • 2b00367: 8261350: Create implementation for NSAccessibilityCheckBox protocol peer
  • 5a25cea: 8261998: Remove unused shared entry support from utilities/hashtable
  • ... and 52 more: https://git.openjdk.java.net/jdk/compare/d547e1a84723e94813fc600c884c9cfee0ed8f57...master

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 label Feb 22, 2021
@jonathan-gibbons
Copy link
Contributor Author

@jonathan-gibbons jonathan-gibbons commented Feb 23, 2021

/integrate

@openjdk openjdk bot closed this Feb 23, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Feb 23, 2021
@jonathan-gibbons jonathan-gibbons deleted the 8223355-duplicates branch Feb 23, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Feb 23, 2021

@jonathan-gibbons Since your change was applied there have been 89 commits pushed to the master branch:

  • d2b9c22: 8262011: [JVMCI] allow printing to tty from unattached libgraal thread
  • 0257caa: 8261397: Try Catch Method Failing to Work When Dividing An Integer By 0
  • 8a2f589: 8260637: Shenandoah: assert(_base == Tuple) failure during C2 compilation
  • 67762de: 8262197: JDK-8242032 uses wrong contains_reference() in assertion code
  • 9d9bedd: 8262094: Handshake timeout scaled wrong
  • 29c7263: 8252709: Enable JVMCI when building linux-aarch64 at Oracle
  • 12f6ba0: 8262087: Use atomic boolean type in G1FullGCAdjustTask
  • a5c4b9a: 8260223: Handling of unnamed package in javadoc pages
  • 8cfea7c: 8261921: ClassListParser::current should be used only by main thread
  • 991f7c1: 8210373: Deadlock in libj2gss.so when loading "j2gss" and "net" libraries in parallel.
  • ... and 79 more: https://git.openjdk.java.net/jdk/compare/d547e1a84723e94813fc600c884c9cfee0ed8f57...master

Your commit was automatically rebased without conflicts.

Pushed as commit 53b1545.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated javadoc
3 participants