-
-
Notifications
You must be signed in to change notification settings - Fork 442
Error in running the zerocode tests in JDK23/21 #704 #713
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
Error in running the zerocode tests in JDK23/21 #704 #713
Conversation
|
Hello Both @rkampani and @thanasissot, This should allow you the trigger builds, review/approve other's PRs etc much more things. 👍 |
dd30856 to
e6d901c
Compare
|
@authorjapps : Here are changes that are addressed in the PR
if you notice anything that doesn't quite align with the requirements or could potentially introduce issues, please feel free to suggest improvements. If needed, or we can also consider closing it. and If there’s anything I’ve missed or any changes that might lead to issues, I’d really appreciate your feedback and suggestions. |
|
Hello @rkampani , can you please resolve the conflicts as shown above ?
|
329f503 to
f455ef0
Compare
javiertuya
left a comment
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 @rkampani, great job. I'm happy with the code changes, but:
- I was curious about the need to run the tests under Java 11 and tested it under Java 8. All tests passed.
- Then, I tested it with Java 21 and tests failed.
- You can check this in a temporary project: javiertuya/pr713-zerocode, its main branch contains a copy of this PR's branch. Actions have two runs: (3) with java 8 passes and (4) with java 21 does not pass
|
@javiertuya: Yes, the tests would failed—based on my understanding, we should consider fully migrating to JPMS. Our test library makes extensive use of reflection, and with JDK 9+ introducing stricter module boundaries, we're encountering class accessibility issues. To address this, we’ll likely need to integrate the In addition, we should update the I’m happy to take this forward, but wanted to check if there's already a plan in place to move to a newer JDK. and Since many corporate environments are still using JDK 8, I'm not sure whether upgrading the compiler to JDK 21 might have any unintended impacts. By the way, I’ve pushed the changes that should work with runtime JDK 21 or 24. However, I added the following entry in the This was done to ensure the modules remain compatible with JDK 8 during compilation. In my opinion, this is more of a temporary workaround until we fully migrate to a higher JDK version, at which point there should be no runtime incompatibilities. @javiertuya : pls re-review and let me know your thoughts. |
|
@rkampani I have checked with all LTS versions here: https://github.com/javiertuya/zerocode/tree/java-matrix. This adds to the workflow: a matrix for testing all versions, You can check the results in the actions log, the last build is here: https://github.com/javiertuya/zerocode/actions/runs/15005394050
Note:
|
|
@rkampani I repeated the tests in the above comment. Now, I removed the
The result summary is:
This is my suggestion to finish this PR:
@authorjapps @nirmalchandra @rkampani What are your thoughts on this? |
407deb3 to
812dcce
Compare
|
@javiertuya : Thank you for the feedback! I've updated the PR based on your review comments. I appreciate all the suggestions and the effort you put into running the build and validating it across different Java versions. Please take another look when you get a chance and let me know your thoughts. Thanks again! With the above changes, CI stats Looks Green 🟢 .
Stats:
|
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 @rkampani. I think this is ready to merge after resolving a few comments.
I've updated the PR description and filled the checklist
@authorjapps Can I merge it or do we need more feedback?
|
Hi @javiertuya, @rkampani , Many thanks for looking into this and fixing this. Please give me sometime(couple of days) to test this in my machine using Java21/23. I will let you know the feedback asap. (I am aware, I will have to clone the PR branch) |
|
|
Hello @mailtoach79 , Thanks for picking it up from here. Please let us know how it went:
i.e.
Also, if you need any help or get stuck during the testing, feel free to give a shout here. Cheers! |
|
@rkampani Test validated using Java 23, and its successfull in running Kafka test in intellij. But from the normal terminal, where I have JDK 21 configured, Then I ran the test using its showing something related to 1.8, which is bit confusing and test is successful. Anyway I'm unblocked now, tests working fine using Java 23 successfully 🟢 in local. so I am not sure about the above outputs , does it really matter to me or not. Thanks for your support. plesae let me know if anything you want me to chang and run again. |
|
@mailtoach79 : Thank you for the validation. imho, Yes, these warnings can be safely ignored for now, as:
The warnings are simply a heads-up that Java 8 compatibility mode (-source 8 and -target 8) is deprecated and may eventually be removed in future Java versions. If the warnings are bothersome, we could configure the Maven Compiler Plugin to suppress them while still maintaining Java 8 compatibility. That said, I’d prefer to let the team @authorjapps / @javiertuya weigh in on whether we should do that. Personally, I think it’s a helpful reminder that we’ll need to upgrade at some point in the future. |
|
Thanks to:
Please go ahead and merge this when you get a chance 👍 Next Step >>
|


Fixes Issue
PR Branch
#ADD LINK TO THE PR BRANCH
Motivation and Context
Zerocode generates a Java 8 Jar, but issues when running under higher JDKs have been detected. This PR addresses this:
Checklist:
New Unit tests were added
Integration tests were added
Test names are meaningful
Feature manually tested and outcome is successful
PR doesn't break any of the earlier features for end users
Branch build passed in CI (tested with Java 8, 11, 17, 21)
No 'package.*' in the imports
Relevant DOcumentation page added or updated with clear instructions and examples for the end user
Http test added to
http-testingmodule(if applicable) ?Kafka test added to
kafka-testingmodule(if applicable) ?