grpc/test/distrib/bazel
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
..
cpp Update Abseil to 20230125 (#32139) 2023-01-30 16:20:24 -08:00
python [bazel] Auto-generate .pyi files in py_proto_library rule (#32872) 2023-06-12 14:36:24 -07:00
python_second_test_repo Update Abseil to 20230125 (#32139) 2023-01-30 16:20:24 -08:00
run_bazel_distrib_test.sh Add bazel cpp distribtest for grpc_cc_library (#29175) 2022-03-25 12:01:23 -07:00
test_latest_bazel_version.sh Update Bazel latest version heuristic. (#30958) 2022-09-13 12:11:14 -07:00
test_single_bazel_version.sh [fuzzing] Roll forward dep on fuzztest (#32667) 2023-03-21 13:37:32 -07:00