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

feat(stdlib): add unicode/utf16 pacakge #1764

Merged
merged 3 commits into from
Mar 29, 2024
Merged

Conversation

notJoon
Copy link
Member

@notJoon notJoon commented Mar 13, 2024

Description

  • Add unicode/utf16 package. transffered directly from Go without any changes.
  • register to the stdlibWhitelist transpiler.go

In an earlier JSON PR #1415 , I included this unicode/utf16 to handle unescaping and other byte slice operations, but realized that I wasn't using it in that package, leading me to submit a separate PR sepcifically for this.

@notJoon notJoon requested review from jaekwon, thehowl and a team as code owners March 13, 2024 08:19
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Mar 13, 2024
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.79%. Comparing base (7596f42) to head (541cb24).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1764      +/-   ##
==========================================
- Coverage   44.79%   44.79%   -0.01%     
==========================================
  Files         459      459              
  Lines       67642    67642              
==========================================
- Hits        30300    30297       -3     
- Misses      34808    34809       +1     
- Partials     2534     2536       +2     

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

Copy link
Contributor

@deelawn deelawn left a comment

Choose a reason for hiding this comment

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

Looks good but I'd strongly recommend removing the export_test.gno file and changing the package to utf16_test in utf16_test.gno. This is for a couple of reasons:

  • It makes the test file's "unicode/utf16" import meaningful
  • It separates testing code from the package code, ensuring that we are testing the same API users are interacting with.

This will require the package prefix to be added to the tests, but that's fine. The only reason the go stdlib tests for this package don't have that is because they use the dot import, something gno does not support.

@notJoon
Copy link
Member Author

notJoon commented Mar 21, 2024

Looks good but I'd strongly recommend removing the export_test.gno file and changing the package to utf16_test in utf16_test.gno. This is for a couple of reasons:

I thought it was customary to include export_test since it was in other packages, but I will modify this part. Thank you 👍

Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Looks good 💯

@zivkovicmilos zivkovicmilos merged commit 1bc60fa into gnolang:master Mar 29, 2024
192 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants