Skip to content

Conversation

@thomasvl
Copy link
Collaborator

@thomasvl thomasvl commented May 9, 2025

No description provided.

@thomasvl thomasvl force-pushed the textformat_reserved branch 3 times, most recently from c9d6a12 to a1e486d Compare May 12, 2025 14:43
@thomasvl thomasvl added the 🆕 semver/minor Adds new public API. label May 12, 2025
@thomasvl
Copy link
Collaborator Author

Ok, this should be good to go. I've broken it down into a sequence of commits to try and make review easier so you can skip some of the generation related ones that otherwise would pretty noisy.

@thomasvl thomasvl requested review from Lukasa, allevato, gjcairo and tbkka May 12, 2025 15:00
@thomasvl
Copy link
Collaborator Author

Also did the trick of sorting/merging ranges that are connecting that we do for extensions. I don't think it's worth exploiting this in the skip case since it won't be common, mostly doing this because it could make the generated data smaller since it means we can merge the ranges.

@thomasvl thomasvl marked this pull request as ready for review May 12, 2025 17:23
@thomasvl thomasvl force-pushed the textformat_reserved branch 2 times, most recently from c4adb65 to 146e690 Compare May 12, 2025 17:25
@thomasvl
Copy link
Collaborator Author

Fixes #1771

@thomasvl thomasvl force-pushed the textformat_reserved branch from 146e690 to 149e38a Compare May 13, 2025 18:54
@thomasvl
Copy link
Collaborator Author

@tbkka any chance you can take a look since most of the TextFormat support and _NameMap code goes back to what you wrote?

thomasvl added 8 commits May 14, 2025 14:31
The spec calls for this, so just building out the matching support.

- Update `_NameMap` to track reserved numbers and names and check if a value is
  reserved.
- Update `TextFormatScanner` to skip reserved numbers/names.
Also clear `text_format_failure_list_swift.txt` as the tests now pass with the
additional data.
Factor the code out of the extension range code so it can be used also for the
reserved fields.

This won't really make an performance difference, but by merging them the
generate data could end up being smaller.
Extend the test file to so it also has things to be merged.
@thomasvl thomasvl force-pushed the textformat_reserved branch from 149e38a to 1b47f44 Compare May 14, 2025 18:38
@thomasvl
Copy link
Collaborator Author

thomasvl commented May 14, 2025

fyi - rebased over the CL updating the Swift min version.

@thomasvl
Copy link
Collaborator Author

@tbkka was that thumbs up a looks good or an i'll try to look?

@thomasvl thomasvl requested a review from gjcairo May 16, 2025 14:16
@thomasvl thomasvl merged commit 60153e3 into apple:main May 16, 2025
12 checks passed
@thomasvl thomasvl deleted the textformat_reserved branch August 15, 2025 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants