Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8196295

[Graal] remove unused org.graalvm.options package

XMLWordPrintable

    • 10
    • b42
    • Verified

        In the process of building JDK snapshots for including in Graal testing[1], I've discovered a problem due to some packages shared between Truffle and Labs Graal that are being included in OpenJDK Graal in a non-exported manner. This means we get permission errors when trying to test Truffle on JDK 10:

        dsimon@kruger-4 ~/h/g/truffle> java -version
        java version "10-ea" 2018-03-20
        Java(TM) SE Runtime Environment 18.3 (build 10-ea+41)
        Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10-ea+41, mixed mode)
        dsimon@kruger-4 ~/h/g/truffle> mx build
        dsimon@kruger-4 ~/h/g/truffle> mx unittest --fail-fast PrimitiveRawArrayInteropTest#boolOp
        MxJUnitCore
        JUnit version 4.12
        Single method selected - fail fast not supported
        .E
        boolOp(com.oracle.truffle.api.interop.java.test.PrimitiveRawArrayInteropTest)
        java.lang.IllegalAccessError: class com.oracle.truffle.api.TruffleLanguage (in unnamed module @0x275710fc) cannot access class org.graalvm.options.OptionDescriptors (in module jdk.internal.vm.compiler) because module jdk.internal.vm.compiler does not export org.graalvm.options to unnamed module @0x275710fc
        at com.oracle.truffle.api.TruffleLanguage.getOptionDescriptors(TruffleLanguage.java:470)

        The problem is that the org.graalvm.options package is being included in JDK Graal even though it's not used by OpenJDK Graal. To fix this, src/jdk.internal.vm.compiler/share/classes/org.graalvm.options must be removed from JDK 10 sources. I know it's late in the game but without this, Truffle developers will never be able to use JDK 10 without using a bunch of --add-exports or --add-opens VM options.

              iveresov Igor Veresov
              dnsimon Douglas Simon
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: