On Fri, 19 Feb 2021 22:11:04 GMT, Jonathan Gibbons <j...@openjdk.org> wrote:
>> 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%! > > Jonathan Gibbons has updated the pull request incrementally with one > additional commit since the last revision: > > Add a default-on check that "chatty" lines in the output are unique > (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 That was quite the oversight. Kudos for spotting this! src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DocFilesHandlerImpl.java line 201: > 199: > 200: HtmlDocletWriter docletWriter = new DocFileWriter(configuration, > dfilePath, element, pkg); > 201: configuration.messages.notice("doclet.Generating_0", > docletWriter.filename.getPath()); 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. ------------- Marked as reviewed by hannesw (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/2652