proto_merger: Keep reserved fields of deleted types in deleted_fields - #7208
Open
andrabivolaru wants to merge 2 commits into
Open
proto_merger: Keep reserved fields of deleted types in deleted_fields#7208andrabivolaru wants to merge 2 commits into
andrabivolaru wants to merge 2 commits into
Conversation
andrabivolaru
force-pushed
the
dev/andrabivolaru/fix-proto-merger-offsets
branch
2 times, most recently
from
August 26, 2026 08:08
0a08c2c to
1f611fd
Compare
dragosp95
approved these changes
Aug 26, 2026
BogdanLionte
approved these changes
Aug 27, 2026
andrabivolaru
added a commit
that referenced
this pull request
Aug 31, 2026
- Use std::unordered_set for known_enums, allowlisted_options, and deleted_type_names - Group parameters into MergeContext and FieldParams structs - Handle deleted_type_names in oneof merges and mark deleted oneof fields with deleted types as deprecated - Refactor ReservedUpstreamFieldWithDeletedTypeIsPlacedInDeletedFields to in-memory test setup - Add DeletedOneofFieldWithDeletedTypeIsMarkedDeprecated unit test
…#7208) - Handle reserved fields with deleted types by placing them in deleted_fields as deprecated - Use std::unordered_set for known_enums, allowlisted_options, and deleted_type_names - Group parameters into MergeContext and FieldParams structs - Handle deleted_type_names in oneof merges and mark deleted oneof fields with deleted types as deprecated - Add unit tests for reserved fields, deleted types, and oneofs
andrabivolaru
force-pushed
the
dev/andrabivolaru/fix-proto-merger-offsets
branch
from
August 31, 2026 08:15
171bb4c to
9b59c43
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a field is reserved upstream and its type is a deleted nested message/enum (not present upstream),
proto_mergerpreviously moved it tofields, causing it to be serialized before its type definition.This change keeps reserved fields of deleted types in
deleted_fieldswith[deprecated = true]so they are serialized after their nested type definitions.Added unit test
ReservedUpstreamFieldWithDeletedTypeIsPlacedInDeletedFieldsinproto_file_serializer_unittest.cc.