-
Notifications
You must be signed in to change notification settings - Fork 848
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
Java 17 Support with Sigtest 2.2 from JakartaEE TCK Tools #7117
Java 17 Support with Sigtest 2.2 from JakartaEE TCK Tools #7117
Conversation
Well, this version seems to fail on The old tool does something somehow not match any package with the following patterns The new version does. Unfortunately Adding I'm out of ideas here. @jtulach ? |
Not sure if it helps, but I think this causes the "error" in eclipse-ee4j/jakartaee-tck-tools@56e3e33 If I read the summary of the commit correctly, before this commit recursive definitions like The commit was added between 1.5 and 1.6 and indeed using 1.5 I can run the sigtest generator in Channeling my bash deamons I came up with this list of modules that might be affected:
|
I think 1.4 was needed to build on jdk 11. As it was "working" did'nt think on upgrading. I'm always puzzled with sigtest as on jenkins we have issue In both case there are a bunch of java.lang.ClassFormatError: Index out of the constant pool bounds during sig phase. |
96ed3bc
to
7a90a0d
Compare
Well the last commit forces to use sigtest to generate signatures without recursion. That behavior was fixed in the commit mentioned above, so that commit is just keeping the same wrong way of doing the things as before. |
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 updating this dependency! Its interesting that it went full circle, I believe the jakarta lib is a fork of the netbeans fork - and we would use it now again ;)
tests are green, couldn't find any regressions while browsing through the log (the familiar java.lang.ClassFormatError: Index out of the constant pool bounds
traces are still there)
+1 from me, but someone who has more experience with the sig tests and public API requirements should take a look too.
@@ -17,3 +17,5 @@ | |||
|
|||
is.autoload=true | |||
release.external/deployment-api-1.2-rev-1.jar=modules/ext/jsr88javax.jar | |||
|
|||
sigtest.public.packages=javax.enterprise.deploy |
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 restricts the sig test to only the listed package prefix?
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.
Yes. That's the idea, as the recursive behavior was not working prior 1.6. They checked only the listed part of the package hierarchy. So adding these mimics the former behavior.
LGTM with my limited understanding |
Anyone, a word? I'm about to merge this one today or tomorrow, as #7024 is depending on this one. |
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 would not go down the sigtest.public.packages
property route. It is doomed to fail because in the future nobody will remember why on earth these broken declarations were made. In most cases I saw the packages would need to be declared as package.**
(i.e. cover all subpackages) and then the original errors reappear.
I wrote it inline already and would suggest to recreate the sigfile where it works and where not disable sigtest with a comment explaining why it is deactivated.
@@ -20,3 +20,5 @@ javac.source=1.8 | |||
release.external/javax.faces-2.3.9.jar=modules/ext/jsf-2_2/javax.faces.jar | |||
release.external/javax.faces-2.3.9-license.txt=modules/ext/jsf-2_2/license.txt | |||
spec.version.base=1.57.0 | |||
|
|||
sigtest.public.packages=javax.faces,com.sun.faces |
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 think you are looking for sigtest.public.packages=javax.faces.**,com.sun.faces.**
(the API is declared base on the subpackages
element).
This needs a deeper look. For example Groovy is being looked for because there is com.sun.faces.scripting.groovy.GroovyHelperImpl
. The API declaration of this module is ugly/lazy/wrong.
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.
Strangely, this did not occur to me.
Though I think these definitions web.jsf*
are there for providing libraries to Ant based projects. So technically they should not provide any public api to any NB modules. Also JSF 1.2 is soon 18 years old. Probably it would be better not to include the jars in NB.
web.jsf20 hide JSF 2.3 we seem to be built our JSF support on that.
I'm going to file separate PR-s to remove the JSF 1.2 libraries.
@@ -20,3 +20,5 @@ javac.compilerargs=-Xlint -Xlint:-serial | |||
|
|||
release.external/osgi.core-8.0.0.jar=modules/ext/osgi.core-8.0.0.jar | |||
release.external/osgi.cmpn-7.0.0.jar=modules/ext/osgi.cmpn-7.0.0.jar | |||
|
|||
sigtest.public.packages=org.osgi,info.dmtree |
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.
Same reasoning as libs.gradle
. The approach might work for OSGI if all packages would be listed here and only packages with problematic references are excluded and commented acordingly.
@@ -38,3 +38,5 @@ release.external/jakarta.persistence-2.2.3.jar=modules/ext/eclipselink/jakarta.p | |||
release.build/jakarta.persistence-2.2.3-doc.zip=modules/ext/docs/jakarta.persistence-2.2.3-doc.zip | |||
|
|||
extra.module.files=modules/ext/docs/jakarta.persistence-2.2.3-doc.zip | |||
|
|||
sigtest.public.packages=org.eclipse,javax.persistence |
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.
Strange error here when generating signature file.
7a90a0d
to
4ec1ef3
Compare
@matthiasblaesing thanks for your feedback! |
4ec1ef3
to
48fec4e
Compare
would it make sense to open a meta issue afterwards which has a list of all mods where sig tests are turned off so that we can look that up when needed? |
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.
In general looks good. I don't agree with all comments, but not to problematic, I left a few inline suggestions.
|
||
# This is an very old library, the complete dependencies were never explored. | ||
# Since subpackage-s are working in new sigtest version, generation of the | ||
# signature file fails. Disabling that now. |
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.
Disabling is fine, the comment though does not match the reason (from my POV). The reported error is:
/home/matthias/src/netbeans/nbbuild/templates/projectized.xml:765:
java.lang.AssertionError: org.apache.lucene.search.CachingWrapperFilter$FilterCache<org.apache.lucene.search.DocIdSet>
at com.sun.tdk.signaturetest.loaders.BinaryClassDescrLoader.load(BinaryClassDescrLoader.java:225)
at com.sun.tdk.signaturetest.core.ClassHierarchyImpl.load(ClassHierarchyImpl.java:180)
at com.sun.tdk.signaturetest.core.ClassHierarchyImpl.getClassInfo(ClassHierarchyImpl.java:292)
at com.sun.tdk.signaturetest.core.ClassHierarchyImpl.isInterface(ClassHierarchyImpl.java:272)
at com.sun.tdk.signaturetest.core.ClassCorrector.fixType(ClassCorrector.java:315)
at com.sun.tdk.signaturetest.core.ClassCorrector.fixMethods(ClassCorrector.java:298)
So I would say this is the same as in other cases: sigtest fails to parse the API classes.
Disabled sigtest where it does not work, fixed signature files/dependencies where it does. Update enterprise/web.jsf20/nbproject/project.properties Update java/j2ee.eclipselink/nbproject/project.properties Co-authored-by: Matthias Bläsing <mblaesing@doppel-helix.eu>
57bc43c
to
a9489d5
Compare
I've tried to upgrade Sigtest to the latest available version 1.7, and that still fails on Java 17.
@mbien pionted out that there is a fork in JakartaEE TCK that could work. It did the job.
This is needed when a module is on Java 17 and exposes some API.