On Mon, 16 Dec 2024 19:07:51 GMT, Mandy Chung <mch...@openjdk.org> wrote:

>> jlink --add-modules ALL-MODULE-PATH --limit-modules jdk.jfr --module-path 
>> jmods --output all-mods-limit-mods.image
>> 
>> 
>> The set of observable modules only has `java.base` and `jdk.jfr` because of 
>> `--limit-modules`.   Hence `com.baz.runtime` from `jmods` is not observable. 
>>    `ALL-MODULE-PATH` adds all observable modules found on the relevant 
>> module paths are added to the root set.   This matches the run-time behavior.
>> 
>> 
>> $ java --list-modules -p com.baz.runtime.jar --add-modules ALL-MODULE-PATH 
>> --limit-modules jdk.jfr
>> java.base@25-internal
>> jdk.jfr@25-internal
>
> Limiting the observable modules is sometimes useful for testing/debugging and 
> to reduce the number of modules resolved when the main module is the unnamed 
> module.
> 
> @AlanBateman  Is `--limit-modules` needed at link time?

@mlchung It's not clear if you think there is an action expected from myself. 
If there is, please clarify what. Thanks!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22494#discussion_r1888295140

Reply via email to