Created by fromberger at 2018-01-17 20:52:37:
This change primarily addresses #2405, which unblock the use of Bazel versions more recent than 0.7.0. Unfortunately this required several interlocking changes that cannot be easily separated. In brief, the changes are:
-
Replace our custom protobuf and Go rules with upstream rules. We now use "native" aspect-driven proto_library and the Go rules from https://github.com/bazelbuild/rules_go.
-
Update the version of the protobuf toolchain to 3.5.1.1. Add C++ and Java proto toolchains. Add bindings for gson and guava required by those external repos. Fixes to make the protobuf repo work with zlib. (see https://github.com/google/protobuf/issues/2365)
-
Update the Go toolchain (allowing Go 1.9, finally).
-
Update all our proto_library rules. This will require us to update the tool that generates our proto libraries for "go get", but I have not included that in this change.
With this change, per-language generation is handled by separate aspects. Add language-specific rules for C++, Go, and Java.
- Disable the Go unit test macros. These will have to be entirely rewritten, as the internal plumbing of the upstream rules is new. I'll address that in a future change, soon.
These changes now require Bazel ≥ 0.8.0.
The upstream Go rules broke many of our tests that were based on the sh_test rule. To address this, add a shell_tool_test macro that simplifies the plumbing needed to pass tool paths in to the shell tests, without having to entirely rewrite them. All our sh_test rules that depended on Go binaries are now updated.
该提问来源于开源项目:kythe/kythe