On Wed, 18 Dec 2024 19:11:12 GMT, Severin Gehwolf <sgehw...@openjdk.org> wrote:
>> Please review this extension to #22609 which now disallows `ALL-MODULE-PATH` >> without explicit `--module-path` option or a non-existent module path. In >> addition, this fixes a bug mentioned in #22609 when `ALL-MODULE-PATH` and >> `--limit-modules` are used in combination. It failed earlier and passes now >> due to alignment of `ModuleFinder`s. With this patch JEP 493 enabled builds >> and regular JDK builds behave the same in terms of `ALL-MODULE-PATH`. >> >> When an explicit module path is being added, there is no difference. All >> modules on that path will be added as roots. Tests have been added for the >> various cases and existing tests updated to allow for them to run on JEP 493 >> enabled builds. Thoughts? >> >> Testing: >> - [x] GHA, `test/jdk/tools/jlink` (all pass) >> - [x] Added jlink test. > > Severin Gehwolf has updated the pull request incrementally with three > additional commits since the last revision: > > - Fix comment > - Revert "Catch case of module not in dependency tree" > > This reverts commit bfac44659e7219afe472d0e61735df119065796d. > - Revert "Fix comments" > > This reverts commit 92f0736a678c59035ee97563756017316aadbfe2. Now I see better from JDK 23 implementation. `jlink --add-modules ALL-MODULE-PATH --module-path mods --limit-modules XXX" always fails independent to what modules are set in `--limit-modules`. The reason is that it always fails to create the module finder with a non-empty limit modules for `ALL-MODULE-PATH`. ModuleFinder finder = newModuleFinder(options.modulePath, options.limitMods, Set.of()); ``` https://github.com/openjdk/jdk23u/blob/master/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/JlinkTask.java#L374 ------------- PR Comment: https://git.openjdk.org/jdk/pull/22494#issuecomment-2552085306