Skip to content
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

Add name for readonly records in config schema generation #41914

Merged
merged 3 commits into from
Jan 9, 2024

Conversation

Dilhasha
Copy link
Contributor

Purpose

Fix failure when Config Generation fails to add the name of Readonly Records to the Config Schema.

Fixes #41906

Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

Copy link

codecov bot commented Dec 21, 2023

Codecov Report

Attention: 49 lines in your changes are missing coverage. Please review.

Comparison is base (612e44f) 76.69% compared to head (75df9ee) 76.69%.
Report is 143 commits behind head on master.

Files Patch % Lines
...ballerinalang/central/client/CentralAPIClient.java 25.53% 29 Missing and 6 partials ⚠️
...n/java/org/ballerinalang/central/client/Utils.java 60.00% 13 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #41914      +/-   ##
============================================
- Coverage     76.69%   76.69%   -0.01%     
- Complexity    52904    52976      +72     
============================================
  Files          2881     2883       +2     
  Lines        199397   199727     +330     
  Branches      25929    25980      +51     
============================================
+ Hits         152932   153185     +253     
- Misses        38016    38078      +62     
- Partials       8449     8464      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

typeNode.addProperty("name", bType.toString().trim());
// The tsymbol name is empty for anon intersection type created due to inferred readonly
if (!intersectionType.tsymbol.name.value.isEmpty()) {
typeNode.addProperty("name", intersectionType.tsymbol.toString().trim());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be tsymbol.name.value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tsymbol.name.value doesn't return the fully qualified name.

@Dilhasha Dilhasha requested a review from MaryamZi January 2, 2024 06:58
Copy link
Member

@MaryamZi MaryamZi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM.

@Dilhasha Dilhasha requested a review from MaryamZi January 8, 2024 04:48
@Dilhasha Dilhasha merged commit 16dfc3a into ballerina-platform:master Jan 9, 2024
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Config Generation fails to add the name of Readonly Records to the Config Schema
3 participants