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

Impl Serde for PackedPatternsV1 with packed-like human form #5620

Merged
merged 7 commits into from
Oct 1, 2024

Conversation

sffc
Copy link
Member

@sffc sffc commented Sep 30, 2024

Replaces #5592
Depends on #5621
Depends on #5622

This PR does not export impl Deserialize for PluralElements, which was going to prevent #5592 from landing. However, if we ever add plural packed patterns, we're going to need something like that.

(note on my coding velocity: this PR took me just over 3 hours to write, which I consider to be a lot of time for a serde impl. the previous PR took less than an hour.)

@sffc
Copy link
Member Author

sffc commented Sep 30, 2024

Review note: the last commit, 674c0b4, re-writes a lot of what I wrote in d679710. You may want to review both commits at the same time.

@sffc sffc requested review from robertbastian and removed request for zbraniecki September 30, 2024 21:01
@sffc
Copy link
Member Author

sffc commented Sep 30, 2024

I'll add @robertbastian as an optional reviewer since you were reviewer on the previous PR, or you can defer to @Manishearth.

Manishearth
Manishearth previously approved these changes Sep 30, 2024
Copy link
Member

@robertbastian robertbastian left a comment

Choose a reason for hiding this comment

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

Is there any context for this? I don't understand why you are spending 3h on a pretty serde impl on an unused type that does not affect testdata.

Copy link

dpulls bot commented Oct 1, 2024

🎉 All dependencies have been resolved !

@sffc sffc merged commit 6572ff9 into unicode-org:main Oct 1, 2024
28 checks passed
@sffc sffc deleted the serde-again branch October 1, 2024 18:44
@sffc
Copy link
Member Author

sffc commented Oct 1, 2024

Is there any context for this? I don't understand why you are spending 3h on a pretty serde impl on an unused type that does not affect testdata.

It will replace the thing currently called PackedSkeletonDataV1 but I can't switch it out until all the impls are landed.

@sffc
Copy link
Member Author

sffc commented Oct 1, 2024

I spent 3h on a pretty serde impl because my first attempt added API surface we didn't want to add, so I had to write a manual serde impl. It has been important for the datetime patterns to be human-readable in JSON, and they wouldn't have been human-readable if I had used the default human-readable serialization of the machine struct.

@robertbastian
Copy link
Member

It will replace the thing currently called PackedSkeletonDataV1 but I can't switch it out until all the impls are landed.

Can you link an issue?

Manishearth added a commit that referenced this pull request Oct 2, 2024
Caused by clash of #5620 and
#5601


<!--
Thank you for your pull request to ICU4X!

Reminder: try to use [Conventional
Comments](https://conventionalcomments.org/) to make comments clearer.

Please see
https://github.com/unicode-org/icu4x/blob/main/CONTRIBUTING.md for
general
information on contributing to ICU4X.
-->
@sffc
Copy link
Member Author

sffc commented Oct 8, 2024

It will replace the thing currently called PackedSkeletonDataV1 but I can't switch it out until all the impls are landed.

Can you link an issue?

It's done now. #5648

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.

3 participants