-
Notifications
You must be signed in to change notification settings - Fork 113
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 generated *.pb.go #65
Comments
jasharpe
pushed a commit
to jasharpe/remote-apis
that referenced
this issue
May 3, 2019
Generating Go code like this matches the pattern precedented by https://github.com/google/go-genproto for Google APIs. Generated files are placed in: - v2/ for remote execution, matching the style used by go-genproto for versioned APIs, e.g. https://github.com/google/go-genproto/blob/master/googleapis/appengine/v1/appengine.pb.go#L4 - semver/ for semver library, matching the style used by go-genproto for unversioned APIs, e.g. https://github.com/google/go-genproto/blob/master/googleapis/api/distribution/distribution.pb.go#L4 Unlike go-genproto, we use Bazel to generate the Go code, which is much simpler, since it handles calling protoc for us. I tested this by creating a Go project that imports this proto and confirmed that I can build it with Bazel and go build. This addresses issue bazelbuild#65.
jasharpe
pushed a commit
to jasharpe/remote-apis
that referenced
this issue
May 3, 2019
Generating Go code like this matches the pattern precedented by https://github.com/google/go-genproto for Google APIs. Generated files are placed in: - v2/ for remote execution, matching the style used by go-genproto for versioned APIs, e.g. https://github.com/google/go-genproto/blob/master/googleapis/appengine/v1/appengine.pb.go#L4 - semver/ for semver library, matching the style used by go-genproto for unversioned APIs, e.g. https://github.com/google/go-genproto/blob/master/googleapis/api/distribution/distribution.pb.go#L4 Unlike go-genproto, we use Bazel to generate the Go code, which is much simpler, since it handles calling protoc for us. go.mod and go.sum generated by: ``` go mod init github.com/bazelbuild/remote-apis go build ./... ``` I tested this by creating a Go project that imports this proto and confirmed that I can build it with Bazel and go build. This addresses issue bazelbuild#65.
jasharpe
pushed a commit
to jasharpe/remote-apis
that referenced
this issue
May 6, 2019
Generating Go code like this matches the pattern precedented by https://github.com/google/go-genproto for Google APIs. Generated files are placed in: - v2/ for remote execution, matching the style used by go-genproto for versioned APIs, e.g. https://github.com/google/go-genproto/blob/master/googleapis/appengine/v1/appengine.pb.go#L4 - semver/ for semver library, matching the style used by go-genproto for unversioned APIs, e.g. https://github.com/google/go-genproto/blob/master/googleapis/api/distribution/distribution.pb.go#L4 Unlike go-genproto, we use Bazel to generate the Go code, which is much simpler, since it handles calling protoc for us. We add a pre-commit hook to generate Go code before each commit, and add it to that commit. go.mod and go.sum generated by: ``` go mod init github.com/bazelbuild/remote-apis go build ./... ``` I tested this by creating a Go project that imports this proto and confirmed that I can build it with Bazel and go build. This addresses issue bazelbuild#65.
ola-rozenfeld
pushed a commit
that referenced
this issue
May 7, 2019
Generating Go code like this matches the pattern precedented by https://github.com/google/go-genproto for Google APIs. Generated files are placed in: - v2/ for remote execution, matching the style used by go-genproto for versioned APIs, e.g. https://github.com/google/go-genproto/blob/master/googleapis/appengine/v1/appengine.pb.go#L4 - semver/ for semver library, matching the style used by go-genproto for unversioned APIs, e.g. https://github.com/google/go-genproto/blob/master/googleapis/api/distribution/distribution.pb.go#L4 Unlike go-genproto, we use Bazel to generate the Go code, which is much simpler, since it handles calling protoc for us. We add a pre-commit hook to generate Go code before each commit, and add it to that commit. go.mod and go.sum generated by: ``` go mod init github.com/bazelbuild/remote-apis go build ./... ``` I tested this by creating a Go project that imports this proto and confirmed that I can build it with Bazel and go build. This addresses issue #65.
Closed via 5556e9c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
googleapis/go-genproto#138 and googleapis/google-cloud-go#1322
could you add generated *.pb.go to make it easier for Go developers to use that API?
The text was updated successfully, but these errors were encountered: