-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add protogen build tool #139
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We do a lot of work to post-process protobuf-generated code for our purposes and it's not sustainably to rewrite and maintain it separately for each repo when we're always doing the same thing. This tool combines all of the following into a single build tool: - proto compilation - enum post-processing (renaming enum consts and rewriting String methods) - stripping plugin versions from the generated files - Alpine's version of proto is a full major version behind brew's, and some of our repos will fail CI if you differ from the alpine-generated code
tdeebswihart
force-pushed
the
tds/protoc-build-tool
branch
from
December 7, 2023 23:59
c79b015
to
70bc7cd
Compare
I'm having trouble go-installing this from other repos
tdeebswihart
force-pushed
the
tds/protoc-build-tool
branch
from
December 8, 2023 00:48
48d6931
to
ed78a00
Compare
cretz
reviewed
Dec 8, 2023
Good night, sweet prince.
cretz
approved these changes
Dec 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks like a good, simple approach. (I think if string manip instead of AST could simplify more, but this LGTM)
tdeebswihart
added a commit
to temporalio/temporal
that referenced
this pull request
Dec 11, 2023
## What changed? I replaced protoc.sh with [protogen](temporalio/api-go#139) ## Why? I've copied some variant of this protoc.sh tool into three repos now. This is unsustainable, so I've added a little build tool to api-go that will handle proto generation and post-processing for us. ## How did you test it? [I ran `make proto` in the PR stacked on this one](#5211) ## Potential risks None ## Is hotfix candidate? No
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed?
I've added the
protogen
build tool to manage compiling and post-processing protobuf-generated code.Why?
We do a lot of work to post-process protobuf-generated code for our purposes and it's not sustainably to rewrite and maintain it separately for each repo when we're always doing the same thing.
This tool combines all of the following into a single build tool:
How did you test it?
This tool is used in the PR stacked on this one that rebuilds the code as well as TODO in the server repo. I expect to add it to the CDS and saas-temporal repos as well once it's merged.
Potential risks
None. If I've broken something in another repo I'll fix it once I add it to that repo