RFR: 8319343: Improve CDS module graph support for --add-modules option [v2]

Calvin Cheung ccheung at openjdk.org
Mon Oct 28 16:21:32 UTC 2024


On Mon, 28 Oct 2024 09:09:35 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Thanks, I'll get back to you on but I want see how this will behave with ALL-MODULE-PATH as that will sometimes appear in Maven environments.
>
> I chatted with Calvin about this change. Testing that the root modules specified to --add-modules are in the run-time image isn't a sufficient test because these modules, or any modules that they transitively require, may use services that are provided by modules on the application module. An accurate test would require generating a second Configuration without --add-modules and testing that all modules in the set-difference are in the run-time image. That adds a lot of complexity that would be hard to explain and diagnose why dumping works in some cases and not others. Also possible next steps for CDS would allow for modules on the module path so just allowing this now would avoid this complexity.

After off-line discussion with Alan, we will allow any module to be included in --add-modules for CDS.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21553#discussion_r1819362860


More information about the core-libs-dev mailing list