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 Prettify API and Improve Build Scripts #7

Merged
merged 4 commits into from
Apr 5, 2024

Conversation

ThisaruGuruge
Copy link
Member

Purpose

Fixes: #6286
Fixes: https://github.com/wso2-enterprise/internal-support-ballerina/issues/632

Examples

N/A

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec
  • Checked native-image compatibility

hasithaa
hasithaa previously approved these changes Apr 4, 2024
@hasithaa
Copy link
Contributor

hasithaa commented Apr 4, 2024

@ThisaruGuruge there is a conflict.

@ThisaruGuruge
Copy link
Member Author

@ThisaruGuruge there is a conflict.

Fixed now.

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.54%. Comparing base (718526f) to head (c7bbf73).
Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main       #7      +/-   ##
============================================
+ Coverage     76.80%   77.54%   +0.73%     
- Complexity      235      286      +51     
============================================
  Files            18       24       +6     
  Lines          1453     1692     +239     
  Branches        272      338      +66     
============================================
+ Hits           1116     1312     +196     
- Misses          235      256      +21     
- Partials        102      124      +22     

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

@prakanth97
Copy link
Contributor

prakanth97 commented Apr 4, 2024

@ThisaruGuruge you have added io, os and file as dependencies, which means this library belongs to level 4 right? or are these only used for tests. I have to add this to the ballerina-distribution.

@ThisaruGuruge
Copy link
Member Author

@ThisaruGuruge you have added io, os and file as dependencies, which means this library belongs to level 4 right? or are these only used for tests. I have to add this to the ballerina-distribution.

Even though they are test-only dependencies, we need them to be built after the io, os, and file modules since we create an intermediate pack for testing. The dependency graph resolver will be resolving these accordingly. When adding to the distribution, let's add it under level 4.

string result = string `${initialIndentation}{`;
boolean isEmptyMap = value.keys().length() == 0;
if !isEmptyMap {
result += "\n";
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding \n to the string may cause failures in windows, isn't it?

Copy link
Member Author

@ThisaruGuruge ThisaruGuruge Apr 5, 2024

Choose a reason for hiding this comment

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

Windows tests are passing in the PR build. Is there a recommended way to handle this?

ballerina/utils.bal Outdated Show resolved Hide resolved
@hasithaa hasithaa merged commit d68b752 into ballerina-platform:main Apr 5, 2024
6 of 7 checks passed
@ThisaruGuruge ThisaruGuruge deleted the prettify branch April 5, 2024 06:22
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.

Include Prettify API to the JSON Module
4 participants