-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8346986: Remove ASM from java.base #22946
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back asotona! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
Moving it to test/hotspot/jtreg is initially surprising, I assumed it would move to test/lib. Did you choose the hotspot tree as only tests in hotspot/jtreg use it and you didn't want to add or change the @library tag on these tests? The other thing is the package name, maybe it should move back to org.objectweb.asm as it won't be a JDK internal package. |
I've decided to move it under hotspot/jtreg test root as all other tests have been already converted to Class-File API and there is no other consumer of the library outside of the hotspot/jtreg test root. Despite the 265 modified files is this PR trying to be minimalistic. Repackaging of the library would be far more complex and would affect significantly more files, including the library itself. I would recommend to invest that effort into the tests conversion into Class-File API instead. |
/label add hotspot |
@dholmes-ora |
Test libraries belong in test/lib even if only hotspot is using this one IMO. I'd like to hear @lmesnik 's opinion on this. Also how is this library being built for the tests to use? If relying on jtreg facilities we will likely hit the known problems that jtreg has in this area - and this library would seem a good candidate for the proposal to prebuild some test libraries when the test image is built. |
I also agree with @AlanBateman about the package name. It is not appropriate for anything outside the platform modules to claim to be part of |
I think it is make sense to put ASM into hotspot testlibrary if there are no any other users. So it is clear that non-hotspot tests don't depend on it. Before renaming packages, I would like to understand if we can move to standard ASM? We are no planning to develop new tests and maintain this library for newer releases. Otherwise, keeping jdk.internal simplify backporting changes. It is not possible to implement it as a precompiled library because of jtreg limitations to find jars in test-images. So I'll implement this later. |
I agree with @lmesnik that any unnecessary repackaging would affect backporting compatibility (>1200 unnecessary changes across >250 source files causing potential conflicts). My question to test/hotspot/jtreg/testlibrary - is it effective to mix existing testlibrary with ASM. From the hotspot tests I see not all tests requiring testlibrary need ASM and vice versa. And many tests include other test libraries. However maybe it is irrelevant. BTW: purpose of this PR is to seamlessly remove ASM from java.base and it is slightly turning into a massive synchronous refactoring of several hundreds of hotspot tests. |
I'm not suggesting any re-packaging or pre-packaging, just saying that you can revert the changes that we have in the jdk repo so it goes back to .org.objectweb.asm. If we aren't doing that then okay but we still need to change all the tests that use it to remove "@modules java.base/jdk.internal.org.objectweb.asm". |
That represents a refactoring with >1200 changes in >250 files across multiple repositories. I can do it as it is not technically complex however is it desired? |
There's nothing to prohibit this, it's just surprising to have classes in jdk.internal.obj.objectweb.asm in an unnamed module, it will work of course. |
/testlibrary consists of 3 independent sub-libraries: ctw, jittester & jvmti |
@lmesnik Unknown command |
There are no more consumers of ASM library except for hotspot tests.
This patch moves ASM library from java.base module to the hotspot test libraries location and fixes the tests.
Please review.
Thanks,
Adam
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22946/head:pull/22946
$ git checkout pull/22946
Update a local copy of the PR:
$ git checkout pull/22946
$ git pull https://git.openjdk.org/jdk.git pull/22946/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22946
View PR using the GUI difftool:
$ git pr show -t 22946
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22946.diff
Using Webrev
Link to Webrev Comment