Skip to content

Conversation

@jhump
Copy link
Owner

@jhump jhump commented Jan 20, 2026

The bufbuild/protocompile module hasn't yet reached v1 stability and is expecting lots more turbulence: it has a new experimental compiler and API which will soon replace the existing compiler and exported API. This will be a backwards-breaking change (deemed okay since it hasn't yet reached v1 maturity).

To avoid that breaking any users of v1 of jhump/protoreflect, this PR embeds a fork of bufbuild/protocompile and no longer depends on the 3rd party module.

While at it, this PR adds some minor bug fixes to the desc/builder and desc/protoprint APIs, related to using extensions generated by the old protoc-gen-go plugin (the v1 API version in github.com/google/protobuf; the modern version of protoc-gen-go is now provided by google.golang.org/protobuf).

Also, while at it, this PR adds a small amount of sugar on top of existing-but-unreleased code in bufbuild/protocompile (that is now in this module's internal fork) to provide experimental support for Edition 2024. It does not intend to implement all of the rules/semantics of 2024, but it does provide a way to generate descriptors from sources that use Edition 2024 and the new features thereof (such as the "export" and "local" visibility keywords and the "option" import modifier). Hopefully this is adequate state to enable continued use of this module and give users time to migrate off of v1 and either to v2 or (for users of desc/protoparse) to the upcoming new API in bufbuild/protocompile.

jhump added 10 commits January 20, 2026 13:54
more robust in the face of working with legacy
extensions generated by the old protoc-gen-go
add back prototest; remove protoc and fastscan; update tests to not use deleted protoc package
… to some test code in protocompile fork; remove unused stuff in protocompile's unsafex that 'go vet' dislikes
@jhump jhump merged commit 3297f00 into v1 Jan 20, 2026
2 checks passed
@jhump jhump deleted the jh/v1-fixes branch January 20, 2026 20:16
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