On Fri, 13 Dec 2024 18:40:31 GMT, Mandy Chung <mch...@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

Reply via email to