Regression in JDK8 build 78: javac complains about missing Class#isAnnotationPresent
uschindler at apache.org
Thu Feb 28 14:36:57 PST 2013
that’s true, somebody added the –Xlint:-options tot he ANT build file.
This is still no answer to the source of the problem, making again a new Oracle Java version unusable to compile millions of open source projects (Lucene is just an example) – this status quo seems to repeat on every new major version. Last time it was the serious Hotspot bug corrumpting loops in Java7 GA. Every public Java project has somewhere in their build file “-target 1.6 -source 1.6” (or another older version), because otherwise you cannot run the generated class files with older Java versions. Compiling with a custom bootclasspath is a good idea to *validate* that your code actually is compliant. But if you need to use the bootclasspath, you need to have the older JDK version installed - in that case you could compile with it, too.
The intention here is to just “test” the class files with newer JDK versions which is now impossible, without hacking the whole build in an incompatible way. If this is not fixed, we will suggest to users, not to upgrade to JDK8 once it is out – because we cannot test the class files with JDK 8 (and we have already seen lots of hotspot issues making Apache Lucene crash/fail). The same procedure as every year – ahm Java version.
Of course to produce Java 6 class file format, one could use only “-target 1.6” and don’t pass “-source 1.6” (so let it default to 1.8), but this does not help if you build your project with Apache Ant (maybe doesn’t help with Maven, too):
[javac] Compiling 113 source files to C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr3\lucene\build\test-framework\classes\java
[javac] The -source switch defaults to 1.8 in JDK 1.8.
[javac] If you specify -target 1.6 you now must also specify -source 1.6.
[javac] Ant will implicitly add -source 1.6 for you. Please change your build file.
So you no longer have the chance to produce javac 1.6 compliant class files without bootclasspath (using common build tools like Apache ANT). This makes JDK8 unusable.
Sorry for complaining,
But that’s a major regression!
uschindler at apache.org
Apache Lucene PMC Member / Committer
From: Maurizio Cimadamore [mailto:maurizio.cimadamore at oracle.com]
Sent: Thursday, February 28, 2013 11:15 PM
To: Uwe Schindler
Cc: 'Joe Darcy'; lambda-dev at openjdk.java.net; compiler-dev at openjdk.java.net
Subject: Re: Regression in JDK8 build 78: javac complains about missing Class#isAnnotationPresent
On 28/02/13 21:31, Uwe Schindler wrote:
I know about this warning and it generally appears on Java 7, but it was *not* printed out in that case (8b78)! The log I posted was the complete printout from javac.
This warning is a Xlint warning - so it's possible that you are compiling the project with a custom set of Xlint warnings that doesn't include this category (called 'options').
More information about the lambda-dev