Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update protoc plugins to support Protobuf Editions #4236

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

mering
Copy link
Contributor

@mering mering commented Jan 17, 2025

What type of PR is this?

Feature

What does this PR do? Why is it needed?

This adds support for compiling go_proto_library and go_grpc_library to support .proto files using Protobuf Editions.

Which issues(s) does this PR fix?

Fixes #4235

Other notes for review

@fmeum
Copy link
Member

fmeum commented Jan 17, 2025

Thanks for working on this! CI is red with a reference to googleapis. Maybe we need to add a dep?

@mering
Copy link
Contributor Author

mering commented Jan 20, 2025

@fmeum I also had to update google.golang.org/genproto and also ran bazel run @io_bazel_rules_go//go -- mod tidy. CI is green now.

The new version splits out google.golang.org/genproto/googleapis/rpc
which resolves the missing dependency CI error.

Also running go mod tidy to cleanup unused sums.
@fmeum
Copy link
Member

fmeum commented Jan 20, 2025

Do you happen to know whether these updates include any breaking changes (especially in protobuf)? I'm asking because an alternative approach that avoids a forceful update for users would be to document that contents of Go proto rules need to depend on a sufficiently recent protobuf version themselves.

@mering
Copy link
Contributor Author

mering commented Jan 21, 2025

Do you happen to know whether these updates include any breaking changes (especially in protobuf)? I'm asking because an alternative approach that avoids a forceful update for users would be to document that contents of Go proto rules need to depend on a sufficiently recent protobuf version themselves.

I am not aware of any and Golang versioning requires breaking changes to become a new package (for example /v2).

@fmeum
Copy link
Member

fmeum commented Jan 21, 2025

Some of the packages are not yet at v1, but as users will have to update anyway at some point, I think we can risk it. If something breaks, we can always roll back. Thanks!

@fmeum fmeum merged commit 05ef407 into bazel-contrib:master Jan 21, 2025
1 check passed
@mering mering deleted the proto-editions branch January 21, 2025 08:29
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.

Support Protobuf editions
2 participants