On Thu, 18 Jan 2024 13:54:23 GMT, Erik Joelsson <er...@openjdk.org> wrote:

>> @lahodaj Just to be absolutely clear: In `jdk.javadoc-gendata`, we're 
>> calling two tools: Not only `JavadocElementList` (which only requires 
>> source, not class files), but also `CreateSymbols build-javadoc-data`. Can 
>> you confirm that this too only requires sources?
>> 
>> (I take it that this usage is different from `CreateSymbols build-ctsym` as 
>> called in `jdk.compiler-gendata`.)
>
> Looking at `make/modules/jdk.javadoc/Gendata.gmk` the recipe never references 
> `$(JDK_OUTPUTDIR)/modules/`, the output dir where the compiled classes are 
> located. It only references the output of `$(call GetModuleSrcPath)` (and 
> some static src dirs), so I'm pretty confident that this is correct.

Somewhat related to this, while investigating another bug and with this PR 
fresh in memory, I think we are missing another dependency. 

In `make/modules/jdk.javadoc/Gendata.gmk`, we are copying the generated files 
into `jdk.javadoc.interim` (part of interim langtools). This makes me believe 
that the generated files are needed when we use `NEW_JAVADOC` from interim 
langtools to build the API docs for the JDK. However, there is no dependency 
declared from any of the `docs-*-api-javadoc` targets to `jdk.javadoc-gendata`, 
so if this works today, it's just by luck.

I see two possible outcomes:

1. If the generated files from `jdk.javadoc-gendata` are expected to be present 
and used when generating the main API docs for the JDK, then we need to add 
dependencies for that.
2. If the generated files aren't actually needed, we should stop copying them 
to avoid unnecessary work and non deterministic behavior.

Not sure if we should hijack this PR for this problem, probably better to file 
a separate issue. @lahodaj what do you think about this?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17402#discussion_r1458067165

Reply via email to