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

[proto] Allow multiple outputs from a proto compiler #3650

Merged
merged 5 commits into from
Aug 13, 2023

Conversation

tingilee
Copy link
Contributor

@tingilee tingilee commented Aug 11, 2023

What type of PR is this?
Feature

What does this PR do? Why is it needed?

This PR allows a proto compiler to output to multiple files. For example, in the test, the protoc compilation of the enum.proto will output to enum.pb.go and enum_dbenum.pb.go.

This PR adds a new field suffixes which takes precedent over suffix if set. suffix's behavior remains the same for backwards compatibility for code that already uses this field. However, long term, suffix can be replaced by suffixes.

Which issues(s) does this PR fix?

Fixes #3630

Other notes for review

Copy link
Collaborator

@fmeum fmeum left a comment

Choose a reason for hiding this comment

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

I really like the comprehensive and realistic test coverage, great job!

The diff to production code is also pleasantly small now, thanks for iterating over #3631 in this way.

proto/compiler.bzl Outdated Show resolved Hide resolved
@fmeum fmeum enabled auto-merge (squash) August 13, 2023 09:59
@fmeum fmeum disabled auto-merge August 13, 2023 09:59
@fmeum fmeum enabled auto-merge (squash) August 13, 2023 09:59
@fmeum fmeum merged commit f5ae196 into bazelbuild:master Aug 13, 2023
2 checks passed
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.

Allow extra_outputs on go_proto_compile
2 participants