The above Bazel version changes proto compilation slightly: some proto
files are put into a `_virtual_imports` directory and thus
`_get_include_directory` needs to be updated accordingly.
Ideally, it would use instead the `ProtoInfo` provider to tease out the
proto import directories, but that's a bit more intrusive change.
By popular demand, we'll now be offering separate py_grpc_library and
py_proto_library targets sharing the same interface as within google3.
This change necessitated some modifications to how we pull in our own
Python-level dependencies and how we make those available to those
pulling in our project via Bazel.
There is now a grpc_python_deps() Bazel workspace rule that pulls in the
appropriate dependencies, which should be called from the client
project's WORKSPACE file. A test has been added to the bazel/test/
directory to verify that this behavior works as intended.
It's worth noting that the protobuf repository's usage of Starlark
bind() caused a great deal of trouble in ensuring that we could also
pull in six.
This change also required a change in the way generated proto code is
imported in the channelz and health-check modules, as well as in their
associated tests. We were importing them two different ways, each
relative. This resulted in two different module objects being imported
into the process, which were incompatible. I am not sure exactly what
caused this behavior to begin, as this should have been possible before
this PR. As a workaround, I am simply trying two different absolute
imports and using the one that works. This should function both inside
and outside of Bazel environments.
Bazel builds of test/cpp/end2end:end2end_test were failing on Mac OS with v1.8.0 due to missing gtest symbols. The issue is not seen in v1.8.1. A WORKSPACE file was added to gtest repo in 1.8.1, so gtest.BUILD can be removed.