Skip to content

Conversation

h-a-n-a
Copy link
Contributor

@h-a-n-a h-a-n-a commented Sep 19, 2025

Description:

Continue from #11085

This PR adds Wtf8Atom to represent unpaired surrogates (i.e. lone surrogates) in Rust.

BREAKING CHANGE:

Related issue (if exists):

Reimplemented a part of #10987

Copy link

changeset-bot bot commented Sep 19, 2025

🦋 Changeset detected

Latest commit: dc8df0a

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codspeed-hq bot commented Sep 19, 2025

CodSpeed Performance Report

Merging #11104 will not alter performance

Comparing h-a-n-a:hstr-wtf8 (dc8df0a) with main (7af1474)1

Summary

✅ 140 untouched

Footnotes

  1. No successful run was found on main (bdee12c) during the generation of this report, so 7af1474 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@h-a-n-a
Copy link
Contributor Author

h-a-n-a commented Sep 19, 2025

Binding test failed to the same reason as https://github.com/swc-project/swc/actions/runs/17853640640/job/50767647737

@h-a-n-a h-a-n-a marked this pull request as ready for review September 23, 2025 06:28
@h-a-n-a h-a-n-a requested a review from a team as a code owner September 23, 2025 06:28
@CPunisher CPunisher requested review from CPunisher and removed request for a team September 23, 2025 06:30
@h-a-n-a h-a-n-a changed the title feat(hstr): introduce Wtf8Atom feat(hstr): Introduce Wtf8Atom Sep 23, 2025
@CPunisher
Copy link
Member

I think you'd better move wtf8atom related code to an isolated mod

CPunisher
CPunisher previously approved these changes Sep 23, 2025
@h-a-n-a h-a-n-a marked this pull request as draft September 23, 2025 10:40
@kdy1
Copy link
Member

kdy1 commented Sep 23, 2025

Is it ready for a merge?

@h-a-n-a
Copy link
Contributor Author

h-a-n-a commented Sep 23, 2025

@kdy1 It's ready now. I've added a new commit to replace Wtf8::from_bytes with Wtf8::from_bytes_unchecked as from_bytes actually requires the byte slice being encoded as well-formed WTF-8.

@h-a-n-a h-a-n-a marked this pull request as ready for review September 23, 2025 11:26
CPunisher
CPunisher previously approved these changes Sep 23, 2025
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

@kdy1 kdy1 added this to the Planned milestone Sep 23, 2025
@kdy1 kdy1 enabled auto-merge (squash) September 23, 2025 15:22
@kdy1 kdy1 merged commit 8cfd47b into swc-project:main Sep 23, 2025
322 of 324 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants