Skip to content

Update to protocolbuffers/protobuf v34.0#1385

Merged
emcfarlane merged 7 commits into
mainfrom
ed/protocV34
Apr 22, 2026
Merged

Update to protocolbuffers/protobuf v34.0#1385
emcfarlane merged 7 commits into
mainfrom
ed/protocV34

Conversation

@emcfarlane

@emcfarlane emcfarlane commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

This updates to protocolbuffers/protobuf v34.0. Conformance testing will be done as a follow up.

Continuing on from #1308 the EDITION_UNSTABLE enum is now special cased in the runtime and plugin edition-range checks, rather than treating it as a hard error. An unstable edition will fall back to the maximumEdition (currently EDITION_2024) feature to allow for testing.

Regenerated protobuf-test fixtures against v34.0.

Closes #1361

Upgrade the upstream protoc from v33.2.0 to v34.0.0. protoc v34.0 introduces
EDITION_UNSTABLE (9999) as a sandbox for in-development features. Follow the
approach upstream protobuf-go took and special-case this edition in the runtime
and plugin edition-range checks, rather than treating it as a hard error.

- Add Edition.EDITION_UNSTABLE to SupportedEdition.
- In getFileEdition, accept EDITION_UNSTABLE alongside the known editions.
- In resolveFeature, fall back to maximumEdition (EDITION_2024) feature
  defaults when the file is EDITION_UNSTABLE.
- In protoplugin's schema.ts, carve EDITION_UNSTABLE out of the min/max check
  so plugins do not error when protoc passes an UNSTABLE file through with
  --experimental_editions.

Regenerated protobuf-test fixtures against protoc v34.0.
@emcfarlane emcfarlane requested a review from srikrsna-buf April 17, 2026 20:49
Comment thread packages/protoplugin/src/schema.ts Outdated
Comment on lines +253 to +255
// EDITION_UNSTABLE is a sandbox for in-development features; accept
// it regardless of the plugin's min/max bounds.
if (edition !== Edition.EDITION_UNSTABLE) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continue on the inverse will reduce nesting.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 52d8fa4

@emcfarlane emcfarlane marked this pull request as ready for review April 20, 2026 18:23
@emcfarlane emcfarlane marked this pull request as draft April 20, 2026 19:43
@emcfarlane emcfarlane changed the title Bump protoc to v34.0 and add EDITION_UNSTABLE support Update to protocolbuffers/protobuf v34.0 Apr 22, 2026
@emcfarlane emcfarlane marked this pull request as ready for review April 22, 2026 13:07
@emcfarlane emcfarlane requested a review from timostamm April 22, 2026 13:07

@timostamm timostamm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see an update to the protobuf-conformance dep. Intentional? See #1363

@timostamm

Copy link
Copy Markdown
Member

Conformance testing will be done as a follow up.

Sorry, missed that. Works for me.

@emcfarlane emcfarlane merged commit 859013c into main Apr 22, 2026
26 checks passed
@emcfarlane emcfarlane deleted the ed/protocV34 branch April 22, 2026 13:39
@timostamm timostamm mentioned this pull request Apr 23, 2026
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.

3 participants