On Tue, 3 Dec 2024 15:26:32 GMT, Alan Bateman <al...@openjdk.org> wrote:

> ALL-MODULE-PATH means all observable modules on the module path but here, 
> it's all observable modules minus jdk.jlink or any module that directly 
> requires jdk.jlink. This is hard to reason about, and not exactly right 
> either because any filtering should be any module that transitively requires 
> jdk.jlink.

I have the same comment.  ALL-MODULE-PATH means all observable modules on the 
module path that includes `jdk.jlink`.  It would be confusing if the resulting 
image linked from the run-time image is different than the image linked from 
packaged modules.   I think it may just be another restriction that 
`--add-modules ALL-MODULE-PATH` can't be used when linking from the run-time 
image for now and removed together when the other restriction is removed.

> As background, the original motivation for ALL-MODULE-PATH was Maven build. 
> It has always been supported by jlink too but I can't recall, or find, why we 
> did that. Maybe Mandy can remember. In JEP 261, it is listed as being valid 
> for both compile-time and run-time, but also mentions link-time.

I don't recall neither.   It might just be implemented as consistent with java 
and javac.

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

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

Reply via email to