RFR: 8054717: SJavac should track changes in the public apis of classpath classes!
Andreas Lundblad
andreas.lundblad at oracle.com
Thu Dec 11 14:35:35 UTC 2014
On Thu, Dec 11, 2014 at 12:43:07PM +0100, Erik Joelsson wrote:
> Hello,
>
> This version seems to be working quite well for me at least. Only
> thing I've noticed is a confusing log message. After a full build:
>
> $ touch jdk/src/java.base/share/classes/java/lang/Object.java
> $ make LOG=info
> ...
> Compiling java.base
> Starting server. Command: /localhome/java/default/bin/java -d64
> -Xms512M -Xmx2048M -Xbootclasspath/p:/localhome/hg/jdk9-dev-sjavacpatch/build/linux-x86_64-normal-server-release/buildtools/interim_langtools.jar
> -cp /localhome/hg/jdk9-dev-sjavacpatch/build/linux-x86_64-normal-server-release/buildtools/interim_langtools.jar
> com.sun.tools.sjavac.Main --startserver:portfile=/localhome/hg/jdk9-dev-sjavacpatch/build/linux-x86_64-normal-server-release/javacservers/server.port,logfile=/localhome/hg/jdk9-dev-sjavacpatch/build/linux-x86_64-normal-server-release/javacservers/server.port.javaclog,stdouterrfile=/localhome/hg/jdk9-dev-sjavacpatch/build/linux-x86_64-normal-server-release/javacservers/server.port.stdouterr,poolsize=32,keepalive=120
> Trying to connect. Attempt 1 of 3
> Connected
> Compiling java.lang(118) (with 1 dependents)
> Trying to connect. Attempt 1 of 3
> Connected
> The pubapi of java.lang.Character has changed!
> ...
>
> I'm pretty sure java.lang.Character didn't change and sjavac seems
> to be behaving correctly by not acting like it has. I'm also
> wondering why the messages about connect are printed twice. I'm fine
> with fixing this in a followup bug.
Sjavac treated java.lang.Character as a package because it contained an public inner class. New revision is up addressing this issue. Thanks for catching this.
The fact that two connections are made is because there are two calls involved: query server for memory constraints and the actual compile. I expect this to go away when sjavac is refactored to a thin client.
-- Andreas
More information about the compiler-dev
mailing list