RFR: 8311302: Implement JEP 493: Linking Run-Time Images without JMODs [v46]
Severin Gehwolf
sgehwolf at openjdk.org
Fri Nov 8 10:02:49 UTC 2024
On Fri, 8 Nov 2024 09:44:01 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Severin Gehwolf has updated the pull request incrementally with six additional commits since the last revision:
>>
>> - Mandy's feedback
>> - Remove "jlink.runtime.linkable" property from VMProps
>>
>> It's no longer used in any tests.
>> - Fix JLinkDedupTestBatchSizeOne.java
>> - Fix plugins/IncludeLocalesPluginTest.java
>>
>> Similar to GenerateJLIClassesPluginTest.java, the default module path
>> doesn't need to be explicitly specified.
>> - Fix plugins/GenerateJLIClassesPluginTest.java test
>>
>> The test doesn't need the default module path and default jmods
>> generated from the helper. Using this approach makes it work for
>> linkable run-time images as well.
>> - Simplify runtimeImage tests
>
> test/jtreg-ext/requires/VMProps.java line 28:
>
>> 26: import java.lang.module.ModuleFinder;
>> 27: import java.lang.module.ModuleReader;
>> 28: import java.lang.module.ModuleReference;
>
> I assume they aren't needed now.
True.
> test/langtools/tools/javac/plugin/AutostartPlugins.java line 33:
>
>> 31: * jdk.jlink
>> 32: * @build toolbox.ToolBox toolbox.JavacTask toolbox.JarTask
>> 33: * @run main/othervm AutostartPlugins
>
> Why do the two javac plugin tests changed to /othervm? I assume they fail with a JDK built with --generate-linkable-runtime but I can't immediately see why.
jtreg patches the `java.base` module and those langtools tests *link* from the run-time image (in such a config). Having a patched JDK module is not supported (and I don't think we ever should). Running in a separate JVM doesn't have this problem. See https://github.com/openjdk/jdk/pull/14787/commits/d8e1e834508589725adb8d70acb862a1270678ca. Does that make sense?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1834057484
PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1834056602
More information about the core-libs-dev
mailing list