Review Request JDK-8182032: Make java.compiler upgradeable

Mandy Chung mandy.chung at oracle.com
Tue Jun 13 20:33:01 UTC 2017


The langtools modules are not intended nor required to be upgradeable.  JDK 9 javap will only work with JDK 9 java.compiler.  When IDE upgrades java.compiler to JDK 10 and runs on JDK 9, it would have to deliver a Java compiler implementing JDK 10 JavaCompiler API and could also implement the new version of javap.  One thing to mention is that javap is java.util.spi.ToolProvider and it could provide a ToolProvider of this new version of javap.

Mandy

FYI. The list of modules that directly and indirectly require java.compiler:

$ jdeps -I --require java.compiler

Inverse transitive dependences on [java.compiler]
java.compiler <- jdk.jshell
java.compiler <- jdk.scripting.nashorn.shell
java.compiler <- jdk.xml.ws
java.compiler <- java.se <- java.se.ee
java.compiler <- java.xml.bind <- java.se.ee
java.compiler <- java.xml.bind <- jdk.xml.bind
java.compiler <- java.xml.bind <- jdk.xml.ws
java.compiler <- jdk.compiler <- jdk.javadoc
java.compiler <- jdk.compiler <- jdk.jdeps
java.compiler <- jdk.compiler <- jdk.jshell
java.compiler <- jdk.compiler <- jdk.rmic
java.compiler <- jdk.compiler <- jdk.xml.bind
java.compiler <- jdk.javadoc <- jdk.rmic
java.compiler <- jdk.jdeps <- jdk.packager
java.compiler <- jdk.xml.bind <- jdk.xml.ws
java.compiler <- java.xml.bind <- java.xml.ws <- java.se.ee
java.compiler <- java.xml.bind <- java.xml.ws <- jdk.xml.ws
java.compiler <- jdk.jdeps <- jdk.jlink <- jdk.packager


> On Jun 13, 2017, at 2:11 AM, Remi Forax <forax at univ-mlv.fr> wrote:
> 
> My concern is that by example javac and javap need to be aligned and by making a module upgradeable you can not make only some packages upgradeable.
> So it seems logical that if java.compiler is upgradeable the other modules of langtools are upgradable too.
> 
> Rémi 
> 
> 
> On June 13, 2017 10:26:18 AM GMT+02:00, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>> On 13/06/2017 08:42, Remi Forax wrote:
>>> Hi Mandy,
>>> why only java.compiler is upgradable and not all modules defined in
>> langtools ?
>>> 
>> java.compiler needs to be upgradeable because JSR 199 and JSR 269 are 
>> standalone technologies.
>> 
>> The other modules in the langtools repository are JDK-specific. They 
>> aren't meant to be upgraded via the upgrade module path. If someone is 
>> forking the code to create their own version of jdk.compiler (for 
>> example) then they can re-package or load it into a child layer.
>> 
>> -Alan
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.



More information about the jigsaw-dev mailing list