[lworld] Withdrawn: 8366200: Modify jimage package flags to support preview mode
David Beaumont
duke at openjdk.org
Tue Sep 16 22:01:44 UTC 2025
On Fri, 29 Aug 2025 13:21:07 GMT, David Beaumont <duke at openjdk.org> wrote:
> Reuses the previously unused package flags in the /packages/xxx entries of jimage files to support preview mode.
>
> With these flags it becomes simple to determine things like:
> 1. Which modules are children of /packages/xxx
> - This can differ between preview and non-preview mode.
>
> 2. Which modules/packages have any preview content
> - Useful in preview mode for faster rejection testing to avoid double-lookup on all resources.
>
> If there are no preview resources built into the jimage file, then the difference between output is that the "isEmpty" flag (old version) has become a "hasContent" flag (but since these flags are not read by anyone right now, this should not be an issue).
>
> Note that bumping the minor version number was done to ensure that, during testing, no undiscovered code is reading the new file with old logic (this would work since there's no structural change, but the semantics are different).
>
> This does mean that on systems where a 'jimage' binary is installed for the JDK (e.g. /usr/bin/jimage), that tool will stop working on files generate by this code, but the version of that binary in the built JDK will work. The alternative is to just not bump the version number (if nobody is reading the flags now, it shouldn't matter what's in them).
This pull request has been closed without being integrated.
-------------
PR: https://git.openjdk.org/valhalla/pull/1537
More information about the valhalla-dev
mailing list