picocli
picocli copied to clipboard
Support Class Data Sharing
Right now if you enable Class Data Sharing (using -XX:ArchiveClassesAtExit
) for an application that uses Picocli you get a long list of warnings like this:
[0.518s][warning][cds] Pre JDK 6 class not supported by CDS: 49.0 picocli/CommandLine$Model$ArgGroupSpec$Builder
[0.518s][warning][cds] Pre JDK 6 class not supported by CDS: 49.0 picocli/CommandLine$Model$CaseAwareLinkedMap
[0.518s][warning][cds] Pre JDK 6 class not supported by CDS: 49.0 picocli/CommandLine$DefaultFactory
[0.518s][warning][cds] Pre JDK 6 class not supported by CDS: 49.0 picocli/CommandLine$Help$IParamLabelRenderer
[0.518s][warning][cds] Pre JDK 6 class not supported by CDS: 49.0 picocli/CommandLine$IExitCodeExceptionMapper
...
It's probably not a very important issue but I'm creating it to at least know what the official view on this is. Because a fix means that Picocli would have to start using Java 6 as its minimal JVM version.
Thanks for raising this!
My position has always been to support Java 5 as long as possible. This is a new argument against that, that is good to know.
It would be good to know what the actual concrete impact would be on startup time if picocli was using Java 6 byte codes. (If you want to test, you can create picocli jar files that have Java 6 byte codes by building the project with Java 9 or later.)
I am mostly focused on functional improvements at the moment, but after that (don't know when that will be) I will take a look at performance considerations. This proposal may be more attractive if it results in a significant reduction in startup time.