RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v8]
Severin Gehwolf
sgehwolf at openjdk.org
Tue Dec 17 10:43:38 UTC 2024
On Mon, 16 Dec 2024 19:07:51 GMT, Mandy Chung <mchung at 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 at 25-internal
>> jdk.jfr at 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
More information about the core-libs-dev
mailing list