On Fri, 27 Oct 2023 13:57:38 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> I've pushed another update with the following changes: >> >> - in the VM code, skip archiving full module graph if there's an incubator >> module by checking if the ArchivedBootLayer::archivedBootLayer is available; >> - included your suggested code changes in ModuleBootstrap.java; >> - added a test scenario with an incubator module. > >> I've pushed another update with the following changes: >> >> * in the VM code, skip archiving full module graph if there's an incubator >> module by checking if the ArchivedBootLayer::archivedBootLayer is available; > > I think we still have the issue when the archive is created with a main > module (meaning a named module) but you run with the class path as the > initial module, e.g. java -version. Is the update missing the changes to > ArchivedModuleGraph as I think that will need to check that the main module > matches the archive. I reran the script you sent me few days ago and got the expected results with the latest changes. The checking of the main module name matches between dump time and runtime is performed in the VM code. If an archive (even the default CDS archive classes.jsa) is created with the -m option, running with just `java -version` will disable the optimized module handling. [0.136s][info ][cds ] _archived_main_module_name m [0.136s][info ][cds ] Module m specified during dump time but not during runtime [0.136s][info ][cds ] Disabling optimized module handling [0.136s][info ][cds ] optimized module handling: disabled [0.136s][info ][cds ] full module graph: disabled ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16016#discussion_r1374796890