RFR: JDK-8244210: The javac server is never used
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Mon May 4 09:32:40 UTC 2020
On 2020-04-30 21:10, Erik Joelsson wrote:
> Hello,
>
> A minor mistake in JDK-8244036 is causing the javac server to never be
> used, which is rather severly increasing build times.
>
> Before that change, the global variable ENABLE_SJAVAC was used to
> determine if the server should be activated. After the change, the
> global variable has changed names to ENABLE_JAVAC_SERVER. The
> conditional in JavaCompilation.gmk tries to check the value of the
> local variable/parameter $1_ENABLE_JAVAC_SERVER instead, but this
> parameter is never set or given a default. I don't think we need a
> local variable/parameter for this as there is currently no need to
> disable the server for any specific SetupJavaCompilation call, so I my
> fix is to just refer directly to the global variable from
> configure/spec.gmk instead.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8244210
>
> Webrev: http://cr.openjdk.java.net/~erikj/8244210/webrev.01/webrev/
Thank you for fixing this!
I really scratched my head on how this came to be. I messed up since I
did development in parallel in both a branch in the sandbox, and just
experimentally, without any version tracking, in a checked out jdk repo.
The very last commit to the sandbox, with a fix copied from my
experimental repo, was:
- ifeq ($$(ENABLE_JAVAC_SERVER), true)
+ # Use java server if it is enabled, and the user do not want a
specialized
+ # class path.
+ ifeq ($$($1_ENABLE_JAVAC_SERVER+$$($1_CLASSPATH)), true+)
which were obviously broken. But I only verified that it the patch
worked --as in, not using the server -- for the cases which specified
CLASSPATH. *doh*
I'm not sure what the lesson here is. I really liked having a wild
playground and a structured progress in parallel, and I don't think I
should stop using that method. But I obviously need to test the end
product better, even after the last patch. And when copying unreadable
make syntax, I need to double and triple check.
/Magnus
>
> /Erik
>
More information about the build-dev
mailing list