Skip to content

Preserve features in type resolver #22634

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

Merged
merged 1 commit into from
Aug 5, 2025
Merged

Preserve features in type resolver #22634

merged 1 commit into from
Aug 5, 2025

Conversation

copybara-service[bot]
Copy link

Preserve features in type resolver

While we previously preserved unresolved features set directly on message and enum types and the edition specified in the file, and features set at the file or nesting scopes were discarded. This throws away important semantic information, resulting in incorrect Type and Enum objects under editions.

This change solves the problem by partially resolving features down to the scope returned. Users will still need to figure out the defaults for each edition on their own, but these can now be converted back into descriptors and built correctly.

While we previously preserved unresolved features set directly on message and enum types and the edition specified in the file, and features set at the file or nesting scopes were discarded.  This throws away important semantic information, resulting in incorrect Type and Enum objects under editions.

This change solves the problem by partially resolving features down to the scope returned.  Users will still need to figure out the defaults for each edition on their own, but these can now be converted back into descriptors and built correctly.

PiperOrigin-RevId: 791393429
@copybara-service copybara-service bot merged commit c7030f4 into main Aug 5, 2025
1 check passed
@copybara-service copybara-service bot deleted the test_780673043 branch August 5, 2025 22:33
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.

1 participant