-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(internal): auto-generate snippets #3949
Conversation
I created a new package to make it easier to run than calling the binary. I included a binary for local development. I needed to install `build-base` in the Docker image to get `gcc`, which was needed to `Load` all packages. I modified `gapics.go` to replace `genproto` in every `go.mod` because the changes need to be visible everywhere to `Load` every module.
Here is the summary of possible violations 😱 There is a possible violation for not having product prefix.The end of the violation section. All the stuff below is FYI purposes only. Here is the summary of changes. You are about to add 1 region tag.You are about to delete 1 region tag.
This comment is generated by snippet-bot.
|
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.
Just a couple of small things or else looks good. Thanks for some of the cleanup you did as well!
func (g *GapicGenerator) addModReplaceGenproto() error { | ||
log.Println("adding temporary genproto replace statement") | ||
func (g *GapicGenerator) addModReplaceGenproto(dir string) error { | ||
log.Printf("[%s] adding temporary genproto replace statement\n", dir) |
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.
nit: same as above about newline.
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.
Done.
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 ill let Cody approve
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.
Thanks!
func (g *GapicGenerator) addModReplaceGenproto() error { | ||
log.Println("adding temporary genproto replace statement") | ||
func (g *GapicGenerator) addModReplaceGenproto(dir string) error { | ||
log.Printf("[%s] adding temporary genproto replace statement\n", dir) |
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.
Done.
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
I created a new package to make it easier to run than calling the binary. I included a binary for local development.
I needed to install
build-base
in the Docker image to getgcc
, which was needed toLoad
all packages.I modified
gapics.go
to replacegenproto
in everygo.mod
because the changes need to be visible everywhere toLoad
every module.I ran the generator locally and it seems to work. I only included one directory in this PR because there are a lot of files. I can upload the rest in this PR after initial review.
Updates #3916.