On Thu, 8 Sep 2022 09:40:13 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

>> To clarify my last post. The Main compile rule has this prereq declaration:
>> 
>> 
>> $$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_FILELIST) $$($1_DEPENDS) \
>>         $$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG)
>> 
>> The `$$($1_DEPENDS)` and `$$($1_EXTRA_DEPS)` may contain 
>> prereqs/dependencies that we probably should always recompile everything 
>> for. The EXTRA_DEPS is where we get the API changes from other modules. The 
>> DEPENDS variable is set by the caller and can be anything. Both of these are 
>> (deliberately) missing from the FILELIST generation rule, but I think 
>> MODFILES generation needs them. Because of this, I think the new MODFILES 
>> logic needs to move to the main compilation rule (like in your original 
>> patch) but the FILELIST rule should still be left alone.
>> 
>> We need to verify that this still gives us the expected speedup in the 
>> common case though. I'm not sure in what situations other dependencies may 
>> be included in `$?` here.
>
> Actually, this is not an entirely correct description. EXTRA_DEPS points to 
> the `depend` javac plugin itself in buildtools. Once built, this is unlikely 
> to change. Dependency on the API changes themselves happen on a higher level, 
> in `CompileJavaModules.gmk`, where we add a dependency of the outputted 
> `pubapi` file for modules we depend on. 
> 
> (I did have to look this up, though)

I looked up what kind of dependencies we are passing in through `DEPEND`. None, 
it turns out. It is not used. So that is not a worry. We might consider 
removing it. Sending in exceptional dependencies like that is never a good 
design decision. If it ever happens again that this would be the only 
acceptable solution, we can re-add the `DEPEND` argument.

But that basically mean that Jan's patch might be okay, after all. `DEPENDS` 
does not exist, and I want to remove it. `EXTRA_DEPS` is only modified if we 
change the `depend` javac plugin. I am willing to sacrifice automatic 
recompilation of all Java classes if that is changed.

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

PR: https://git.openjdk.org/jdk/pull/10104

Reply via email to