On Thu, 30 Nov 2023 10:13:39 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:

>> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java line 286:
>> 
>>> 284:             }
>>> 285: 
>>> 286:             boolean useModulePath = !options.modulePath.isEmpty();
>> 
>> Is there any reason why the run-time image based linking is only supported 
>> if `--module-path` is not specified?   Linking user modules specified on the 
>> module path with the run-time image seems useful.   If the module exists in 
>> the given module path and the run-time image, the modules from the module 
>> path should probably take precedence but it needs to work through the 
>> details and potential issues.
>
> I haven't looked into the details, but the common case is for jlink users to 
> use the default module path (`jmods` folder of the JDK install) and the prime 
> use-case for this is to get away with performing a link without the packaged 
> modules (no "external" dependency if you will; of that `jmods` folder). It 
> could be considered as a follow-up. In this patch I wouldn't want to 
> complicate it further if that sounds OK?

Yes it's fine.  We can wait for more feedback and consider this future 
enhancement if desirable.  I just wanted to understand the reason.  Good to add 
a comment to explain.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14787#discussion_r1411009704

Reply via email to