-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
all: refactor .pb.go generation #3451
Conversation
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.
LGTM but a couple small comments. Can you please also resolve the file with a conflict? Thanks!
Resolved the merge conflict. Ran regenerate.sh, which also picked up a minor change to |
Unfortunately, this now triggers a deprecated check, because one of the fields was marked as deprecated. Can you take a look @easwars? |
Replace various //go:generate lines and regenerate.sh scripts with a single, top-level regenerate.sh that regenerates all .pb.go files. Placing generation in a single script ensures that all files are generated with similar parameters. The new regenerate.sh uses the protoc-gen-go version defined in test/tools/go.mod and automatically handles new .proto files as they are added. Do some minor refactoring on .proto files: Every file now has a go_package option (which will be required by a future version of the code generator), and file imports are all relative to the repository root.
Rebased to after #3562 . |
Replace various //go:generate lines and regenerate.sh scripts with a
single, top-level regenerate.sh that regenerates all .pb.go files.
Placing generation in a single script ensures that all files are
generated with similar parameters. The new regenerate.sh uses the
protoc-gen-go version defined in test/tools/go.mod and automatically
handles new .proto files as they are added.
Do some minor refactoring on .proto files: Every file now has a
go_package option (which will be required by a future version of the
code generator), and file imports are all relative to the repository
root.