On 17/10/2017 20:20, Martin Buchholz wrote:
:

Wow, --limit-modules sure is a good trick.  So now we have two possible replacements for the demise of -Xbootclasspath/p:
--patch-module
--limit-modules combined with renamed replacement modules
The trick works for the unique scenario of bootstrapping the build but is not general purpose. You can't use it to replace java.base or any module mapped to the boot or platform class loaders for example.


Looking at the patch I see
+INTERIM_LANGTOOLS_ADD_EXPORTS := \
+    --add-exports java.base/sun.reflect.annotation=jdk.compiler.interim \
+    --add-exports java.base/jdk.internal.util.jar=jdk.jdeps.interim \
+    --add-exports java.base/jdk.internal.misc=jdk.jdeps.interim \
+    #
so the interim compiler is accessing JDK internals - isn't this what we're telling users NOT to do?  Especially when this is the internals of the boot jdk - You can't bootstrap jdk10 with any compliant implementation of Java SE 9!  The jdk bootstrap process should be setting a good example!
We are stuck with the first one due to an oversight in JDK 5 in the way that annotations are serialized.

I think the other two should go away once JarFile provides a way to get a versioned stream (there have been a couple of threads about this on core-libs-dev).

-Alan

Reply via email to