Fixes for one last (🤞) v1 release #646
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
bufbuild/protocompilemodule 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 ofbufbuild/protocompileand no longer depends on the 3rd party module.While at it, this PR adds some minor bug fixes to the
desc/builderanddesc/protoprintAPIs, related to using extensions generated by the oldprotoc-gen-goplugin (the v1 API version ingithub.com/google/protobuf; the modern version ofprotoc-gen-gois now provided bygoogle.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 ofdesc/protoparse) to the upcoming new API inbufbuild/protocompile.