Add support for Go features (features.(pb.go).*) in buf#4363
Add support for Go features (features.(pb.go).*) in buf#4363NexZhu wants to merge 1 commit intobufbuild:mainfrom
Conversation
This commit adds support for configuring Go features in buf.yaml for managed mode code generation and breaking change detection. Changes: - Add ResolveGoFeature and ResolveGoFeatureForEnum functions in customfeatures - Add FIELD_SAME_GO_STRIP_ENUM_PREFIX breaking change rule - Add FileOptionGoApiLevel for managed mode (features.(pb.go).api_level) - Add test for ResolveGoFeature The Go features use the external google.golang.org/protobuf/types/gofeaturespb package to avoid namespace conflicts. Note: The strip_enum_prefix breaking rule test is skipped as it requires edition 2024 which is not yet fully supported in buf.
|
Thank you for submitting this change -- I think this request seems very reasonable. Internally, our current priority is getting Editions 2024 support up and running with our new compiler, and would prefer to review this when it can be completed with the required tests. So transparently, I won't be able to review this until that body of work is complete, but if it is okay with you, I am happy to keep this PR open and will provide feedback once we are ready to accept this request. |
Sure |
This commit adds support for configuring Go features in buf.yaml for managed mode code generation and breaking change detection.
Changes:
The Go features use the external google.golang.org/protobuf/types/gofeaturespb package to avoid namespace conflicts.
Note: The strip_enum_prefix breaking rule test is skipped as it requires edition 2024 which is not yet fully supported in buf.