On Tue, 17 Dec 2024 22:28:10 GMT, Mandy Chung <mch...@openjdk.org> wrote:

> > So this means `--limit-modules` has no meaning when `ALL-MODULE-PATH` is 
> > specified. It will be ignored.
> 
> I can't tell how it will be ignored. Maybe missing something.
> 
> The transitive dependences of the modules specified to `--limit-modules` plus 
> the modules specified to `--add-modules` are observable. See the 
> implementation of `limitFinder` method which do not compute the dependences 
> of the modules specified to `--add-modules`.
> 
> > ```
> > * `jlink --add-modules ALL-MODULE-PATH --module-path MP --limit-modules 
> > java.base`
> > ```
> This jlink command should fail as jdk.net required by b is not observable.

Maybe I'm missing something, too. It seems we have a different understand of 
*what* the transitive closure is being taken of.

`[...] plus the modules specified to '--add-modules' are observable`. So in the 
above case `MP` has `{a,b,c}` as observable because ALL-MODULE-PATH has been 
specified. Thus, since I understood it as the "transitive closure of `{a, b, 
c}` and `java.base`" => `{a, b, jdk.net, c, java.base}` it would not fail.

It sounds to me that you interpret "transitive closure of named modules plus 
the modules added with --add-modules" as `{java.base, a, b, c}`. Is that it?

Anyway, lets continue this discussion on a separate issue if possible.

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

PR Comment: https://git.openjdk.org/jdk/pull/22494#issuecomment-2551086758

Reply via email to