RFR: 8345259: When linking from the run-time image ALL-MODULE-PATH is not accepted
Severin Gehwolf
sgehwolf at openjdk.org
Tue Dec 3 15:51:42 UTC 2024
On Tue, 3 Dec 2024 15:26:32 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> I'm in two minds as to whether we should do anything here.
So am I. The main motivation is that this no longer works with JEP 493 is enabled (no `jmods` dir):
$ bin/jlink --add-modules ALL-MODULE-PATH --output all-mods
Without looking at the implementation, the user doesn't add anything explicit via `--module-path` (the impl in fact adds `jmods` folder if it exists). So it can be seen as a regression.
> ALL-MODULE-PATH means all observable modules on the module path but here, it's all observable modules minus jdk.jlink or any module that directly requires jdk.jlink. This is hard to reason about.
I'll add here that the reason we need to do this in this patch is because `jdk.jlink` isn't being allowed to be part of the link in JEP 493. So in a way, when that restriction goes away this restriction can go away too.
I'd be fine with adding a `Warning` that for run-time image links and ALL-MODULE-PATH doesn't add `jdk.jlink` or modules depending on `jdk.jlink` to the root set. This would be the right thing to do to call out the difference.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22494#issuecomment-2514934609
More information about the core-libs-dev
mailing list