Skip to content

Support older version of descriptor.proto#719

Merged
doriable merged 1 commit intomainfrom
support-up-to-protoc-3.0.0
Apr 27, 2026
Merged

Support older version of descriptor.proto#719
doriable merged 1 commit intomainfrom
support-up-to-protoc-3.0.0

Conversation

@doriable
Copy link
Copy Markdown
Member

proto3 support was introduced in protoc v3.0.0, however,
ExtensionRangeOptions was introduced in v3.4.0. If we want
to support vendoring WKTs (specifically descriptor.proto) back to
v3.0.0, we need to make ExtensionRangeOptions optional.

This PR also adds a check when resolving option refs in general to
guard against missing *Options types in descriptor.proto. Previous to
this change, even in the case where we surface a diagnostic for a missing
required descriptor.proto field, the optionRef.resolve() code path will
still produce an ICE because it will attempt lower the unresolved *Options
field. Instead, we provide a diagnostic at the options site to users in this case.

@doriable doriable merged commit 6b040a6 into main Apr 27, 2026
11 checks passed
@doriable doriable deleted the support-up-to-protoc-3.0.0 branch April 27, 2026 23:50
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