-
Notifications
You must be signed in to change notification settings - Fork 801
[Master] Typedesc class names are different for subsequent compilations #44421
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
Conversation
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.
Pull request overview
This PR fixes an issue where typedesc class names were inconsistent across subsequent compilations, causing intermittent NoClassDefFoundError exceptions. The root cause was that counter variables used to generate unique names for desugared constructs were not being reset between compilations.
Key changes:
- Added counter resets in
clearGlobalVariables()method to ensure consistent naming across compilations - Removed unused constant
ERROR_REASON_NULL_REFERENCE_ERRORand methodresetSkipFailStmtRewrite()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/desugar/Desugar.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-lang/src/main/java/org/wso2/ballerinalang/compiler/desugar/Desugar.java
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #44421 +/- ##
=========================================
Coverage 75.03% 75.03%
- Complexity 58624 58626 +2
=========================================
Files 3600 3600
Lines 226760 226768 +8
Branches 29518 29518
=========================================
+ Hits 170145 170152 +7
- Misses 47135 47136 +1
Partials 9480 9480 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Purpose
Typedesc class names are different for subsequent compilations. Because of this, it gives
NoClassDefFoundErrorintermittently when compiling https://github.com/isuruh15/solutions-healthcare-demos/tree/bal-issue/use-cases/patient-admit-hl7v2/hl7v2-fhir-integrationFixes #44420