On Mon, 2 Sep 2024 12:27:21 GMT, Alan Bateman <al...@openjdk.org> wrote:
> This PR proposes changes to the ModuleBootstrap code that is used with CDS > (Ahead-of-Time Class Loading & Linking in the future). At things stand, the > module graph and boot layer can be archived at dump time (-Xshare:dump) when > the initial module is the class path or the initial module is in the run-time > image. Future work will extend this to deployments with an application module > path or where additional root modules are specified with --add-modules. To > get there we need the code that determines whether to archive is in one > place, and it needs to know if the module graph contains incubator modules or > split packages. > > Testing: tier1-tier6. There are no new tests, the changes don't expand or > change what can be archived. Calvin has done some some testing with the > change as it is needed for > [JDK-8328313](https://bugs.openjdk.org/browse/JDK-8328313). The logic seems to be correct (or at least err on the side of safety and recompute hasSplitPackages/hasIncubatorModules when we aren't 100% sure). Small nit on the bug title: should it be changed to ".... when module resolution is required at startup"? ------------- Marked as reviewed by iklam (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20818#pullrequestreview-2298403770