-
Notifications
You must be signed in to change notification settings - Fork 4
Allow excluding of JDK signature checking in Jakarta EE Platform TCK testing #2
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
Allow excluding of JDK signature checking in Jakarta EE Platform TCK testing #2
Conversation
How could/should classes ClassCorrector + ThrowsNormalizer be passed the JDK classes to exclude? Updated: Should we add a JDKExclude interface to represent the set of JDK packages/classes to be ignored by SignatureTest? Updated: Should the JDKExclude instance be passed to {MemberCollectionBuilder, ClassCorrector, ThrowsNormalizer} for access to the JDK packages/classes to be ignored? |
I only updated a few classes to ignore JDK classes based on the actual test failures I saw during Jakarta EE TCK testing but there are likely other classes that also could/should ignore JDK packages/classes. |
Also note that I didn't regenerate the signature map files as we shouldn't need to actually exclude JDK references from signature map files as they are still needed there (e.g. SPEC API using java.util.Map should be verified by the class name reference). |
550dfe4
to
733b265
Compare
src/main/java/com/sun/tdk/signaturetest/core/MemberCollectionBuilder.java
Outdated
Show resolved
Hide resolved
Thank you guys for using and contributing to NetBeans project has noticed similar issues as well. A signature file generated on JDK8 differs from one generated with JDK11, etc. It is causing problems and I agree it deserves a fix. Rather than excluding JDK classes, I'd prefer to use Would such approach work for you? If so, I'll try to investigate what it would take to use |
Thank you for the warm welcome! :-)
Copy of some text https://openjdk.java.net/jeps/247 on
I know little about the
One problem is that currently the Jakarta EE Platform produced TCKs contain JDK specific signature map files (been this way for a long time). The problem is that we are just now releasing Jakarta EE 9.1 (final release target of mid May but we are trying to finish development now). Our EE 9.1 release has JDK 8 + JDK 11 signature map files but we also want to support later JDK versions (assuming the JDK works in a compatible way). With the current approach, we are able to pass the TCK signature testing on JDK 8, 11, 16, 17 with just using the base Java SE 8 signature map files.
If I understand correctly, when new JDK versions are released, the existing Internally,
+1 for this new |
Ahh, looks like the |
This comment is just to note my rough understanding of the ct.sym idea, in case I'm wrong. It sounds promising.
[1] Note the the adopt-openjdk JRE dists don't include a lib/ct.sym, which makes sense as they are not meant for compilation use cases. This does mean sig tests that rely on this approach would require use of a JDK, but Scott tells me the Jakarta EE TCK already has that requirement. |
…hanges Signed-off-by: Scott Marlow <[email protected]>
…hanges Signed-off-by: Scott Marlow <[email protected]>
…st tool that doesn't include JDK signatures, includes latest from jtulach/netbeans-apitest#2, add -IgnoreJDKClass option for specifying JDK classes to ignore Signed-off-by: Scott Marlow <[email protected]>
Signed-off-by: Scott Marlow <[email protected]>
61d09e9
to
a3bb665
Compare
…st tool that doesn't include JDK signatures, includes latest from jtulach/netbeans-apitest#2, add -IgnoreJDKClass option for specifying JDK classes to ignore Signed-off-by: Scott Marlow <[email protected]>
@jtulach Would it be possible to have a release soon that includes this PR? Are there any further concerns about this PR? Thanks, |
Yes, once the above concerns are addressed. Btw. consider checking if #3 works for you. If so, you don't need to bother with the testing and documentation. I'll do it. Reviews of #3 welcomed! |
@@ -374,7 +383,8 @@ private boolean parseParameters(String[] args) { | |||
parser.addOption(UPDATE_FILE_OPTION, OptionInfo.option(1), optionsDecoder); | |||
parser.addOption(MODE_OPTION, OptionInfo.option(1), optionsDecoder); | |||
parser.addOption(ALLPUBLIC_OPTION, OptionInfo.optionalFlag(), optionsDecoder); | |||
|
|||
parser.addOption(EXCLUDE_JDK_CLASS_OPTION, OptionInfo.optionVariableParams(1, OptionInfo.UNLIMITED), optionsDecoder); |
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.
This option influences only command line interface. Neither integration with Maven or Ant! Are you running your checks from command line only?
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.
This option influences only command line interface. Neither integration with Maven or Ant! Are you running your checks from command line only?
The Jakarta EE Platform TCK is tightly integrated with sigtest classes for running the signature tests via code like https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/signaturetest/SigTestDriver.java#L136
I'll give feedback on what I am seeing now with #3 on the pr.
I will work on describing the new functionality in README and update the pull request. I'm not yet really sure about the testing as I think two JDKs would be needed (e.g. JDK 8 for the base class and a later JDK).
As mentioned on #3, testing against a base JDK 8 signature with a test class that was loaded by an external classloader (WildFly appclient container) didn't work as the externally loaded test had @deprecated annotations that have additional fields. |
I thought the goal is to exclude some I am sad #3 isn't (yet) working for you. I'll try some other approach, but should #3 continue to not deliver on its promise. We need to integrate this PR in some form. |
Signed-off-by: Scott Marlow <[email protected]>
I'm getting a Which classes do I need to update to include the
done via new commit just pushed today.
I'll go ahead and create an Eclipse CQ request to include this netbeans-apitest in the final changes we make by Thursday for including this change for the Jakarta EE 9.1 release. I'm just mentioning this so you are aware. If we don't complete this pr for EE 9.1, there will be other Jakarta EE releases in the future. |
👍 |
Part of 1.4 release. |
Thank you @jtulach! |
…st tool that doesn't include JDK signatures, includes latest from jtulach/netbeans-apitest#2, add -IgnoreJDKClass option for specifying JDK classes to ignore Signed-off-by: Scott Marlow <[email protected]>
…st tool that doesn't include JDK signatures, includes latest from jtulach/netbeans-apitest#2, add -IgnoreJDKClass option for specifying JDK classes to ignore Signed-off-by: Scott Marlow <[email protected]>
…st tool that doesn't include JDK signatures, includes latest from jtulach/netbeans-apitest#2, add -IgnoreJDKClass option for specifying JDK classes to ignore Signed-off-by: Scott Marlow <[email protected]>
…st tool that doesn't include JDK signatures, includes latest from jtulach/netbeans-apitest#2, add -IgnoreJDKClass option for specifying JDK classes to ignore Signed-off-by: Scott Marlow <[email protected]>
…'t include JDK signatures, includes latest from jtulach/netbeans-apitest#2, add -IgnoreJDKClass option for specifying JDK classes to ignore Signed-off-by: Scott Marlow <[email protected]>
First pass of addressing jakartaee/platform-tck#156, especially this part mentioned in the description:
I am testing changes on https://github.com/scottmarlow/jakartaee-tck/tree/sigtest_netbeans-script-part2 to pass the Jakarta EE Platform TCK signature tests on JDK11 + JDK16 (with WildFly). One of the changes that I made in the
sigtest_netbeans-script-part2
branch is to remove the JDK11 signature map files and only use the JDK8 signature map files for JDK11+ testing.https://ci.eclipse.org/jakartaee-tck/job/jakartaee-tck-scottmarlow/job/sigtest_netbeans-script-part2/2 is building now and will test my local build of
netbeans-apitest
with the JDK11 version of GlassFish.I am going to experiment more to see if I can eliminate the ClassCorrector + ThrowsNormalizer changes. I would prefer to limit changes to SignatureTest and would like to pass the list of JDK packages/classes to exclude as parameters.
I'm almost out of time to make these changes for Jakarta EE 9.1 (would like to finish by end of this week) but am seeing what can be accomplished.
Suggestions or alternatives are welcome.