Skip to content

Conversation

liach
Copy link
Member

@liach liach commented May 17, 2024

Core reflection's generic signature parsing uses an ancient library with outdated visitor pattern on a tree model and contains unnecessary boilerplates. This is a duplication of ClassFile API's signature model. We should just move to ClassFile API, which is more throughoutly tested as well.

To ensure compatibility, new tests are added to ensure consistent behavior when encountering malformed signatures or signatures with missing types. The reflective objects have been preserved and the only change is that lazy expansion now happens from CF objects, to reduce compatibility risks.


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

Issue

  • JDK-8333377: Migrate Generic Signature parsing to ClassFile API (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19281

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 17, 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 May 17, 2024

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

@openjdk
Copy link

openjdk bot commented May 17, 2024

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

  • core-libs

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

@openjdk
Copy link

openjdk bot commented May 31, 2024

⚠️ @liach This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@liach liach changed the title Move core reflection Signature tree parsing to ClassFile API 8333377: Migrate Generic Signature parsing to ClassFile API May 31, 2024
@liach liach marked this pull request as ready for review May 31, 2024 22:25
@openjdk openjdk bot added the rfr Pull request is ready for review label May 31, 2024
@mlbridge
Copy link

mlbridge bot commented May 31, 2024

Webrevs

@jddarcy
Copy link
Member

jddarcy commented May 31, 2024

I think I'll need to be one of the reviews on this, but don't anticipate being able to review it before JDK 23 rampdown. Therefore, I think this would be appropriate to be targeted to JDK 24.

@liach
Copy link
Member Author

liach commented Jun 1, 2024

Indeed, I put the JBS issue to target release 24. I believe given the potential behavioral changes, rushing into release 23 is a risky choice. (the 4 new tests can target 23 in a separate patch, but they require removal of a few redundant assertions in old generic code)

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 4, 2024

@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@liach
Copy link
Member Author

liach commented Jul 4, 2024

Keep-alive.

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 1, 2024

@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 30, 2024

@liach This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Aug 30, 2024
@liach
Copy link
Member Author

liach commented Aug 30, 2024

/open

This is becoming more necessary as valhalla brings changes to signature format.

@openjdk openjdk bot reopened this Aug 30, 2024
@openjdk
Copy link

openjdk bot commented Aug 30, 2024

@liach This pull request is now open

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 23, 2024

@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

3 similar comments
@bridgekeeper
Copy link

bridgekeeper bot commented Oct 31, 2024

@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 31, 2024

@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 31, 2024

@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@openjdk
Copy link

openjdk bot commented Nov 18, 2024

@liach this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout feature/new-generic-info
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Nov 18, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Nov 28, 2024

@liach This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Nov 28, 2024
@liach liach force-pushed the feature/new-generic-info branch from 86b89e5 to dea7a23 Compare December 5, 2024 19:43
@openjdk
Copy link

openjdk bot commented Dec 5, 2024

@liach Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information.

@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Dec 5, 2024
@liach
Copy link
Member Author

liach commented Dec 6, 2024

Sorry for the force push - Too many commits meaning fixing merge conflicts in every single one of them was a bit complicated.

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 3, 2025

@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@liach
Copy link
Member Author

liach commented Jan 4, 2025

Keep alive. One day there will be a reviewer...

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 1, 2025

@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@liach
Copy link
Member Author

liach commented Feb 25, 2025

After a revisit to this PR, I think I might split the work of improving BytecodeDescriptor error message and tests covering failure-case behaviors into a prerequisite PR to this one, to ensure this PR preserves the failure behavior present on mainline.

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 26, 2025

@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 23, 2025

@liach This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@bridgekeeper bridgekeeper bot closed this Apr 23, 2025
@liach
Copy link
Member Author

liach commented Apr 23, 2025

/open

@openjdk openjdk bot reopened this Apr 23, 2025
@openjdk
Copy link

openjdk bot commented Apr 23, 2025

@liach This pull request is now open

Choose a reason for hiding this comment

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

Given that this basically rewrites most of sun.reflect.generics.*, I feel like it might be better to just move these new files to jdk.internal.reflect.generics.*.

Copy link
Member Author

@liach liach Apr 23, 2025

Choose a reason for hiding this comment

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

We should, in fact, remove as much legacy sun packages as possible - for the particular package name choice, I think jdk.internal.reflect.type might be better, as we are really reflecting on language types. But I think that effort will get its own ticket.

@bridgekeeper
Copy link

bridgekeeper bot commented May 21, 2025

@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 19, 2025

@liach This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.

@liach
Copy link
Member Author

liach commented Aug 27, 2025

/open

@openjdk openjdk bot reopened this Aug 27, 2025
@openjdk
Copy link

openjdk bot commented Aug 27, 2025

@liach This pull request is now open

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 24, 2025

@liach This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@ExE-Boss
Copy link

ExE-Boss commented Sep 24, 2025

Refs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

3 participants