Skip to content

Conversation

@david-beaumont
Copy link
Contributor

@david-beaumont david-beaumont commented Nov 7, 2025

Copies valuetype classes for each module into corresponding "/META-INF/preview/..." sub-directories to be pulled into jimage files and processed by the new preview mode handling code.

There might be a better way to do this in terms of Makefile semantics, but this seems to work well enough and doesn't prevent the value-class JAR files being generated for patching (which is still how everyone will get value classes until the rest of the work is plumbed in).

To enable the new preview mode work, set the "DISABLE_PREVIEW_PATCHING" system property to "true".


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • JDK-8368475: [lworld] Add preview classes to jimage at make time (Sub-task - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1727/head:pull/1727
$ git checkout pull/1727

Update a local copy of the PR:
$ git checkout pull/1727
$ git pull https://git.openjdk.org/valhalla.git pull/1727/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1727

View PR using the GUI difftool:
$ git pr show -t 1727

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1727.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 7, 2025

👋 Welcome back david-beaumont! A progress list of the required criteria for merging this PR into lworld will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 7, 2025

@david-beaumont This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8368475: [lworld] Add preview classes to jimage at make time

Reviewed-by: rriggs

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 4 new commits pushed to the lworld branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@RogerRiggs) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 7, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 7, 2025

Webrevs

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Nov 12, 2025
@RogerRiggs
Copy link
Collaborator

How is this change tested?
What tests verify the configuration with "DISABLE_PREVIEW_PATCHING=true"

@RogerRiggs
Copy link
Collaborator

Please merge with lworld so all the related commits are in place.

@RogerRiggs
Copy link
Collaborator

There should be a log message indicating that jimage is using preview classes.
Perhaps per-class logging, as is done for CDS archive or JAR file or..., indicating where the class is loaded from. That would give good visibility into class loading problems, if any.

There is an existing message in arguments.cpp for patched value classes that could be revised for enabling preview classes from jimage.

    log_info(class)("--enable-preview appending value classes for module %s: %s", module_name, entry->d_name);

Copy link
Collaborator

@RogerRiggs RogerRiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does the job, but its hard to confirm the results.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants