RFR: 8345259: Disallow ALL-MODULE-PATH without explicit --module-path [v14]
Mandy Chung
mchung at openjdk.org
Fri Dec 20 18:08:45 UTC 2024
On Thu, 19 Dec 2024 21:30:10 GMT, Severin Gehwolf <sgehwolf at 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 with a new target base due to a merge or a rebase. The pull request now contains 42 commits:
>
> - Copyright year and test reshuffeling
> - Merge branch 'master' into jdk-8345259-all-module-path-fix
> - Don't allow --limit-modules with ALL-MODULE-PATH
> - Fix comment
> - Revert "Catch case of module not in dependency tree"
>
> This reverts commit bfac44659e7219afe472d0e61735df119065796d.
> - Revert "Fix comments"
>
> This reverts commit 92f0736a678c59035ee97563756017316aadbfe2.
> - Fix comments
> - Catch case of module not in dependency tree
> - Renaming and test fixes
> - Test cleanup
> - ... and 32 more: https://git.openjdk.org/jdk/compare/4d77dbad...024404bb
The man page does not mention about `ALL-MODULE-PATH`. As we believe it's rarely used, I'm okay to leave it as is.
`--add-modules` *mod*[`,`*mod*...]
: Adds the named modules, *mod*, to the default set of root modules. The
default set of root modules is empty.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22494#issuecomment-2557482982
More information about the core-libs-dev
mailing list