Skip to content

Force descriptor initialization of dependencies *before* internalUpdateFileDescriptor().#15718

Merged
zhangskz merged 1 commit into26.xfrom
cp-editions
Feb 5, 2024
Merged

Force descriptor initialization of dependencies *before* internalUpdateFileDescriptor().#15718
zhangskz merged 1 commit into26.xfrom
cp-editions

Conversation

@zhangskz
Copy link
Member

@zhangskz zhangskz commented Feb 5, 2024

This fixes an edge-case where EnumDescriptor for a custom option may be unresolved if used in the same file, since adding the field to ExtensionRegistry doesn't trigger its static init block if the Enum is imported from a dependency.

Also renames feature resolution methods exposed from gencode. Private resolveAllFeaturesInternal() method may be renamed back to resolveAllFeatures() in a followup change.

PiperOrigin-RevId: 603852391

…teFileDescriptor().

This fixes an edge-case where EnumDescriptor for a custom option may be unresolved if used in the same file, since adding the field to ExtensionRegistry doesn't trigger its static init block if the Enum is imported from a dependency.

Also renames feature resolution methods exposed from gencode. Private resolveAllFeaturesInternal() method may be renamed back to resolveAllFeatures() in a followup change.

PiperOrigin-RevId: 603852391
@zhangskz zhangskz requested a review from a team as a code owner February 5, 2024 16:13
@zhangskz zhangskz requested review from mkruskal-google and shaod2 and removed request for a team and shaod2 February 5, 2024 16:13
@zhangskz zhangskz merged commit 4dec1a7 into 26.x Feb 5, 2024
@zhangskz zhangskz deleted the cp-editions branch February 5, 2024 16:55
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.

2 participants