mirror of https://github.com/grpc/grpc.git
Tag:
Branch:
Tree:
a54c7f7266
1.64.1
alts-context-plumbing
artifacts
backport-v1.34.x-OvpI7f
create-pull-request/patch-0195084
create-pull-request/patch-02276f4
create-pull-request/patch-0417b88
create-pull-request/patch-05430a5
create-pull-request/patch-0738969
create-pull-request/patch-08642b1
create-pull-request/patch-0e113e3
create-pull-request/patch-0ee391c
create-pull-request/patch-130ec222
create-pull-request/patch-14ac6891
create-pull-request/patch-16be944
create-pull-request/patch-1e86ca58
create-pull-request/patch-23521be
create-pull-request/patch-3557573
create-pull-request/patch-35df344
create-pull-request/patch-37e3f17
create-pull-request/patch-3e79c88
create-pull-request/patch-44d7a7a
create-pull-request/patch-4512297
create-pull-request/patch-48966bd
create-pull-request/patch-4a3092a2
create-pull-request/patch-4e8e6b7
create-pull-request/patch-4feb98e
create-pull-request/patch-50b02da
create-pull-request/patch-539d75c
create-pull-request/patch-56d25ca
create-pull-request/patch-5c8858f
create-pull-request/patch-5e3fe08
create-pull-request/patch-5e73172
create-pull-request/patch-5f3d55c
create-pull-request/patch-605ef649
create-pull-request/patch-6303798
create-pull-request/patch-6f05b7d2
create-pull-request/patch-716b26e
create-pull-request/patch-71da53d
create-pull-request/patch-764faf9
create-pull-request/patch-78c8e11
create-pull-request/patch-7a9373b0
create-pull-request/patch-81f6130
create-pull-request/patch-81fe947
create-pull-request/patch-82055d1
create-pull-request/patch-883e5f7
create-pull-request/patch-895f163
create-pull-request/patch-8e951e1
create-pull-request/patch-91bcf9e
create-pull-request/patch-92e95881
create-pull-request/patch-93f0266
create-pull-request/patch-999195a
create-pull-request/patch-a00d5b4
create-pull-request/patch-a1ce253
create-pull-request/patch-a526a09
create-pull-request/patch-aeb96e9
create-pull-request/patch-afb307fb
create-pull-request/patch-b1b1b04
create-pull-request/patch-b32d94d
create-pull-request/patch-b7592cd9
create-pull-request/patch-b852e47
create-pull-request/patch-bad57a4
create-pull-request/patch-baf7250
create-pull-request/patch-bcabde3
create-pull-request/patch-bcd6684
create-pull-request/patch-c0890d9
create-pull-request/patch-c1d31b5
create-pull-request/patch-c6c1c6a
create-pull-request/patch-c81bdf7
create-pull-request/patch-c879356
create-pull-request/patch-c921002
create-pull-request/patch-c94a923
create-pull-request/patch-cdf4186a
create-pull-request/patch-d562c5b
create-pull-request/patch-d843ffe
create-pull-request/patch-da8686c
create-pull-request/patch-daccc43
create-pull-request/patch-de59548
create-pull-request/patch-de5dcee4
create-pull-request/patch-e097a32
create-pull-request/patch-e20a7252
create-pull-request/patch-e33af6c
create-pull-request/patch-e54c0db7
create-pull-request/patch-ea6c6bb
create-pull-request/patch-eeedd967
create-pull-request/patch-f00f68d
create-pull-request/patch-f1d14f7
create-pull-request/patch-f34844c
create-pull-request/patch-f678a96
create-pull-request/patch-f7fd9a5
create-pull-request/patch-f82c675
create-pull-request/patch-fbd47fd
create-pull-request/patch-fe396c6
dependabot/github_actions/github-actions-b79dc29373
dependabot/npm_and_yarn/examples/node/node-forge-1.3.1
dependabot/pip/setuptools-70.0.0
dependabot/pip/urllib3-1.26.19
dependabot/pip/zipp-3.19.1
develop
eugeneo-delete-array
eugeneo-maintainers
fix_protobuf_build
fix_regenerate_protos
gh-pages
go_release
interop_hook_server
larry-safran-patch-1
master
python/sync/typings
revert-28372-cfstream_test_fix
revert-28441-revert-28309-XdsRbacFilter
revert-28455-revert-28419-api-fuzzer-crash-bug
revert-28900-HttpRequestSSlCredentialsComparator
revert-28951-revert-28767-nextpromise
revert-29375-objc-layering-check
revert-30023-duration
revert-30252-ARGUE
revert-30896-rules_apple_bazel5
revert-31138-remove-grpcpp-codegen
revert-31204-compression-promise
revert-31481-reland-try
revert-31822-revert-31786-move-google-default-channel-creds-declaration
revert-32077-cf-event-engine-client
revert-32461-reland/ee-runafter-cpp-alarm
revert-32524-tasks/tests/orca_per_rpc
revert-32632-centralize-client-channel-resolver-selection
revert-32636-grpc_base_namespace
revert-32666-revert-32578-gft
revert-32706-invalidate_rbe_cache
revert-32844-ee-client-for-all-end2end-tests
revert-32909-fix-py-reflection-response
revert-32924-cf-event-engine-client
revert-32956-client-channel-resolver-fuzzer
revert-32968-disable-ee-end2end-tests
revert-33154-merge-fest
revert-33203-ram-rod
revert-33442-printExp
revert-33508-revert-33473-svc-cfg-ca
revert-33512-Revert33428
revert-33584-AcceptStreamLog
revert-33676-revert-33647-interop
revert-33939-tests/interop-session-affinity
revert-34129-tasks/import-rollback
revert-34515-revert-33969-checkAbortError
revert-34541-revert-34522-die-foul-beast
revert-36752-silience-gcc7
revert_python_3.13_pr
run_test_verbose_success
sergiitk-service_config
test_565724722
test_582489535
test_582692326
test_583078999
test_583500553
test_584065091
test_584545666
test_585692562
test_585737061
test_586188548
test_586576809
test_588131915
test_589060063
test_589910972
test_590118795
test_590128450
test_590129238
test_590826993
test_590845254
test_591146143
test_592612659
test_596967071
test_598879913
test_600541791
test_601845634
test_606709629
test_607737361
test_616189569
test_616253080
test_619662401
test_625436677
test_625488709
test_625538460
test_627143927
test_627516799
test_633352477
test_636309539
test_644148181
test_649154069
test_653702831
test_653824016
test_657265684
test_681606201
test_685282781
test_687702529
test_687702930
test_687703146
test_693807838
test_693841452
test_694178336
test_694187061
test_695495325
test_696559679
test_703351249
test_703557672
test_703932802
test_705168221
v1.0.x
v1.1.x
v1.10.x
v1.11.x
v1.12.x
v1.13.x
v1.14.x
v1.15.x
v1.16.x
v1.17.x
v1.18.x
v1.19.x
v1.2.x
v1.20.x
v1.21.x
v1.22.x
v1.23.x
v1.24.x
v1.25.x
v1.26.x
v1.27.x
v1.28.x
v1.29.x
v1.3.x
v1.30.x
v1.31.x
v1.32.x
v1.33.x
v1.34.x
v1.35.x
v1.36.x
v1.37.x
v1.38.x
v1.39.x
v1.4.x
v1.40.x
v1.41.x
v1.42.x
v1.43.x
v1.44.x
v1.45.x
v1.46.x
v1.47.x
v1.48.x
v1.49.x
v1.50.x
v1.51.x
v1.52.x
v1.53.x
v1.54.x
v1.55
v1.55.x
v1.56.x
v1.57.x
v1.58.x
v1.59.x
v1.6.x
v1.60.x
v1.61.x
v1.62.x
v1.63.x
v1.64.x
v1.65.x
v1.66.x
v1.67.x
v1.68.x
v1.69.x
v1.7.x
v1.8.x
v1.9.x
veblush-patch-1
veblush-patch-3
windows-endpoint
1.33.1
objective-c-v1.0.0-pre1
objective-c-v1.0.2
release-0_10
release-0_10_0
release-0_10_0-objectivec-0.6.0
release-0_10_1
release-0_10_1-node-0.10.1
release-0_10_2
release-0_11
release-0_11_0
release-0_11_1
release-0_11_1-objectivec-0.11.1
release-0_12
release-0_12_0
release-0_12_0-objectivec-0.12.0
release-0_13
release-0_13_0
release-0_13_0-objectivec-0.13.0
release-0_13_1
release-0_14
release-0_14_0
release-0_14_0-objective-c-0.14.0
release-0_14_0-objectivec-0.14.0
release-0_14_1
release-0_15
release-0_15_0
release-0_15_1
release-0_5
release-0_5_0
release-0_6
release-0_6_0
release-0_9
release-0_9_0
release-0_9_1
release-0_9_1-node-0.9.2
release-0_9_1-objectivec-0.5.1
release_test
v0.15.0
v0.15.2
v1.0.0
v1.0.0-pre2
v1.0.1
v1.0.1-pre1
v1.1.0
v1.1.0-pre1
v1.1.1
v1.1.2
v1.1.3
v1.1.4
v1.10.0
v1.10.0-pre1
v1.10.0-pre2
v1.10.1
v1.10.1-pre1
v1.11.0
v1.11.0-pre1
v1.11.0-pre2
v1.11.1
v1.11.1-pre1
v1.12.0
v1.12.0-pre1
v1.12.1
v1.13.0
v1.13.0-pre1
v1.13.0-pre2
v1.13.0-pre3
v1.13.1
v1.14.0
v1.14.0-pre1
v1.14.0-pre2
v1.14.1
v1.14.2
v1.14.2-pre1
v1.15.0
v1.15.0-pre1
v1.15.1
v1.16.0
v1.16.0-pre1
v1.16.1
v1.16.1-pre1
v1.17.0
v1.17.0-pre1
v1.17.0-pre2
v1.17.0-pre3
v1.17.1
v1.17.1-pre1
v1.17.2
v1.18.0
v1.18.0-pre1
v1.19.0
v1.19.0-pre1
v1.19.1
v1.2.0
v1.2.0-pre2
v1.2.1
v1.2.2
v1.2.3
v1.2.4
v1.2.5
v1.20.0
v1.20.0-pre1
v1.20.0-pre2
v1.20.0-pre3
v1.20.1
v1.21.0
v1.21.0-pre1
v1.21.1
v1.21.2
v1.21.3
v1.21.3-pre1
v1.21.4
v1.21.4-pre1
v1.22.0
v1.22.0-pre1
v1.22.1
v1.23.0
v1.23.0-pre1
v1.23.1
v1.24.0
v1.24.0-pre1
v1.24.0-pre2
v1.24.1
v1.24.2
v1.24.3
v1.25.0
v1.25.0-pre1
v1.26.0
v1.26.0-pre1
v1.27.0
v1.27.0-pre1
v1.27.0-pre2
v1.27.1
v1.27.2
v1.27.3
v1.28.0
v1.28.0-pre1
v1.28.0-pre2
v1.28.0-pre3
v1.28.1
v1.28.2
v1.29.0
v1.29.1
v1.3.0
v1.3.1
v1.3.2
v1.3.3
v1.3.4
v1.3.5
v1.3.6
v1.3.7
v1.3.9
v1.30.0
v1.30.0-pre1
v1.30.1
v1.30.2
v1.31.0
v1.31.0-pre1
v1.31.0-pre2
v1.31.1
v1.32.0
v1.32.0-pre1
v1.33.0
v1.33.0-pre1
v1.33.0-pre2
v1.33.1
v1.33.2
v1.34.0
v1.34.0-pre1
v1.34.1
v1.35.0
v1.35.0-pre1
v1.36.0
v1.36.0-pre1
v1.36.1
v1.36.2
v1.36.3
v1.36.4
v1.37.0
v1.37.0-pre1
v1.37.1
v1.38.0
v1.38.0-pre1
v1.38.1
v1.39.0
v1.39.0-pre1
v1.39.1
v1.4.0
v1.4.0-pre1
v1.4.1
v1.4.2
v1.4.3
v1.4.4
v1.4.5
v1.4.6
v1.4.7
v1.40.0
v1.40.0-pre1
v1.41.0
v1.41.0-pre1
v1.41.0-pre2
v1.41.1
v1.42.0
v1.42.0-pre1
v1.43.0
v1.43.0-pre1
v1.43.2
v1.44.0
v1.44.0-pre1
v1.44.0-pre2
v1.44.1
v1.45.0
v1.45.0-pre1
v1.45.1
v1.45.2
v1.45.3
v1.46.0
v1.46.0-pre1
v1.46.0-pre2
v1.46.1
v1.46.2
v1.46.3
v1.46.4
v1.46.5
v1.46.6
v1.46.7
v1.47.0
v1.47.0-pre1
v1.47.1
v1.47.2
v1.47.3
v1.47.4
v1.47.5
v1.48.0
v1.48.0-pre1
v1.48.1
v1.48.2
v1.48.3
v1.48.4
v1.49.0
v1.49.0-pre1
v1.49.0-pre2
v1.49.0-pre3
v1.49.1
v1.49.2
v1.49.3
v1.49.4
v1.50.0
v1.50.0-pre1
v1.50.1
v1.50.2
v1.51.0
v1.51.0-pre1
v1.51.1
v1.51.2
v1.51.3
v1.52.0
v1.52.0-pre1
v1.52.0-pre2
v1.52.1
v1.52.2
v1.53.0
v1.53.0-pre1
v1.53.0-pre2
v1.53.1
v1.53.2
v1.54.0
v1.54.0-pre1
v1.54.0-pre2
v1.54.1
v1.54.2
v1.54.3
v1.55.0
v1.55.0-pre1
v1.55.0-pre2
v1.55.1
v1.55.3
v1.55.4
v1.56.0
v1.56.0-pre1
v1.56.0-pre2
v1.56.0-pre3
v1.56.1
v1.56.1-pre1
v1.56.2
v1.56.3
v1.56.4
v1.57.0
v1.57.0-pre1
v1.57.1
v1.58.0
v1.58.0-pre1
v1.58.1
v1.58.2
v1.58.3
v1.59.0
v1.59.0-pre1
v1.59.0-pre2
v1.59.1
v1.59.2
v1.59.3
v1.59.4
v1.59.5
v1.6.0
v1.6.0-pre1
v1.6.1
v1.6.2
v1.6.3
v1.6.4
v1.6.5
v1.6.6
v1.6.7
v1.60.0
v1.60.0-pre1
v1.60.1
v1.60.2
v1.61.0
v1.61.0-pre1
v1.61.0-pre2
v1.61.0-pre3
v1.61.1
v1.61.2
v1.61.3
v1.62.0
v1.62.0-pre1
v1.62.1
v1.62.2
v1.62.3
v1.63.0
v1.63.0-pre1
v1.63.0-pre2
v1.63.1
v1.63.2
v1.64.0
v1.64.0-pre1
v1.64.0-pre2
v1.64.1
v1.64.2
v1.64.3
v1.65.0
v1.65.0-pre1
v1.65.0-pre2
v1.65.1
v1.65.2
v1.65.3
v1.65.4
v1.65.5
v1.66.0
v1.66.0-pre1
v1.66.0-pre2
v1.66.0-pre3
v1.66.0-pre4
v1.66.0-pre5
v1.66.1
v1.66.2
v1.67.0
v1.67.0-pre1
v1.67.1
v1.68.0
v1.68.0-pre1
v1.68.1
v1.68.2
v1.69.0-pre1
v1.7.0
v1.7.1
v1.7.2
v1.7.3
v1.8.0
v1.8.0-pre2
v1.8.1
v1.8.2
v1.8.3
v1.8.4
v1.8.5
v1.8.6
v1.9.0
v1.9.0-pre1
v1.9.0-pre2
v1.9.0-pre3
v1.9.1
${ noResults }
5 Commits (a54c7f7266934a567c92d50f42c3a6eda40c2a91)
Author | SHA1 | Message | Date |
---|---|---|---|
Ming Lyu |
c8f467aea9
|
[Bazel] Enable grpcio-reflection to be used via Bazel (#31013)
The current `py_grpc_library` results in the wrong grpc proto python code path when grpc is a third-party source code in a Bazel project. This PR should fix it. fixes #31011 <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. --> --------- Co-authored-by: Richard Belleville <rbellevi@google.com> |
1 year ago |
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. |
2 years ago |
Yijie Ma |
10001d16a9
|
[Release] Upmerge v1.55.x branch into master (#33277)
Change was created by the release automation script. See go/grpc-release <!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. --> --------- Co-authored-by: Yash Tibrewal <yashkt@google.com> Co-authored-by: Esun Kim <veblush@google.com> Co-authored-by: Mark D. Roth <roth@google.com> Co-authored-by: Yousuk Seung <ysseung@google.com> Co-authored-by: Craig Tiller <ctiller@google.com> Co-authored-by: Richard Belleville <rbellevi@google.com> Co-authored-by: gnossen <gnossen@users.noreply.github.com> |
2 years ago |
Jan Tattermusch |
0f1afec5a8
|
[protobuf] Upgrade third_party/protobuf to 22.x (#32606)
The very non-trivial upgrade of third_party/protobuf to 22.x This PR strives to be as small as possible and many changes that were compatible with protobuf 21.x and didn't have to be merged atomically with the upgrade were already merged. Due to the complexity of the upgrade, this PR wasn't created automatically by a tool, but manually. Subsequent upgraded of third_party/protobuf with our OSS release script should work again once this change is merged. This is best reviewed commit-by-commit, I tried to group changes in logical areas. Notable changes: - the upgrade of third_party/protobuf submodule, the bazel protobuf dependency itself - upgrade of UPB dependency to 22.x (in the past, we used to always upgrade upb to "main", but upb now has release branch as well). UPB needs to be upgraded atomically with protobuf since there's a de-facto circular dependency (new protobuf depends on new upb, which depends on new protobuf for codegen). - some protobuf and upb bazel rules are now aliases, so ` extract_metadata_from_bazel_xml.py` and `gen_upb_api_from_bazel_xml.py` had to be modified to be able to follow aliases and reach the actual aliased targets. - some protobuf public headers were renamed, so especially `src/compiler` needed to be updated to use the new headers. - protobuf and upb now both depend on utf8_range project, so since we bundle upb with grpc in some languages, we now have to bundle utf8_range as well (hence changes in build for python, PHP, objC, cmake etc). - protoc now depends on absl and utf8_range (previously protobuf had absl dependency, but not for the codegen part), so python's make_grpcio_tools.py required partial rewrite to be able to handle those dependencies in the grpcio_tools build. - many updates and fixes required for C++ distribtests (currently they all pass, but we'll probably need to follow up, make protobuf's and grpc's handling of dependencies more aligned and revisit the distribtests) - bunch of other changes mostly due to overhaul of protobuf's and upb's internal build layout. TODOs: - [DONE] make sure IWYU and clang_tidy_code pass - create a list of followups (e.g. work to reenable the few tests I had to disable and to remove workaround I had to use) - [DONE in cl/523706129] figure out problem(s) with internal import --------- Co-authored-by: Craig Tiller <ctiller@google.com> |
2 years ago |
Richard Belleville |
f688f5fcf2
|
Rehome python bazel distribtest (#29275)
* WIP * Test multiple languages * Yapf * isort * Shellcheck * comment not provided * Fix import ordering issue. * Turn up Bazel logging |
3 years ago |
Thomas Köppe |
90a56a3d15
|
[bazel/protobuf.bzl] Improve py_proto_library path handling (#28040)
This change replaces the simple `basename` logic with a more general "remove prefix" logic. This allows py_proto_library to work even when the input proto_library's sources are contained in strict subdirectories of their package. (This situation is not uncommon when using remote, non-Bazel repositories that only get a single BUILD file.) |
3 years ago |
Richard Belleville |
eab375e439
|
Reland #27275 (#27806)
* Revert "Revert "Add Aspects to Bazel py_proto_library and py_grpc_library Rules (#27275)" (#27805)"
This reverts commit
|
3 years ago |
Craig Tiller |
763e5b40f3
|
Revert "Add Aspects to Bazel py_proto_library and py_grpc_library Rules (#27275)" (#27805)
This reverts commit
|
3 years ago |
Michael Beardsworth |
e970b8fa03
|
Add Aspects to Bazel py_proto_library and py_grpc_library Rules (#27275)
* Move most py_proto_library macro contents into rule. The _generate_pb2_src rule is modified to produce a valid PyInfo provider that can be depended on directly by py_.* rules. Keeping an intermediate macro in place increases complexity without adding any real value. * Move most py_grpc_library macro contents into rule. The _generate_pb2_grpc_src rule is modified to produce a valid PyInfo provider that can be depended on directly by py_.* rules. Keeping an intermediate macro in place increase complexity without adding any real value. * Remove support for additional plugins. It's easy enough for a plugin author to build their own rule-set, and it adds extra unused (and untested) complexity to gRPC's rules. * Rewrite py_proto_library to track dependencies correctly. * Propagate Python dependencies of py_grpc_library rules to consumers. * Add test coverage for aspect-based py_proto_library. |
3 years ago |
Richard Belleville |
25d8458721
|
Migrate remaining tests with protobuf dep to Python 3 only (#27776)
* Migrate remaining tests with protobuf dep to Python 3 only * Move Bazel Python repo tests off of Python 2 * Format |
3 years ago |
Matt Wilson | 594e1f6a64 |
py_proto_library uses workspace and pkg paths
All python imports currently are added to the runfiles under __main__ which is only the default when no workspace name is provided. This change supports both empty workspace names, and specified workspace names. This also supports python libs not anchored at root |
5 years ago |
Yannic Bonenberger | 06ecc87290 |
[bazel] Add fixes for --incompatible_load_proto_rules_from_bzl
|
5 years ago |
Lidi Zheng | c34bef4ca4 |
Format all Bazel files with buildifier
|
5 years ago |
vam-google | 91c0d093bd |
Fix unnecessary dependency and add new line
|
5 years ago |
vam-google | 5d9eeb34fc |
Address PR feedback. Also add a dummy plugin.
|
5 years ago |
vam-google | dbe62a6e6c |
Switch to `py2and3_test` rule from py_test
|
5 years ago |
vam-google | 564dc771dc |
Return PyInfo provider with imports from _gen rules and pass that as deps in py_library. This allows hiding _virtual_imports include path from the surface.
|
5 years ago |
vam | 461c053c37 |
[bazel][python] Support _virtual_imports input for py_proto_library and py_grpc_library rules
`proto_library` targets are used as deps for `py_proto_library` and `py_grpc_library` rules. The `proto_library` targets can be configured using `import_prefix` and/or `strip_import_prefix` (which essentially move original location of the proto file and, as result, affects import path within proto files themselves and in the generated language-specific stubs). The biggest question to answer when generating stubs from moved protos is where to put result (this decision affects all downstream rules as well, because the location of file affects its import path). This PR tries to follow same logic as the native `cc_proto_library` (created and maintained by Bazel team). For example, if we have `firestore.proto` file, which is located under `google/firestore/v1beta1` Bazel package and want to move it under `google/cloud/firestore_v1beta1/proto` (this is axactly what happens in googleapis repository), it can be configured the following way: ```bzl proto_library( name = "firestore_moved_proto", srcs = ["firestore.proto"], import_prefix = "google/cloud/firestore_v1beta1/proto", strip_import_prefix = "google/firestore/v1beta1", ) ``` The rule above will first generate virtual `.proto` files (under new location) and only after that generate a binary descriptor from them. Specifically it will generate the following "virtual" file under `_virtual_imports` subdirectory of same package: ``` bazel-bin/google/firestore/v1beta1/_virtual_imports/firestore_moved_proto/google/cloud/firestore_v1beta1/proto/common.proto ``` When supplied to `cc_proto_library`, like the following: ```bzl cc_proto_library( name = "firestore_moved_cc_proto", deps = ["firestore_moved_proto"], ) ``` The rule will generate .cc and .h files like the following: ``` bazel-bin/google/firestore/v1beta1/_virtual_imports/firestore_moved_proto/google/cloud/firestore_v1beta1/proto/firestore.pb.h bazel-bin/google/firestore/v1beta1/_virtual_imports/firestore_moved_proto/google/cloud/firestore_v1beta1/proto/firestore.pb.cc ``` Notice, that each generated `.cc` and `.h` file is prefixed with `_virtual_imports/<name_of_proto_library_target>`. The python rules try to do same thing, so for the following py_proto_library rule: ```bzl py_proto_library( name = "firestore_moved_py_proto", deps = [":firestore_moved_proto"], ) ``` It wil generate the following file: ``` bazel-bin/google/firestore/v1beta1/_virtual_imports/firestore_moved_proto/google/cloud/firestore_v1beta1/proto/firestore_pb2.py ``` I.e in same path as cc_proto_library. This all woks, but an annoying part is that to use the generated library in some other py_library, in needs to specify the "_virtual_imports/proto_target" path as its "includes" parameter (and I can't make it better than that). Another option would be to skeep the `_virtual_imports/<name_of_proto_library_target>` the suffix for the generated python stubs, which will make the path look like the following: ``` bazel-bin/google/firestore/v1beta1/google/cloud/firestore_v1beta1/proto/firestore_pb2.py ``` That will make using generated stubs simpler and cleaner (no need to specify imports argument), but it will make it inconsistent with the other rules (like cc_proto_library) and also more susseptible to naming conflicts (if there is already something under the generated path). |
5 years ago |
Richard Belleville | 8ce740cfe0 |
Switch py_proto_library from using src to deps to conform with google3
|
5 years ago |
Richard Belleville | 835b3d3293 |
Copyright.
|
5 years ago |
Richard Belleville | 7b2c8c27b0 |
Separate py_grpc_library and py_proto_library.
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. |
5 years ago |