-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8334733: Remove obsolete @enablePreview from tests after JDK-8334714 #22420
Conversation
👋 Welcome back liach! A progress list of the required criteria for merging this PR into |
@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:
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 9 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
@liach The following labels will be automatically applied to this pull request:
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. |
I would give a go to all trivial removals of |
I think the simple removal of |
@liach this pull request can not be integrated into git checkout cleanup/cf-preview
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks okay to me except ParameterAnnotations.java
. This task is part of JEP 484 and test-only. It seems good to backport to 24.
@@ -641,8 +640,8 @@ private void doTest(Path base, String code, String binaryNameToCheck, | |||
} | |||
|
|||
Task.Result result = new JavacTask(tb) | |||
.processors(new TestAP()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this fix does not require this change, right? If so, better to keep the original code and do this cleanup as a separate issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is required. If we use the command line and FQN to specify a processor like in the current code without preview, this test fails with some classpath error.
Weird annotation processor behavior in test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java
Without preview and using explicit file name, the javac task fails; using the builder live AP object works both with and without preview.
I should attach the exact error message:
test: testInnerClass
[DIRECT]:
- compiler.err.proc.processor.not.found: ParameterAnnotations$TestAP
- compiler.err.proc.no.explicit.annotation.processing.requested: T$I
2 errors
Exception running test testInnerClass: toolbox.Task$TaskError: Task javac failed: rc=1
toolbox.Task$TaskError: Task javac failed: rc=1
at toolbox.AbstractTask.checkExit(AbstractTask.java:154)
at toolbox.JavacTask.run(JavacTask.java:381)
at toolbox.AbstractTask.run(AbstractTask.java:102)
at toolbox.JavacTask.run(JavacTask.java:52)
at toolbox.JavacTask.run(JavacTask.java:321)
at ParameterAnnotations.doTest(ParameterAnnotations.java:650)
at ParameterAnnotations.testInnerClass(ParameterAnnotations.java:151)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at toolbox.TestRunner.runTests(TestRunner.java:91)
at ParameterAnnotations.runTests(ParameterAnnotations.java:82)
at ParameterAnnotations.main(ParameterAnnotations.java:73)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
at java.base/java.lang.Thread.run(Thread.java:1447)
Same for all 5 tests in this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed https://bugs.openjdk.org/browse/JDK-8345622. There is no similar issues that happen as a conjunction of preview and annotation processing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for filing the issue to follow up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks.
Thanks for the reviews! /integrate |
Going to push as commit 4966419.
Your commit was automatically rebased without conflicts. |
/backport :jdk24 From internal discussion, this task is logically associated with the finalization of ClassFile API and is best done for the same release 24. |
@liach the backport was successfully created on the branch backport-liach-49664195-jdk24 in my personal fork of openjdk/jdk. To create a pull request with this backport targeting openjdk/jdk:jdk24, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk:
|
Remove the redundant
@enablePreview
and--enable-preview
flags for enabling ClassFile API in the tests. The remainder of these flags in all tests seem to serve preview APIs (such as ScopedValue) or language features (primitive pattern, module imports, etc.), or testing the enable preview flag itself. Now there is fewer than 100@enablePreview
in thetest
directory.To reviewers, there are some redundant changes and notes:
There's one security test that used
ModuleInfoWriter
that depends on ClassFile API.Removed unnecessary exports of
jdk.internal.classfile.impl
. Remaining uses are:BoundAttribute::payloadLen
for javac attribute testsLine number changes to:
Move from legacy jdk.internal.classfile to java.lang.classfile in:
Weird annotation processor behavior in test/langtools/tools/javac/annotations/parameter/ParameterAnnotations.java
Testing: tier 1-5. Please inform me if any of these tests belong to higher tiers.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22420/head:pull/22420
$ git checkout pull/22420
Update a local copy of the PR:
$ git checkout pull/22420
$ git pull https://git.openjdk.org/jdk.git pull/22420/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22420
View PR using the GUI difftool:
$ git pr show -t 22420
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22420.diff
Using Webrev
Link to Webrev Comment