RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v8]
Severin Gehwolf
sgehwolf at openjdk.org
Mon Dec 16 13:46:43 UTC 2024
On Fri, 13 Dec 2024 18:40:31 GMT, Mandy Chung <mchung at openjdk.org> wrote:
> This PR changes to find the root modules from the paths specified in --module-path only.
Yes, but in this case modules on the module path contain modules that require `jdk.jfr`:
$ jmod describe ./build/linux-x86_64-server-release/test-support/jtreg_test_jdk_tools_jlink_basic_AllModulePath_java/scratch/0/jmods/com.baz.runtime.jmod
com.baz.runtime
exports com.baz.runtime
exports com.baz.runtime.com.foo.bar
requires java.base mandated
requires jdk.jfr
main-class com.baz.runtime.Main
So I think it's OK to limit to a smaller set of modules even though it seems a strange use-case.
A different question would be what should happen if the module specified in `--limit-modules` in **not** in the dependency graph of ALL-MODULE-PATH modules.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22494#discussion_r1886840268
More information about the core-libs-dev
mailing list