jdk icon indicating copy to clipboard operation
jdk copied to clipboard

8331855: Convert jdk.jdeps jdeprscan and jdeps to use the Classfile API

Open liach opened this issue 1 year ago • 5 comments

Summary of the changes:

  • Moved com.sun.tools.classfile.Dependency and Dependencies to jdeps; they are exclusively used by jdeps in sources, and they are not used in any tests too. This will ease the removal of com.sun.tools.classfile later.
  • A few visitor patterns have been rewritten with pattern matching, notably in:
    • CPEntries/CPSelector (removed)
    • Dependencies.BasicDependencyFinder.Visitor has been rewritten to use pattern matching to capture dependencies.
  • MethodSig and its tests have been removed in favor of MethodTypeDesc.
  • Otherwise, the changes are mostly mechanical replacements.

All tests in test/langtools/tools/jdeprscan and test/langtools/tools/jdeps pass.


Progress

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

Issue

  • JDK-8331855: Convert jdk.jdeps jdeprscan and jdeps to use the Classfile API (Sub-task - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19193

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

Using diff file

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

Webrev

Link to Webrev Comment

liach avatar May 11 '24 19:05 liach

:wave: 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.

bridgekeeper[bot] avatar May 11 '24 19:05 bridgekeeper[bot]

@liach 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:

8331855: Convert jdk.jdeps jdeprscan and jdeps to use the Classfile API

Reviewed-by: asotona

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 65 new commits pushed to the master branch:

  • 0b0445be2833286b4eace698b91a658de3e7608b: 8331724: Refactor j.l.constant implementation to internal package
  • d84a8fd8762fe9448e73d75ec9dc8c4876b1a709: 8332327: Return _methods_jmethod_ids field back in VMStructs
  • f1ce9b0ecce9b506f5bf7a66fcf03c93b9ae8fed: 8331557: Serial: Refactor SerialHeap::do_collection
  • 14198f502f0a721e479adc754a2c7d94b665fbe6: 8329653: JLILaunchTest fails on AIX after JDK-8329131
  • ae999eae7e61072ad964a43f622fa930ce1179f7: 8129418: JShell: better highlighting of errors in imports on demand
  • 6422efa3c7917525a879e80657ca4dcfb6d67514: 8332394: Add friendly output when @IR rule missing value
  • 9160ef8b9d9f2c87ca6df08d85dad4271085f0ac: 8332237: [nmt] Remove the need for ThreadStackTracker::track_as_vm()
  • 7c750fd95b83d0a93b0cce681dcfbbae1f220fdd: 8331746: Create a test to verify that the cmm id is not ignored
  • de57d4b2e0fe3add0ef09945b34ddd0b67bbfa2b: 8332257: Shenandoah: Move evacuation methods to implementation file
  • da9c23ace9bdf398d811a88ed137217dd3167231: 8325384: sun/security/ssl/SSLSessionImpl/ResumptionUpdateBoundValues.java failing intermittently when main thread is a virtual thread
  • ... and 55 more: https://git.openjdk.org/jdk/compare/32c7681cf310c87669c502c4a8b62a7fecc93360...master

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 (@asotona) 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[bot] avatar May 11 '24 19:05 openjdk[bot]

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

  • compiler
  • core-libs

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[bot] avatar May 11 '24 19:05 openjdk[bot]

Webrevs

mlbridge[bot] avatar May 11 '24 19:05 mlbridge[bot]

@asotona Requesting your review for this and the other test migration patch.

liach avatar May 13 '24 10:05 liach

Thanks for the review!

/integrate

liach avatar May 17 '24 11:05 liach

@liach Your change (at version be8c25b1175911e6c4c414ca30760abd3c198c1f) is now ready to be sponsored by a Committer.

openjdk[bot] avatar May 17 '24 11:05 openjdk[bot]

/sponsor

asotona avatar May 17 '24 12:05 asotona

Going to push as commit d4c2edf2c91a790874c80f1a7bea5bfd4f438bde. Since your change was applied there have been 67 commits pushed to the master branch:

  • beeffd4671649e5d8f9c96f0455ac90a82917234: 8332109: Convert remaining tests using com.sun.tools.classfile to ClassFile API
  • e0d1c4b38c7ad2dc67f3d14b0b179b313c85fc0a: 8321428: Deprecate for removal the package java.beans.beancontext
  • 0b0445be2833286b4eace698b91a658de3e7608b: 8331724: Refactor j.l.constant implementation to internal package
  • d84a8fd8762fe9448e73d75ec9dc8c4876b1a709: 8332327: Return _methods_jmethod_ids field back in VMStructs
  • f1ce9b0ecce9b506f5bf7a66fcf03c93b9ae8fed: 8331557: Serial: Refactor SerialHeap::do_collection
  • 14198f502f0a721e479adc754a2c7d94b665fbe6: 8329653: JLILaunchTest fails on AIX after JDK-8329131
  • ae999eae7e61072ad964a43f622fa930ce1179f7: 8129418: JShell: better highlighting of errors in imports on demand
  • 6422efa3c7917525a879e80657ca4dcfb6d67514: 8332394: Add friendly output when @IR rule missing value
  • 9160ef8b9d9f2c87ca6df08d85dad4271085f0ac: 8332237: [nmt] Remove the need for ThreadStackTracker::track_as_vm()
  • 7c750fd95b83d0a93b0cce681dcfbbae1f220fdd: 8331746: Create a test to verify that the cmm id is not ignored
  • ... and 57 more: https://git.openjdk.org/jdk/compare/32c7681cf310c87669c502c4a8b62a7fecc93360...master

Your commit was automatically rebased without conflicts.

openjdk[bot] avatar May 17 '24 12:05 openjdk[bot]

@asotona @liach Pushed as commit d4c2edf2c91a790874c80f1a7bea5bfd4f438bde.

:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

openjdk[bot] avatar May 17 '24 12:05 openjdk[bot]