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

Fix Bazel build by generating proto code automatically #96

Merged
merged 7 commits into from
Aug 30, 2018

Conversation

akonradi
Copy link
Contributor

The test code depends on auto-generated Go code that, if missing, will cause compilation errors. This can be generated via make, but doing so

  1. is not hermetic
  2. requires proto path variables to be set

This PR updates the Bazel rules and targets so that bazel run //tests/harness/executor works again and runs the full test suite. The changes are limited to BUILD files (there are no code changes) so it should only affect Bazel-based builds.

This uses the gogo proto toolchain to generate PGV validations for proto
files that are accessible as Bazel targets.
Instead of requiring the libraries to be generated via make or manually,
use Bazel to auto-generate them when needed.
This commit brings these into compliance with Bazel naming conventions:
for a file xyz.proto:
 - xyz_proto is a proto_library target for xyz.proto
 - xyz_go_proto is a go_proto_library target for xyz.proto
 - xyz_cc_proto is a cc_proto_library target for xyz.proto
Using the vendored version causes problems since the two versions aren't
completely interchangeable, and gogo generates proto code using the
Bazel-referenced one.
@htuch htuch merged commit fd1d9eb into bufbuild:master Aug 30, 2018
@moderation
Copy link

I was going to take a stab at using this commit in Envoy but will defer until #89 is addressed.

@akonradi akonradi deleted the bazel-tests branch September 19, 2018 15:30
@sesmith177 sesmith177 mentioned this pull request Sep 26, 2018
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

Successfully merging this pull request may close these issues.

4 participants