Graal now requires jdk-9-ea+152
Doug Simon
doug.simon at oracle.com
Fri Jan 13 18:43:17 UTC 2017
The recent jigsaw refreshes[1] to JDK 9 introduced backwards incompatible changes that impacted Graal. The major changes include:
1. The keyword for re-exporting dependencies changed[2] from `public` to `transitive`.
2. The signature for ModuleDescriptor.provides() changed[3].
3. Reflection on non-public fields and methods requires the declaring package to be open to the caller's module[4].
4. Trailing digits are dropped from the names of automatic modules[5].
Furthermore, a version of Graal has now been integrated into JDK9 as the module named `jdk.vm.compiler`. This complicates developing and deploying github Graal on JDK9 since we need to replace this module at compile and run time with the Graal sources under development. As detailed in JDK-8171448[6], achieving the latter is possible via use of --patch-module and --upgrade-module-path. The only way I've found to compile Graal sources (and Graal test sources) on JDK9 without the builtin jdk.vm.compiler getting in the way is to emulate --strict-compliance mode. As such, I've added support[7] to mx for projects to force this mode by appending `=` to the end of their javaCompliance attribute value (e.g., "javaCompliance" : "1.8=") in suite.py.
The Graal changes to address the above issues are now in https://github.com/graalvm/graal-core[8]. After pulling them, you’ll need to download jdk9-ea+152 if you plan to develop Graal on JDK 9.
Let’s hope this is the last major jigsaw update ;-)
If you run into problems caused by these changes, please file issues at https://github.com/graalvm/graal-core
-Doug
[1] https://bugs.openjdk.java.net/browse/JDK-8169069, https://bugs.openjdk.java.net/browse/JDK-8170987
[2] http://hg.openjdk.java.net/jdk9/hs/jdk/rev/89ef4b822745#l18.37
[3] http://hg.openjdk.java.net/jdk9/hs/jdk/rev/89ef4b822745#l20.679
[4] http://download.java.net/java/jdk9/docs/api/java/lang/reflect/AccessibleObject.html#setAccessible-boolean-
[5] http://mail.openjdk.java.net/pipermail/jpms-spec-experts/2016-September/000393.html
[6] https://bugs.openjdk.java.net/browse/JDK-8171448
[7] https://github.com/graalvm/mx/blob/master/mx.py#L2026
[8] https://github.com/graalvm/graal-core/commit/2e1fc7bcb1a5c02cc47218d9224fbfdc7563f789
More information about the graal-dev
mailing list