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

Alan Bateman alanb at openjdk.org
Mon Oct 28 09:11:42 UTC 2024


On Tue, 22 Oct 2024 12:42:30 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> I've removed the `if` check at the beginning of the method.
>
> 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.

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

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


More information about the hotspot-runtime-dev mailing list