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

Add generated *.pb.go #65

Closed
ukai opened this issue Mar 15, 2019 · 1 comment
Closed

Add generated *.pb.go #65

ukai opened this issue Mar 15, 2019 · 1 comment
Assignees

Comments

@ukai
Copy link
Contributor

ukai commented Mar 15, 2019

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?

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.
@ola-rozenfeld
Copy link
Contributor

Closed via 5556e9c

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

No branches or pull requests

2 participants