Skip to content

8345343: Hide java.lang.classfile.components package to implementation #22503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

liach
Copy link
Member

@liach liach commented Dec 2, 2024

The java.lang.classfile.components package was underused and had almost no usage feedback; as a result, it did not caught attention during the preview process of the Class-File API, until the late adoption when Class-File API is sure to become finalized. In the previous rounds of reviews by other engineers, most of the review efforts were devoted to other core modeling and API classes, and components was largely omitted; a few questions were asked, but no solution were proposed and the questions were forgotten.

To compensate in such a short time to the stabilization of JDK 24, we propose to temporarily move this package to jdk.internal instead. This allows us to better consider the role of this package and its members. We considered to continue previewing this package or making it an incubator module, but this is currently not possible as JEP 484 does not provide for any preview API or incubator module - to add such provisions, the JEP must be re-drafted and go through the draft to target process, and now is too late for that.

See https://mail.openjdk.org/pipermail/classfile-api-dev/2024-November/000611.html for initial problem discovery and https://mail.openjdk.org/pipermail/classfile-api-dev/2024-December/000613.html for revision proposal.

Testing: tier 1-3.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires CSR request JDK-8345344 to be approved

Issues

  • JDK-8345343: Hide java.lang.classfile.components package to implementation (Bug - P3) ⚠️ Issue is not open.
  • JDK-8345344: Hide java.lang.classfile.components package to implementation (CSR)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22503

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22503.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 2, 2024

👋 Welcome back liach! A progress list of the required criteria for merging this PR into master 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 Dec 2, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@liach liach changed the title 8345344: Hide java.lang.classfile.components package to implementation 8345321: Hide java.lang.classfile.components package to implementation Dec 2, 2024
@openjdk
Copy link

openjdk bot commented Dec 2, 2024

@liach The following labels will be automatically applied to this pull request:

  • build
  • core-libs
  • hotspot-jfr

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added build build-dev@openjdk.org core-libs core-libs-dev@openjdk.org hotspot-jfr hotspot-jfr-dev@openjdk.org labels Dec 2, 2024
@liach liach changed the title 8345321: Hide java.lang.classfile.components package to implementation 8345343: Hide java.lang.classfile.components package to implementation Dec 2, 2024
@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Dec 2, 2024
@liach liach marked this pull request as ready for review December 3, 2024 02:04
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 3, 2024
@mlbridge
Copy link

mlbridge bot commented Dec 3, 2024

Webrevs

Copy link
Member

@asotona asotona left a comment

Choose a reason for hiding this comment

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

I don't see a clear reason for this drastic last-minute change.

@asotona
Copy link
Member

asotona commented Dec 3, 2024

java.lang.classfile.components.ClassPrinter received significant positive feedback in the recent years, it became an essential debugging and logging tool.
java.lang.classfile.components.ClassRemapper has been designed based on user requests, it received positive feedback in the recent years and it is an essential component for class instrumentation.
java.lang.classfile.components.CodeLocalsShifter and java.lang.classfile.components.CodeRelabeler are essential components for class instrumentation and other advanced transformations, they have been designed based on the feedback from JFR class instrumentation conversion from ASM to Class-File API.
java.lang.classfile.components.CodeStackTracker has been designed as standalone component (out of the core Class-File API) for performance reasons. It has been strongly requested by users and it has been applied in a prototype of javac using Class-File API to generate classes.

There is no real justification for this change and I suggest to close it.

@liach
Copy link
Member Author

liach commented Dec 3, 2024

After offline discussion, we decide to stick to continued preview status to facilitate adoption. #22501

@liach liach closed this Dec 3, 2024
@liach
Copy link
Member Author

liach commented Dec 3, 2024

After further studies, due to JEP process restrictions, hiding is the only choice at this point. Reopening.

@liach liach reopened this Dec 3, 2024
@liach liach closed this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org core-libs core-libs-dev@openjdk.org csr Pull request needs approved CSR before integration hotspot-jfr hotspot-jfr-dev@openjdk.org rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

2 participants