grpc/test/distrib
Florian Ferstl fa32eb36b3
[bazel] Auto-generate .pyi files in py_proto_library rule (#32872)
With some delay, this is a PR for
https://github.com/grpc/grpc/issues/32564 (and previously
https://github.com/grpc/grpc/pull/31791).

I looked into adding a regular `py_test` for this change [as
suggested](https://github.com/grpc/grpc/pull/31791#issuecomment-1423245116)
but I am not aware of any effect that the presence of a .pyi stub file
would have at runtime and where some sort of type-checking in a .py
script would be affected. Stub files are only for use by type checkers &
IDE's. I mean, something like this would work:

```
import helloworld_pb2
py_file = helloworld_pb2.__file__ 
pyi_file = py_file + 'i’
self.assertTrue(os.path.exists(pyi_file))
```

But that seems really hacky to me. Instead I created a simple rule test
for `py_proto_library` with Bazel Skylib which tests the declared
outputs for an example `py_proto_library` target. Indirectly, this also
tests that the declared output files are actually generated. Please let
me know if this is sufficient.
2023-06-12 14:36:24 -07:00
..
bazel [bazel] Auto-generate .pyi files in py_proto_library rule (#32872) 2023-06-12 14:36:24 -07:00
cpp [Build] Removed gRPC_PROTOBUF_PACKAGE_TYPE, supporting config only (#32988) 2023-05-04 13:55:42 -07:00
csharp Revert "Revert "Add back C# distribtests for Grpc.Tools"" (#31436) 2022-10-27 09:59:06 +02:00
gcf/python [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
php fix PHP distribtest on monterey (#31567) 2022-11-07 20:01:58 +01:00
python [Python] Migrate from yapf to black (#33138) 2023-06-09 15:08:55 -07:00
ruby Pointing the protobuf submodule to the new URL (#26811) 2021-07-29 10:19:16 -07:00