Compare commits
52 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
1d85b01fc1 | |
|
|
17d9ce26e4 | |
|
|
02384e3918 | |
|
|
bcc62b00b9 | |
|
|
bbeafc7ee8 | |
|
|
18dda3c586 | |
|
|
cdc97245c7 | |
|
|
dc2d5f447c | |
|
|
1d85d9f7b9 | |
|
|
3a1aaa4279 | |
|
|
8147f9e647 | |
|
|
36bfe355da | |
|
|
420ed4bd5a | |
|
|
af855eb64e | |
|
|
218146b83c | |
|
|
3bfe761a6e | |
|
|
90b0ea387e | |
|
|
dc4e17f9cc | |
|
|
fc302e37f2 | |
|
|
2c03f37c47 | |
|
|
2e9625d4da | |
|
|
3f072f44cb | |
|
|
ae50337551 | |
|
|
fd1889564f | |
|
|
aff8712136 | |
|
|
30ec4bc93e | |
|
|
d6f7a8f942 | |
|
|
0553241986 | |
|
|
c34b22eda3 | |
|
|
2e696fa051 | |
|
|
2d9bdfc048 | |
|
|
b9f099b98e | |
|
|
a672e22bd1 | |
|
|
ae5ee43667 | |
|
|
5c53533a1d | |
|
|
3618772809 | |
|
|
53d69cc581 | |
|
|
93692265b0 | |
|
|
0172cd96f6 | |
|
|
c828f70902 | |
|
|
2d25d83cf2 | |
|
|
c697d4bfe9 | |
|
|
d0f397841a | |
|
|
22d4401efc | |
|
|
80a429899d | |
|
|
0da56bcc0e | |
|
|
4870127fb2 | |
|
|
31a829787b | |
|
|
730599bd5b | |
|
|
99c5319a76 | |
|
|
4d118154a9 | |
|
|
a4c35cb5ff |
|
|
@ -12,7 +12,7 @@
|
|||
---
|
||||
# TODO(yannic): Ideally, we should also enable buildifier and all platforms should test `//...`.
|
||||
tasks:
|
||||
ubuntu2004:
|
||||
ubuntu1804:
|
||||
build_targets:
|
||||
- //:all
|
||||
- //src/proto/...
|
||||
|
|
|
|||
|
|
@ -14,12 +14,10 @@ third_party/envoy-api
|
|||
third_party/googleapis
|
||||
third_party/googletest
|
||||
third_party/opencensus-proto
|
||||
third_party/opentelemetry-cpp
|
||||
third_party/protobuf
|
||||
third_party/protoc-gen-validate
|
||||
third_party/re2
|
||||
third_party/upb
|
||||
third_party/utf8_range
|
||||
third_party/xds
|
||||
|
||||
test/distrib/bazel/cpp
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
7.1.0
|
||||
|
|
@ -5,6 +5,9 @@ DerivePointerAlignment: false
|
|||
PointerAlignment: Left
|
||||
IncludeBlocks: Regroup
|
||||
IncludeCategories:
|
||||
# port_platform.h is before almost everything
|
||||
- Regex: '^<grpc/(support|impl/codegen)/port_platform.h>'
|
||||
Priority: -100
|
||||
# ruby.h is even more first if it's included
|
||||
- Regex: '^<ruby/ruby.h>'
|
||||
Priority: -200
|
||||
|
|
@ -27,7 +30,7 @@ IncludeCategories:
|
|||
# not-grpc headers follow
|
||||
# first, non system headers that are included like <> - these are all
|
||||
# local carveouts, and get sorted below c++ but before non grpc "" files
|
||||
- Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)'
|
||||
- Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|benchmark/|google/)'
|
||||
Priority: 30
|
||||
# first C system headers - they have a . in the filename
|
||||
- Regex: '^<.*\.'
|
||||
|
|
@ -43,8 +46,4 @@ Language: ObjC
|
|||
BasedOnStyle: Google
|
||||
ColumnLimit: 100
|
||||
ObjCBlockIndentWidth: 2
|
||||
---
|
||||
Language: Proto
|
||||
BasedOnStyle: Google
|
||||
ColumnLimit: 100
|
||||
...
|
||||
|
|
|
|||
42
.clang-tidy
42
.clang-tidy
|
|
@ -1,42 +1,34 @@
|
|||
---
|
||||
# Note on checks are disabled on purpose
|
||||
#
|
||||
# - abseil-cleanup-ctad
|
||||
# Requires C++17 and higher.
|
||||
#
|
||||
# - abseil-no-namespace
|
||||
# https://bugs.llvm.org/show_bug.cgi?id=47947
|
||||
#
|
||||
# - bugprone-exception-escape
|
||||
# https://github.com/llvm/llvm-project/issues/54668 (seems to be fixed in LLVM17)
|
||||
#
|
||||
# - bugprone-reserved-identifier
|
||||
# Some macros need to be defined for portability purpose; e.g. _BSD_SOURCE.
|
||||
#
|
||||
# - google-upgrade-googletest-case
|
||||
# This requires googletest 1.10 which is higher than ones installed on many linux distributions.
|
||||
#
|
||||
# - modernize-redundant-void-arg
|
||||
# Some source should be strictly C99 and func(void) should be used.
|
||||
#
|
||||
# - google-readability-casting
|
||||
# https://github.com/llvm/llvm-project/issues/57959
|
||||
#
|
||||
# Note on checks which will be enabled in future. These are good to have but
|
||||
# it's not activated yet due to the existing issues with the checks.
|
||||
# Once those issues are clear, these checks can be enabled later.
|
||||
#
|
||||
# - bugprone-assignment-in-if-condition
|
||||
# - bugprone-branch-clone
|
||||
# - bugprone-easily-swappable-parameters
|
||||
# - bugprone-easily-swappable-parameters,
|
||||
# - bugprone-implicit-widening-of-multiplication-result
|
||||
# - bugprone-infinite-loop
|
||||
# - bugprone-narrowing-conversions
|
||||
# - bugprone-not-null-terminated-result
|
||||
# - bugprone-signed-char-misuse
|
||||
# - bugprone-sizeof-expression
|
||||
# - bugprone-switch-missing-default-case
|
||||
# - bugprone-too-small-loop-variable
|
||||
# - bugprone-unchecked-optional-access
|
||||
# - clang-diagnostic-deprecated-declarations
|
||||
# - clang-diagnostic-unused-function
|
||||
# - google-readability-avoid-underscore-in-googletest-name
|
||||
# - google-runtime-int
|
||||
# - google-runtime-references
|
||||
# - modernize-avoid-bind
|
||||
|
|
@ -51,27 +43,20 @@
|
|||
# - modernize-use-equals-default
|
||||
# - modernize-use-equals-delete
|
||||
# - modernize-use-using
|
||||
# - performance-avoid-endl
|
||||
# - performance-no-automatic-move
|
||||
# - performance-no-int-to-ptr
|
||||
# - performance-noexcept-swap
|
||||
# - performance-unnecessary-copy-initialization
|
||||
# - performance-unnecessary-value-param
|
||||
# - readability-else-after-return
|
||||
# - readability-implicit-bool-conversion
|
||||
# - readability-redundant-declaration
|
||||
# - readability-redundant-string-cstr
|
||||
#
|
||||
Checks: '-*,
|
||||
abseil-*,
|
||||
-abseil-cleanup-ctad,
|
||||
-abseil-no-namespace,
|
||||
bugprone-*,
|
||||
-bugprone-assignment-in-if-condition,
|
||||
-bugprone-branch-clone,
|
||||
-bugprone-easily-swappable-parameters,
|
||||
-bugprone-empty-catch,
|
||||
-bugprone-exception-escape,
|
||||
-bugprone-implicit-widening-of-multiplication-result,
|
||||
-bugprone-infinite-loop,
|
||||
-bugprone-narrowing-conversions,
|
||||
|
|
@ -79,21 +64,17 @@ Checks: '-*,
|
|||
-bugprone-reserved-identifier,
|
||||
-bugprone-signed-char-misuse,
|
||||
-bugprone-sizeof-expression,
|
||||
-bugprone-switch-missing-default-case,
|
||||
-bugprone-too-small-loop-variable,
|
||||
-bugprone-unchecked-optional-access,
|
||||
google-*,
|
||||
-google-readability-casting,
|
||||
-google-readability-avoid-underscore-in-googletest-name,
|
||||
-google-runtime-int,
|
||||
-google-runtime-references,
|
||||
-google-upgrade-googletest-case,
|
||||
performance-*,
|
||||
-performance-avoid-endl,
|
||||
-performance-no-automatic-move,
|
||||
-performance-no-int-to-ptr,
|
||||
-performance-noexcept-swap,
|
||||
-performance-unnecessary-copy-initialization,
|
||||
-performance-unnecessary-value-param,
|
||||
clang-diagnostic-deprecated-declarations,
|
||||
clang-diagnostic-deprecated-register,
|
||||
clang-diagnostic-expansion-to-defined,
|
||||
clang-diagnostic-ignored-attributes,
|
||||
|
|
@ -127,22 +108,17 @@ Checks: '-*,
|
|||
modernize-use-nullptr,
|
||||
modernize-use-override,
|
||||
modernize-use-transparent-functors,
|
||||
readability-braces-around-statements,
|
||||
readability-const-return-type,
|
||||
readability-container-size-empty,
|
||||
readability-delete-null-pointer,
|
||||
readability-deleted-default,
|
||||
readability-duplicate-include,
|
||||
readability-function-size,
|
||||
readability-inconsistent-declaration-parameter-name,
|
||||
readability-misleading-indentation,
|
||||
readability-misplaced-array-index,
|
||||
readability-redundant-access-specifiers,
|
||||
readability-redundant-control-flow,
|
||||
readability-redundant-function-ptr-dereference,
|
||||
readability-redundant-smartptr-get,
|
||||
-readability-redundant-string-cstr,
|
||||
readability-redundant-string-init,
|
||||
readability-simplify-boolean-expr,
|
||||
readability-static-definition-in-anonymous-namespace,
|
||||
readability-string-compare,
|
||||
|
|
@ -155,7 +131,5 @@ CheckOptions:
|
|||
value: 'absl::make_unique'
|
||||
- key: modernize-make-unique.MakeSmartPtrFunctionHeader
|
||||
value: 'absl/memory/memory.h'
|
||||
- key: readability-braces-around-statements.ShortStatementLines
|
||||
- key: google-readability-braces-around-statements.ShortStatementLines
|
||||
value: 1
|
||||
- key: readability-simplify-boolean-expr.SimplifyDeMorgan
|
||||
value: false
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
bazel-bin
|
||||
bazel-grpc
|
||||
bazel-out
|
||||
build
|
||||
.cache
|
||||
.git
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# .git-blame-ignore-revs
|
||||
# Migrated python code style from yapf to black
|
||||
de6ed9ba9fd59f753bbfd4c9a88ff15e03a89de7
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
src/core/ext/upb-gen/** linguist-generated=true
|
||||
src/core/ext/upbdefs-gen/** linguist-generated=true
|
||||
src/core/ext/upb-generated/** linguist-generated=true
|
||||
src/core/ext/upbdefs-generated/** linguist-generated=true
|
||||
Makefile linguist-generated=true
|
||||
BUILD.gn linguist-generated=true
|
||||
CMakeLists.txt linguist-generated=true
|
||||
|
|
@ -12,30 +12,22 @@ gRPC-ProtoRPC.podspec linguist-generated=true
|
|||
gRPC-RxLibrary.podspec linguist-generated=true
|
||||
gRPC.podspec linguist-generated=true
|
||||
grpc.gemspec linguist-generated=true
|
||||
grpc.gyp linguist-generated=true
|
||||
grpc.def linguist-generated=true
|
||||
package.xml linguist-generated=true
|
||||
Package.swift linguist-generated=true
|
||||
binding.gyp linguist-generated=true
|
||||
src/python/grpcio/grpc_core_dependencies.py linguist-generated=true
|
||||
src/ruby/ext/grpc/rb_grpc_imports.generated.h linguist-generated=true
|
||||
src/ruby/ext/grpc/rb_grpc_imports.generated.c linguist-generated=true
|
||||
include/grpc/module.modulemap linguist-generated=true
|
||||
test/core/end2end/end2end_tests.cc linguist-generated=true
|
||||
test/core/security/grpc_tls_credentials_options_comparator_test.cc linguist-generated=true
|
||||
tools/doxygen/Doxyfile.c++ linguist-generated=true
|
||||
test/core/surface/public_headers_must_be_c89.c linguist-generated=true
|
||||
tools/doxygen/Doxyfile.c++.internal linguist-generated=true
|
||||
tools/doxygen/Doxyfile.core linguist-generated=true
|
||||
tools/doxygen/Doxyfile.core.internal linguist-generated=true
|
||||
tools/run_tests/sources_and_headers.json linguist-generated=true
|
||||
tools/run_tests/tests.json linguist-generated=true
|
||||
tools/run_tests/generated/tests.json linguist-generated=true
|
||||
tools/run_tests/generated/sources_and_headers.json linguist-generated=true
|
||||
src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h linguist-generated=true
|
||||
src/core/telemetry/stats_data.h linguist-generated=true
|
||||
src/core/telemetry/stats_data.cc linguist-generated=true
|
||||
src/core/lib/experiments/experiments.h linguist-generated=true
|
||||
src/core/lib/experiments/experiments.cc linguist-generated=true
|
||||
bazel/experiments.bzl linguist-generated=true
|
||||
test/cpp/microbenchmarks/huffman_geometries/** linguist-generated=true
|
||||
doc/trace_flags.md linguist-generated=true
|
||||
src/core/lib/debug/trace_flags.h linguist-generated=true
|
||||
src/core/lib/debug/trace_flags.cc linguist-generated=true
|
||||
src/python/grpcio_observability/observability_lib_deps.py linguist-generated=true
|
||||
src/core/lib/transport/static_metadata.h linguist-generated=true
|
||||
src/core/lib/transport/static_metadata.cc linguist-generated=true
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
/bazel/** @veblush @gnossen
|
||||
/bazel/experiments.yaml
|
||||
/cmake/** @veblush @apolcyn
|
||||
/src/core/client_channel/** @markdroth
|
||||
/src/core/ext/transport/chttp2/transport/** @ctiller
|
||||
/src/core/load_balancing/** @markdroth
|
||||
/src/core/resolver/** @markdroth
|
||||
/src/core/server/xds* @markdroth
|
||||
/src/core/service_config/** @markdroth
|
||||
/src/core/xds/** @markdroth
|
||||
/tools/dockerfile/** @drfloob @apolcyn @gnossen
|
||||
/tools/run_tests/xds_k8s_test_driver/** @sergiitk @XuanWang-Amos @gnossen
|
||||
# Auto-generated by the tools/mkowners/mkowners.py tool
|
||||
# Uses OWNERS files in different modules throughout the
|
||||
# repository as the source of truth for module ownership.
|
||||
/**/OWNERS @markdroth @nicolasnoble @a11r @ctiller
|
||||
/bazel/** @nicolasnoble @jtattermusch @veblush @gnossen @ctiller
|
||||
/cmake/** @jtattermusch @nicolasnoble @apolcyn
|
||||
/src/core/ext/filters/client_channel/** @markdroth
|
||||
/src/core/ext/xds/** @markdroth
|
||||
/tools/dockerfile/** @jtattermusch @apolcyn @nicolasnoble
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
name: Report a gRPC Core bug
|
||||
about: Create a report to help us improve
|
||||
labels: kind/bug, priority/P2, lang/core, untriaged
|
||||
assignees: yashykt
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
name: Report a gRPC C++ bug
|
||||
about: Create a report to help us improve
|
||||
labels: kind/bug, priority/P2, lang/c++, untriaged
|
||||
assignees: yashykt
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
name: Report a gRPC C# bug
|
||||
about: Create a report to help us improve
|
||||
labels: kind/bug, priority/P2, lang/C#
|
||||
assignees: apolcyn
|
||||
assignees: jtattermusch
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
name: Report a gRPC Python bug
|
||||
about: Create a report to help us improve
|
||||
labels: kind/bug, priority/P2, lang/Python
|
||||
assignees:
|
||||
- gnossen
|
||||
- XuanWang-Amos
|
||||
assignees: gnossen
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
name: Request a cleanup
|
||||
about: Suggest a cleanup in our repository
|
||||
labels: kind/internal cleanup, priority/P2, untriaged
|
||||
labels: kind/internal cleanup, priority/P2
|
||||
assignees: yashykt
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
name: Request a feature
|
||||
about: Suggest an idea for this project
|
||||
labels: kind/enhancement, priority/P2
|
||||
assignees: yashykt
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
PLEASE DO NOT POST A QUESTION HERE.
|
||||
This form is for bug reports and feature requests ONLY!
|
||||
|
||||
For general questions and troubleshooting, please ask/look for answers at StackOverflow, with "grpc" tag: https://stackoverflow.com/questions/tagged/grpc
|
||||
|
||||
For questions that specifically need to be answered by gRPC team members, please ask/look for answers at grpc.io mailing list: https://groups.google.com/forum/#!forum/grpc-io
|
||||
|
||||
Issues specific to *grpc-java*, *grpc-go*, *grpc-node*, *grpc-dart*, *grpc-web* should be created in the repository they belong to (e.g. https://github.com/grpc/grpc-LANGUAGE/issues/new)
|
||||
-->
|
||||
|
||||
### Is your feature request related to a problem? Please describe.
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
### Describe the solution you'd like
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
### Describe alternatives you've considered
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
### Additional context
|
||||
Add any other context about the feature request here.
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
---
|
||||
name: Request a gRPC Core feature
|
||||
about: Suggest an idea for this project
|
||||
labels: kind/enhancement, priority/P2, lang/core, untriaged
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
PLEASE DO NOT POST A QUESTION HERE.
|
||||
This form is for bug reports and feature requests ONLY!
|
||||
|
||||
For general questions and troubleshooting, please ask/look for answers at StackOverflow, with "grpc" tag: https://stackoverflow.com/questions/tagged/grpc
|
||||
|
||||
For questions that specifically need to be answered by gRPC team members, please ask/look for answers at grpc.io mailing list: https://groups.google.com/forum/#!forum/grpc-io
|
||||
|
||||
Issues specific to *grpc-java*, *grpc-go*, *grpc-node*, *grpc-dart*, *grpc-web* should be created in the repository they belong to (e.g. https://github.com/grpc/grpc-LANGUAGE/issues/new)
|
||||
-->
|
||||
|
||||
### Is your feature request related to a problem? Please describe.
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
### Describe the solution you'd like
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
### Describe alternatives you've considered
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
### Additional context
|
||||
Add any other context about the feature request here.
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
---
|
||||
name: Request a gRPC C++ feature
|
||||
about: Suggest an idea for this project
|
||||
labels: kind/enhancement, priority/P2, lang/c++, untriaged
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
PLEASE DO NOT POST A QUESTION HERE.
|
||||
This form is for bug reports and feature requests ONLY!
|
||||
|
||||
For general questions and troubleshooting, please ask/look for answers at StackOverflow, with "grpc" tag: https://stackoverflow.com/questions/tagged/grpc
|
||||
|
||||
For questions that specifically need to be answered by gRPC team members, please ask/look for answers at grpc.io mailing list: https://groups.google.com/forum/#!forum/grpc-io
|
||||
|
||||
Issues specific to *grpc-java*, *grpc-go*, *grpc-node*, *grpc-dart*, *grpc-web* should be created in the repository they belong to (e.g. https://github.com/grpc/grpc-LANGUAGE/issues/new)
|
||||
-->
|
||||
|
||||
### Is your feature request related to a problem? Please describe.
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
### Describe the solution you'd like
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
### Describe alternatives you've considered
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
### Additional context
|
||||
Add any other context about the feature request here.
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
---
|
||||
name: Request a gRPC C# feature
|
||||
about: Suggest an idea for this project
|
||||
labels: kind/enhancement, priority/P2, lang/C#
|
||||
assignees: apolcyn
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
PLEASE DO NOT POST A QUESTION HERE.
|
||||
This form is for bug reports and feature requests ONLY!
|
||||
|
||||
For general questions and troubleshooting, please ask/look for answers at StackOverflow, with "grpc" tag: https://stackoverflow.com/questions/tagged/grpc
|
||||
|
||||
For questions that specifically need to be answered by gRPC team members, please ask/look for answers at grpc.io mailing list: https://groups.google.com/forum/#!forum/grpc-io
|
||||
|
||||
Issues specific to *grpc-java*, *grpc-go*, *grpc-node*, *grpc-dart*, *grpc-web* should be created in the repository they belong to (e.g. https://github.com/grpc/grpc-LANGUAGE/issues/new)
|
||||
-->
|
||||
|
||||
### Is your feature request related to a problem? Please describe.
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
### Describe the solution you'd like
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
### Describe alternatives you've considered
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
### Additional context
|
||||
Add any other context about the feature request here.
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
---
|
||||
name: Request a gRPC ObjC feature
|
||||
about: Suggest an idea for this project
|
||||
labels: kind/enhancement, priority/P2, lang/ObjC
|
||||
assignees: dennycd
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
PLEASE DO NOT POST A QUESTION HERE.
|
||||
This form is for bug reports and feature requests ONLY!
|
||||
|
||||
For general questions and troubleshooting, please ask/look for answers at StackOverflow, with "grpc" tag: https://stackoverflow.com/questions/tagged/grpc
|
||||
|
||||
For questions that specifically need to be answered by gRPC team members, please ask/look for answers at grpc.io mailing list: https://groups.google.com/forum/#!forum/grpc-io
|
||||
|
||||
Issues specific to *grpc-java*, *grpc-go*, *grpc-node*, *grpc-dart*, *grpc-web* should be created in the repository they belong to (e.g. https://github.com/grpc/grpc-LANGUAGE/issues/new)
|
||||
-->
|
||||
|
||||
### Is your feature request related to a problem? Please describe.
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
### Describe the solution you'd like
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
### Describe alternatives you've considered
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
### Additional context
|
||||
Add any other context about the feature request here.
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
---
|
||||
name: Request a gRPC PHP feature
|
||||
about: Suggest an idea for this project
|
||||
labels: kind/enhancement, priority/P2, lang/php
|
||||
assignees: stanley-cheung
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
PLEASE DO NOT POST A QUESTION HERE.
|
||||
This form is for bug reports and feature requests ONLY!
|
||||
|
||||
For general questions and troubleshooting, please ask/look for answers at StackOverflow, with "grpc" tag: https://stackoverflow.com/questions/tagged/grpc
|
||||
|
||||
For questions that specifically need to be answered by gRPC team members, please ask/look for answers at grpc.io mailing list: https://groups.google.com/forum/#!forum/grpc-io
|
||||
|
||||
Issues specific to *grpc-java*, *grpc-go*, *grpc-node*, *grpc-dart*, *grpc-web* should be created in the repository they belong to (e.g. https://github.com/grpc/grpc-LANGUAGE/issues/new)
|
||||
-->
|
||||
|
||||
### Is your feature request related to a problem? Please describe.
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
### Describe the solution you'd like
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
### Describe alternatives you've considered
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
### Additional context
|
||||
Add any other context about the feature request here.
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
---
|
||||
name: Request a gRPC Python feature
|
||||
about: Suggest an idea for this project
|
||||
labels: kind/enhancement, priority/P2, lang/Python
|
||||
assignees:
|
||||
- gnossen
|
||||
- XuanWang-Amos
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
PLEASE DO NOT POST A QUESTION HERE.
|
||||
This form is for bug reports and feature requests ONLY!
|
||||
|
||||
For general questions and troubleshooting, please ask/look for answers at StackOverflow, with "grpc" tag: https://stackoverflow.com/questions/tagged/grpc
|
||||
|
||||
For questions that specifically need to be answered by gRPC team members, please ask/look for answers at grpc.io mailing list: https://groups.google.com/forum/#!forum/grpc-io
|
||||
|
||||
Issues specific to *grpc-java*, *grpc-go*, *grpc-node*, *grpc-dart*, *grpc-web* should be created in the repository they belong to (e.g. https://github.com/grpc/grpc-LANGUAGE/issues/new)
|
||||
-->
|
||||
|
||||
### Is your feature request related to a problem? Please describe.
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
### Describe the solution you'd like
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
### Describe alternatives you've considered
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
### Additional context
|
||||
Add any other context about the feature request here.
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
---
|
||||
name: Request a gRPC Ruby feature
|
||||
about: Suggest an idea for this project
|
||||
labels: kind/enhancement, priority/P2, lang/ruby
|
||||
assignees: apolcyn
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
PLEASE DO NOT POST A QUESTION HERE.
|
||||
This form is for bug reports and feature requests ONLY!
|
||||
|
||||
For general questions and troubleshooting, please ask/look for answers at StackOverflow, with "grpc" tag: https://stackoverflow.com/questions/tagged/grpc
|
||||
|
||||
For questions that specifically need to be answered by gRPC team members, please ask/look for answers at grpc.io mailing list: https://groups.google.com/forum/#!forum/grpc-io
|
||||
|
||||
Issues specific to *grpc-java*, *grpc-go*, *grpc-node*, *grpc-dart*, *grpc-web* should be created in the repository they belong to (e.g. https://github.com/grpc/grpc-LANGUAGE/issues/new)
|
||||
-->
|
||||
|
||||
### Is your feature request related to a problem? Please describe.
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
### Describe the solution you'd like
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
### Describe alternatives you've considered
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
### Additional context
|
||||
Add any other context about the feature request here.
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
name: Ask a question
|
||||
about: Ask a question
|
||||
labels: kind/question, priority/P3, untriaged
|
||||
labels: kind/question, priority/P3
|
||||
assignees: yashykt
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2020 The gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -e
|
||||
|
||||
if [ $# -lt 1 ];then
|
||||
echo "Usage: $0 github-id"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Change repo manager to $1"
|
||||
|
||||
BASE_PATH=$(dirname $0)
|
||||
|
||||
for file in bug_report_core.md bug_report_cpp.md cleanup_request.md feature_request.md question.md
|
||||
do
|
||||
sed -i".bak" -E "s/assignees: ([a-zA-Z0-9-]+)/assignees: $1/" "$BASE_PATH/ISSUE_TEMPLATE/$file"
|
||||
rm "$BASE_PATH/ISSUE_TEMPLATE/$file.bak"
|
||||
done
|
||||
|
||||
sed -i".bak" -E "s/^@([a-zA-Z0-9-]+)/@$1/" "$BASE_PATH/pull_request_template.md"
|
||||
rm "$BASE_PATH/pull_request_template.md.bak"
|
||||
|
||||
echo "Done"
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
|
|
@ -1,65 +1,15 @@
|
|||
lang/core:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- src/abseil-cpp/**
|
||||
- src/boringssl/**
|
||||
- src/c-ares/**
|
||||
- src/core/**
|
||||
- src/proto/**
|
||||
- src/re2/**
|
||||
- src/upb/**
|
||||
- src/zlib/**
|
||||
- include/grpc/**
|
||||
- test/core/**
|
||||
- tools/codegen/core/**
|
||||
- src/core/**
|
||||
- include/grpc/**
|
||||
- test/core/**
|
||||
- tools/codegen/core/**
|
||||
|
||||
lang/c++:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- examples/cpp/**
|
||||
- src/cpp/**
|
||||
- include/grpc++/**
|
||||
- include/grpcpp/**
|
||||
- test/cpp/**
|
||||
- src/cpp/**
|
||||
- include/grpc++/**
|
||||
- include/grpcpp/**
|
||||
- test/cpp/**
|
||||
|
||||
area/infra:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- .github/**
|
||||
lang/node:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- examples/node/**
|
||||
- src/compiler/node*
|
||||
lang/ObjC:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- examples/objective-c/**
|
||||
- src/compiler/objective_c*
|
||||
- src/objective-c/**
|
||||
lang/php:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- examples/php/**
|
||||
- src/compiler/php*
|
||||
- src/php/**
|
||||
lang/python:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- bazel/python_rules.bzl
|
||||
- examples/python/**
|
||||
- requirements.bazel.txt
|
||||
- src/compiler/python*
|
||||
- all-globs-to-any-file:
|
||||
- src/python/**
|
||||
- '!src/python/grpcio/grpc_core_dependencies.py'
|
||||
- '!src/python/grpcio_observability/observability_lib_deps.py'
|
||||
lang/ruby:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- examples/ruby/**
|
||||
- src/compiler/ruby*
|
||||
- src/ruby/**
|
||||
'lang/C#':
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- src/compiler/csharp*
|
||||
- src/csharp/**
|
||||
- .github/**
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,6 @@ mergeable:
|
|||
- must_exclude:
|
||||
regex: '^disposition/DO NOT MERGE'
|
||||
message: 'Pull request marked not mergeable'
|
||||
- must_exclude:
|
||||
regex: '^disposition/Needs Internal Changes'
|
||||
message: 'Pull request must be cherrypicked. Remove this label when ready to merge.'
|
||||
- or:
|
||||
- and:
|
||||
- must_include:
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"LABEL": {
|
||||
"name": "PR title format",
|
||||
"color": "EEEEEE"
|
||||
},
|
||||
"CHECKS": {
|
||||
"regexp": "^((\\[[^\\]]+\\])+|Revert|Automated fix for) ",
|
||||
"regexpFlags": "i",
|
||||
"ignoreLabels": []
|
||||
},
|
||||
"MESSAGES": {
|
||||
"success": "All OK",
|
||||
"failure": "PR title should be like this: '[component] Brief summary'",
|
||||
"notice": ""
|
||||
}
|
||||
}
|
||||
|
|
@ -3,11 +3,9 @@
|
|||
|
||||
<!--
|
||||
|
||||
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.
|
||||
Your pull request will be routed to the following person by default for triaging.
|
||||
If you know who should review your pull request, please remove the mentioning below.
|
||||
|
||||
-->
|
||||
|
||||
@yashykt
|
||||
|
|
|
|||
|
|
@ -1,60 +1,43 @@
|
|||
name: PR AutoFix
|
||||
on: [push]
|
||||
permissions: {}
|
||||
jobs:
|
||||
PRAutoFix:
|
||||
permissions:
|
||||
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
|
||||
contents: write # to create branch (peter-evans/create-pull-request)
|
||||
pull-requests: write # to create a PR (peter-evans/create-pull-request)
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Cache bazel build
|
||||
- name: Get current time
|
||||
uses: srfrnk/current-time@5a4163ad035ccd9a407ec9e519c3b6ba1b633d1e # v1.1.0
|
||||
uses: srfrnk/current-time@master
|
||||
id: current-time
|
||||
with:
|
||||
format: YYYYWW
|
||||
- name: Get current time
|
||||
uses: srfrnk/current-time@5a4163ad035ccd9a407ec9e519c3b6ba1b633d1e # v1.1.0
|
||||
id: current-time-with-day
|
||||
with:
|
||||
format: YYYYWWd
|
||||
- name: Cache bazel
|
||||
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: bazel-cache
|
||||
with:
|
||||
path: ~/.cache/bazel
|
||||
# formattedTime here is like 2021323 - the year concatenated with the week then
|
||||
# the day of that week.
|
||||
# As this changes every day, we cycle to a new cache once per day, with lookup
|
||||
# across the week (and then the year).
|
||||
key: ${{ runner.os }}-${{ steps.current-time-with-day.outputs.formattedTime }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ steps.current-time.outputs.formattedTime }}
|
||||
${{ runner.os }}-
|
||||
# formattedTime here is like 202132 - the year concatenated with the week
|
||||
# as this changes every week, we cycle to a new cache once per week.
|
||||
key: ${{ runner.os }}-${{ steps.current-time.outputs.formattedTime }}
|
||||
# Cancel current runs if they're still running
|
||||
# (saves processing on fast pushes)
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
|
||||
uses: styfle/cancel-workflow-action@0.9.1
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
# Allow opt-out for some users
|
||||
- name: Should I Stay Or Should I Go
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||
uses: actions/github-script@v4
|
||||
id: check
|
||||
with:
|
||||
script: |
|
||||
// If you'd like not to run this code on your commits, add your github user id here:
|
||||
const NO_AUTOFIX_USERS = ["copybara-service[bot]"];
|
||||
const { owner, repo } = context.repo;
|
||||
console.log("Actor: " + context.actor);
|
||||
NO_AUTOFIX_USERS = []
|
||||
const { owner, repo } = context.repo
|
||||
if (NO_AUTOFIX_USERS.includes(context.actor)) {
|
||||
console.log('Cancelling');
|
||||
const run_id = "${{ github.run_id }}";
|
||||
await github.rest.actions.cancelWorkflowRun({ owner, repo, run_id });
|
||||
await github.actions.cancelWorkflowRun({ owner, repo, run_id });
|
||||
return 'go';
|
||||
} else {
|
||||
return 'stay';
|
||||
|
|
@ -66,31 +49,27 @@ jobs:
|
|||
run: test "${{ steps.check.outputs.result }}" = "stay"
|
||||
# Setup to run sanity suite
|
||||
- name: Install Python Interpreter
|
||||
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install Python Packages
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pyyaml mako virtualenv
|
||||
sudo apt-get update
|
||||
sudo apt-get install python3-dev
|
||||
sudo apt-get install python-dev
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: True
|
||||
- name: Get the upstream code
|
||||
run: |
|
||||
cd ${{ github.workspace }}
|
||||
git remote add upstream https://github.com/grpc/grpc
|
||||
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 upstream master
|
||||
fetch-depth: 0
|
||||
# Run the things!
|
||||
- name: clang-tidy fixes
|
||||
run: ANDROID_NDK_HOME= ${{ github.workspace }}/tools/distrib/clang_tidy_code.sh --fix --only-changed || true
|
||||
run: ${{ github.workspace }}/tools/distrib/clang_tidy_code.sh --fix --only-changed || true
|
||||
- name: Run sanitize
|
||||
run: ANDROID_NDK_HOME= ${{ github.workspace }}/tools/distrib/sanitize.sh
|
||||
run: ${{ github.workspace }}/tools/distrib/sanitize.sh
|
||||
# Report back with a PR if things are broken
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
delete-branch: true
|
||||
branch-suffix: short-commit-hash
|
||||
|
|
|
|||
|
|
@ -1,19 +1,12 @@
|
|||
name: PR Auto Tag
|
||||
name: PR AutoTag
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened, synchronize, edited]
|
||||
permissions:
|
||||
contents: read # to determine modified files (actions/labeler)
|
||||
|
||||
types: [opened, reopened, synchronized, edited]
|
||||
jobs:
|
||||
triage:
|
||||
permissions:
|
||||
contents: read # to determine modified files (actions/labeler)
|
||||
pull-requests: write # to add labels to PRs (actions/labeler)
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
|
||||
- uses: actions/labeler@v3
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
sync-labels: false
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# C/C++ build outputs
|
||||
.build/
|
||||
build/
|
||||
bins
|
||||
gens
|
||||
libs
|
||||
|
|
@ -17,14 +16,13 @@ cython_debug/
|
|||
dist/
|
||||
htmlcov/
|
||||
py3*/
|
||||
pyb/
|
||||
python_build/
|
||||
python_pylint_venv/
|
||||
src/python/grpcio_*/=*
|
||||
src/python/grpcio_*/build/
|
||||
src/python/grpcio_*/LICENSE
|
||||
src/python/grpcio_status/grpc_status/google/rpc/status.proto
|
||||
black_virtual_environment/
|
||||
isort_virtual_environment/
|
||||
yapf_virtual_environment/
|
||||
|
||||
# Node installation output
|
||||
node_modules
|
||||
|
|
@ -55,7 +53,6 @@ coverage
|
|||
|
||||
# vim temp files
|
||||
.*.swp
|
||||
.*.swo
|
||||
|
||||
# Makefile's cache
|
||||
cache.mk
|
||||
|
|
@ -146,15 +143,11 @@ perf.data.old
|
|||
bm_diff_new/
|
||||
bm_diff_old/
|
||||
bm_*.json
|
||||
bloat_diff_new/
|
||||
bloat_diff_old/
|
||||
bloaty-build/
|
||||
|
||||
# cmake build files
|
||||
**/cmake/build/
|
||||
|
||||
# Visual Studio Code artifacts
|
||||
.cache/*
|
||||
.vscode/*
|
||||
.history/
|
||||
|
||||
|
|
@ -174,13 +167,3 @@ compile_commands.json
|
|||
compile_commands_for_iwyu.json
|
||||
iwyu.out
|
||||
iwyu_files.txt
|
||||
iwyu_files0.txt
|
||||
iwyu/
|
||||
iwyu_build/
|
||||
|
||||
# fuzzer logs
|
||||
fuzz-*.log
|
||||
|
||||
# bazel module files (MODULE.bazel will need to be removed here)
|
||||
MODULE.bazel
|
||||
MODULE.bazel.lock
|
||||
|
|
|
|||
|
|
@ -1,45 +1,3 @@
|
|||
[submodule "third_party/abseil-cpp"]
|
||||
path = third_party/abseil-cpp
|
||||
url = https://github.com/abseil/abseil-cpp.git
|
||||
[submodule "third_party/benchmark"]
|
||||
path = third_party/benchmark
|
||||
url = https://github.com/google/benchmark
|
||||
[submodule "third_party/bloaty"]
|
||||
path = third_party/bloaty
|
||||
url = https://github.com/google/bloaty.git
|
||||
[submodule "third_party/boringssl-with-bazel"]
|
||||
path = third_party/boringssl-with-bazel
|
||||
url = https://github.com/google/boringssl.git
|
||||
[submodule "third_party/cares/cares"]
|
||||
path = third_party/cares/cares
|
||||
url = https://github.com/c-ares/c-ares.git
|
||||
[submodule "third_party/envoy-api"]
|
||||
path = third_party/envoy-api
|
||||
url = https://github.com/envoyproxy/data-plane-api.git
|
||||
[submodule "third_party/googleapis"]
|
||||
path = third_party/googleapis
|
||||
url = https://github.com/googleapis/googleapis.git
|
||||
[submodule "third_party/googletest"]
|
||||
path = third_party/googletest
|
||||
url = https://github.com/google/googletest.git
|
||||
[submodule "third_party/opencensus-proto"]
|
||||
path = third_party/opencensus-proto
|
||||
url = https://github.com/census-instrumentation/opencensus-proto.git
|
||||
[submodule "third_party/opentelemetry"]
|
||||
path = third_party/opentelemetry
|
||||
url = https://github.com/open-telemetry/opentelemetry-proto.git
|
||||
[submodule "third_party/protobuf"]
|
||||
path = third_party/protobuf
|
||||
url = https://github.com/protocolbuffers/protobuf.git
|
||||
[submodule "third_party/protoc-gen-validate"]
|
||||
path = third_party/protoc-gen-validate
|
||||
url = https://github.com/envoyproxy/protoc-gen-validate.git
|
||||
[submodule "third_party/re2"]
|
||||
path = third_party/re2
|
||||
url = https://github.com/google/re2.git
|
||||
[submodule "third_party/xds"]
|
||||
path = third_party/xds
|
||||
url = https://github.com/cncf/xds.git
|
||||
[submodule "third_party/zlib"]
|
||||
path = third_party/zlib
|
||||
url = https://github.com/madler/zlib
|
||||
|
|
@ -47,6 +5,50 @@
|
|||
# generated file that makes Git consider the submodule dirty. This
|
||||
# state can be ignored for day-to-day development on gRPC.
|
||||
ignore = dirty
|
||||
[submodule "third_party/opentelemetry-cpp"]
|
||||
path = third_party/opentelemetry-cpp
|
||||
url = https://github.com/open-telemetry/opentelemetry-cpp
|
||||
[submodule "third_party/protobuf"]
|
||||
path = third_party/protobuf
|
||||
url = https://github.com/protocolbuffers/protobuf.git
|
||||
[submodule "third_party/googletest"]
|
||||
path = third_party/googletest
|
||||
url = https://github.com/google/googletest.git
|
||||
[submodule "third_party/benchmark"]
|
||||
path = third_party/benchmark
|
||||
url = https://github.com/google/benchmark
|
||||
[submodule "third_party/boringssl-with-bazel"]
|
||||
path = third_party/boringssl-with-bazel
|
||||
url = https://github.com/google/boringssl.git
|
||||
[submodule "third_party/re2"]
|
||||
path = third_party/re2
|
||||
url = https://github.com/google/re2.git
|
||||
[submodule "third_party/cares/cares"]
|
||||
path = third_party/cares/cares
|
||||
url = https://github.com/c-ares/c-ares.git
|
||||
branch = cares-1_17_2
|
||||
[submodule "third_party/bloaty"]
|
||||
path = third_party/bloaty
|
||||
url = https://github.com/google/bloaty.git
|
||||
[submodule "third_party/abseil-cpp"]
|
||||
path = third_party/abseil-cpp
|
||||
url = https://github.com/abseil/abseil-cpp.git
|
||||
branch = lts_2020_02_25
|
||||
[submodule "third_party/envoy-api"]
|
||||
path = third_party/envoy-api
|
||||
url = https://github.com/envoyproxy/data-plane-api.git
|
||||
[submodule "third_party/googleapis"]
|
||||
path = third_party/googleapis
|
||||
url = https://github.com/googleapis/googleapis.git
|
||||
[submodule "third_party/protoc-gen-validate"]
|
||||
path = third_party/protoc-gen-validate
|
||||
url = https://github.com/envoyproxy/protoc-gen-validate.git
|
||||
[submodule "third_party/libuv"]
|
||||
path = third_party/libuv
|
||||
url = https://github.com/libuv/libuv.git
|
||||
[submodule "third_party/opencensus-proto"]
|
||||
path = third_party/opencensus-proto
|
||||
url = https://github.com/census-instrumentation/opencensus-proto.git
|
||||
[submodule "third_party/opentelemetry"]
|
||||
path = third_party/opentelemetry
|
||||
url = https://github.com/open-telemetry/opentelemetry-proto.git
|
||||
[submodule "third_party/xds"]
|
||||
path = third_party/xds
|
||||
url = https://github.com/cncf/xds.git
|
||||
|
|
|
|||
|
|
@ -97,7 +97,5 @@ disable=
|
|||
useless-object-inheritance,
|
||||
# NOTE(lidiz): the import order will be enforced by isort instead
|
||||
wrong-import-order,
|
||||
# TODO(https://github.com/PyCQA/pylint/issues/3882): Upgrade Pylint
|
||||
unsubscriptable-object,
|
||||
# NOTE(sergiitk): yapf compatibility, ref #25071
|
||||
bad-continuation,
|
||||
|
|
|
|||
|
|
@ -100,9 +100,5 @@ disable=
|
|||
useless-object-inheritance,
|
||||
# NOTE(lidiz): the import order will be enforced by isort instead
|
||||
wrong-import-order,
|
||||
# TODO(https://github.com/PyCQA/pylint/issues/3882): Upgrade Pylint
|
||||
unsubscriptable-object,
|
||||
# NOTE(rbellevi): Pylint doesn't understand .pyi files.
|
||||
no-member,
|
||||
# NOTE(sergiitk): yapf compatibility, ref #25071
|
||||
bad-continuation,
|
||||
|
|
|
|||
|
|
@ -126,7 +126,5 @@ disable=
|
|||
useless-object-inheritance,
|
||||
# NOTE(lidiz): the import order will be enforced by isort instead
|
||||
wrong-import-order,
|
||||
# TODO(https://github.com/PyCQA/pylint/issues/3882): Upgrade Pylint
|
||||
unsubscriptable-object,
|
||||
# NOTE(sergiitk): yapf compatibility, ref #25071
|
||||
bad-continuation,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
git:
|
||||
depth: 1
|
||||
language: objective-c
|
||||
osx_image: xcode7.3
|
||||
env:
|
||||
global:
|
||||
- CONFIG=opt
|
||||
- TEST=objc
|
||||
- JOBS=1
|
||||
matrix:
|
||||
- SCHEME="RxLibraryUnitTests"
|
||||
WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
|
||||
INTEROP_SERVER="false"
|
||||
- SCHEME="InteropTestsLocalSSL"
|
||||
WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
|
||||
INTEROP_SERVER="true"
|
||||
- SCHEME="InteropTestsLocalCleartext"
|
||||
WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
|
||||
INTEROP_SERVER="true"
|
||||
# TODO(jcanizales): Make tests an app project (instead of library), so the following will work.
|
||||
# - SCHEME="InteropTestsRemote"
|
||||
# WORKSPACE="Tests.xcworkspace" TEST_PATH="src/objective-c/tests" BUILD_ONLY="false"
|
||||
# INTEROP_SERVER="true"
|
||||
- SCHEME="HelloWorld"
|
||||
WORKSPACE="HelloWorld.xcworkspace" TEST_PATH="examples/objective-c/helloworld"
|
||||
BUILD_ONLY="true" INTEROP_SERVER="false"
|
||||
- SCHEME="RouteGuideClient"
|
||||
WORKSPACE="RouteGuideClient.xcworkspace" TEST_PATH="examples/objective-c/route_guide"
|
||||
BUILD_ONLY="true" INTEROP_SERVER="false"
|
||||
- SCHEME="AuthSample"
|
||||
WORKSPACE="AuthSample.xcworkspace" TEST_PATH="examples/objective-c/auth_sample"
|
||||
BUILD_ONLY="true" INTEROP_SERVER="false"
|
||||
- SCHEME="Sample"
|
||||
WORKSPACE="Sample.xcworkspace" TEST_PATH="src/objective-c/examples/Sample" BUILD_ONLY="true"
|
||||
INTEROP_SERVER="false"
|
||||
- SCHEME="Sample"
|
||||
WORKSPACE="Sample.xcworkspace" TEST_PATH="src/objective-c/examples/Sample" BUILD_ONLY="true"
|
||||
INTEROP_SERVER="false" FRAMEWORKS="YES"
|
||||
- SCHEME="SwiftSample"
|
||||
WORKSPACE="SwiftSample.xcworkspace" TEST_PATH="src/objective-c/examples/SwiftSample"
|
||||
BUILD_ONLY="true" INTEROP_SERVER="false"
|
||||
before_install:
|
||||
# Until Travis upgrades from Cocoapods 0.39, we need to do it here.
|
||||
- pod --version
|
||||
- gem uninstall cocoapods -a
|
||||
- gem install cocoapods -v '1.0.1'
|
||||
- pod --version
|
||||
# Recent pods aren't found if we don't explicitly update Cocoapods' repo.
|
||||
- pod repo update
|
||||
install:
|
||||
- pushd $TEST_PATH
|
||||
- pod install
|
||||
- popd
|
||||
before_script:
|
||||
- if [ "${INTEROP_SERVER}" = "true" ]; then
|
||||
make interop_server;
|
||||
(bins/$CONFIG/interop_server --port=5050 &);
|
||||
(bins/$CONFIG/interop_server --port=5051 --use_tls &);
|
||||
fi
|
||||
script:
|
||||
- if [ "${BUILD_ONLY}" = "true" ]; then
|
||||
xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
|
||||
-sdk iphonesimulator9.3 build;
|
||||
else
|
||||
xctool -workspace "$TEST_PATH/$WORKSPACE" -scheme "$SCHEME"
|
||||
-sdk iphonesimulator9.3 test;
|
||||
fi
|
||||
notifications:
|
||||
email: false
|
||||
25
BUILDING.md
25
BUILDING.md
|
|
@ -1,8 +1,8 @@
|
|||
gRPC C++ - Building from source
|
||||
===========================
|
||||
|
||||
This document has detailed instructions on how to build gRPC C++ from source. Note that it only covers the build of gRPC itself and is meant for gRPC C++ contributors and/or power users.
|
||||
Other should follow the user instructions. See the [How to use](https://github.com/grpc/grpc/tree/master/src/cpp#to-start-using-grpc-c) instructions for guidance on how to add gRPC as a dependency to a C++ application (there are several ways and system-wide installation is often not the best choice).
|
||||
This document has detailed instructions on how to build gRPC C++ from source. Note that it only covers the build of gRPC itself and is mostly meant for gRPC C++ contributors and/or power users.
|
||||
Other should follow the user instructions. See the [How to use](https://github.com/grpc/grpc/tree/master/src/cpp#to-start-using-grpc-c) instructions for guidance on how to add gRPC as a dependency to a C++ application (there are several ways and system wide installation is often not the best choice).
|
||||
|
||||
# Pre-requisites
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ installed by `brew` is being used:
|
|||
## Windows
|
||||
|
||||
To prepare for cmake + Microsoft Visual C++ compiler build
|
||||
- Install Visual Studio 2019 or later (Visual C++ compiler will be used).
|
||||
- Install Visual Studio 2015 or 2017 (Visual C++ compiler will be used).
|
||||
- Install [Git](https://git-scm.com/).
|
||||
- Install [CMake](https://cmake.org/download/).
|
||||
- Install [nasm](https://www.nasm.us/) and add it to `PATH` (`choco install nasm`) - *required by boringssl*
|
||||
|
|
@ -88,14 +88,14 @@ with something else than `bazel` (e.g. `cmake`).
|
|||
|
||||
# Build from source
|
||||
|
||||
In the C++ world, there's no "standard" build system that would work for all supported use cases and on all supported platforms.
|
||||
In the C++ world, there's no "standard" build system that would work for in all supported use cases and on all supported platforms.
|
||||
Therefore, gRPC supports several major build systems, which should satisfy most users. Depending on your needs
|
||||
we recommend building using `bazel` or `cmake`.
|
||||
|
||||
## Building with bazel (recommended)
|
||||
|
||||
Bazel is the primary build system for gRPC C++. If you're comfortable using bazel, we can certainly recommend it.
|
||||
Using bazel will give you the best developer experience in addition to faster and cleaner builds.
|
||||
Bazel is the primary build system for gRPC C++ and if you're comfortable with using bazel, we can certainly recommend it.
|
||||
Using bazel will give you the best developer experience as well as faster and cleaner builds.
|
||||
|
||||
You'll need `bazel` version `1.0.0` or higher to build gRPC.
|
||||
See [Installing Bazel](https://docs.bazel.build/versions/master/install.html) for instructions how to install bazel on your system.
|
||||
|
|
@ -112,17 +112,14 @@ $ bazel build :all
|
|||
$ bazel test --config=dbg //test/...
|
||||
```
|
||||
|
||||
NOTE: If you're using Bazel 7 or newer and working with gRPC, you'll need to turn off bzlmod.
|
||||
This is because gRPC isn't fully compatible with bzlmod yet. To do this, add --enable_bzlmod=false to your Bazel commands.
|
||||
|
||||
NOTE: If you are a gRPC maintainer and you have access to our test cluster, you should use our [gRPC's Remote Execution environment](tools/remote_build/README.md)
|
||||
NOTE: If you are gRPC maintainer and you have access to our test cluster, you should use the our [gRPC's Remote Execution environment](tools/remote_build/README.md)
|
||||
to get significant improvement to the build and test speed (and a bunch of other very useful features).
|
||||
|
||||
## Building with CMake
|
||||
|
||||
### Linux/Unix, Using Make
|
||||
|
||||
Run from the grpc directory after cloning the repo with --recursive or updating submodules.
|
||||
Run from grpc directory after cloning the repo with --recursive or updating submodules.
|
||||
```
|
||||
$ mkdir -p cmake/build
|
||||
$ cd cmake/build
|
||||
|
|
@ -132,18 +129,18 @@ $ make
|
|||
|
||||
If you want to build shared libraries (`.so` files), run `cmake` with `-DBUILD_SHARED_LIBS=ON`.
|
||||
|
||||
### Windows, Using Visual Studio 2019 or later
|
||||
### Windows, Using Visual Studio 2015 or 2017
|
||||
|
||||
When using the "Visual Studio" generator,
|
||||
cmake will generate a solution (`grpc.sln`) that contains a VS project for
|
||||
every target defined in `CMakeLists.txt` (+ a few extra convenience projects
|
||||
every target defined in `CMakeLists.txt` (+ few extra convenience projects
|
||||
added automatically by cmake). After opening the solution with Visual Studio
|
||||
you will be able to browse and build the code.
|
||||
```
|
||||
> @rem Run from grpc directory after cloning the repo with --recursive or updating submodules.
|
||||
> md .build
|
||||
> cd .build
|
||||
> cmake .. -G "Visual Studio 16 2019"
|
||||
> cmake .. -G "Visual Studio 14 2015"
|
||||
> cmake --build . --config Release
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -1,323 +0,0 @@
|
|||
// swift-tools-version:5.5
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
import PackageDescription
|
||||
import Foundation
|
||||
|
||||
let basePath = "third_party/boringssl-with-bazel"
|
||||
let privacyInfoPath = "../../src/objective-c/PrivacyInfo.xcprivacy"
|
||||
let testPath = "test/boringssl_spm_build"
|
||||
|
||||
|
||||
|
||||
let package = Package(
|
||||
name: "BoringSSL-GRPC",
|
||||
products: [
|
||||
.library(
|
||||
name: "openssl_grpc",
|
||||
targets: ["openssl_grpc"]
|
||||
)
|
||||
],
|
||||
|
||||
targets: [
|
||||
.target(
|
||||
name: "openssl_grpc",
|
||||
path: basePath,
|
||||
exclude: [
|
||||
],
|
||||
|
||||
sources: [
|
||||
"src/crypto/asn1/a_bitstr.c",
|
||||
"src/crypto/asn1/a_bool.c",
|
||||
"src/crypto/asn1/a_d2i_fp.c",
|
||||
"src/crypto/asn1/a_dup.c",
|
||||
"src/crypto/asn1/a_gentm.c",
|
||||
"src/crypto/asn1/a_i2d_fp.c",
|
||||
"src/crypto/asn1/a_int.c",
|
||||
"src/crypto/asn1/a_mbstr.c",
|
||||
"src/crypto/asn1/a_object.c",
|
||||
"src/crypto/asn1/a_octet.c",
|
||||
"src/crypto/asn1/a_strex.c",
|
||||
"src/crypto/asn1/a_strnid.c",
|
||||
"src/crypto/asn1/a_time.c",
|
||||
"src/crypto/asn1/a_type.c",
|
||||
"src/crypto/asn1/a_utctm.c",
|
||||
"src/crypto/asn1/asn1_lib.c",
|
||||
"src/crypto/asn1/asn1_par.c",
|
||||
"src/crypto/asn1/asn_pack.c",
|
||||
"src/crypto/asn1/f_int.c",
|
||||
"src/crypto/asn1/f_string.c",
|
||||
"src/crypto/asn1/posix_time.c",
|
||||
"src/crypto/asn1/tasn_dec.c",
|
||||
"src/crypto/asn1/tasn_enc.c",
|
||||
"src/crypto/asn1/tasn_fre.c",
|
||||
"src/crypto/asn1/tasn_new.c",
|
||||
"src/crypto/asn1/tasn_typ.c",
|
||||
"src/crypto/asn1/tasn_utl.c",
|
||||
"src/crypto/base64/base64.c",
|
||||
"src/crypto/bio/bio.c",
|
||||
"src/crypto/bio/bio_mem.c",
|
||||
"src/crypto/bio/connect.c",
|
||||
"src/crypto/bio/errno.c",
|
||||
"src/crypto/bio/fd.c",
|
||||
"src/crypto/bio/file.c",
|
||||
"src/crypto/bio/hexdump.c",
|
||||
"src/crypto/bio/pair.c",
|
||||
"src/crypto/bio/printf.c",
|
||||
"src/crypto/bio/socket.c",
|
||||
"src/crypto/bio/socket_helper.c",
|
||||
"src/crypto/blake2/blake2.c",
|
||||
"src/crypto/bn_extra/bn_asn1.c",
|
||||
"src/crypto/bn_extra/convert.c",
|
||||
"src/crypto/buf/buf.c",
|
||||
"src/crypto/bytestring/asn1_compat.c",
|
||||
"src/crypto/bytestring/ber.c",
|
||||
"src/crypto/bytestring/cbb.c",
|
||||
"src/crypto/bytestring/cbs.c",
|
||||
"src/crypto/bytestring/unicode.c",
|
||||
"src/crypto/chacha/chacha.c",
|
||||
"src/crypto/cipher_extra/cipher_extra.c",
|
||||
"src/crypto/cipher_extra/derive_key.c",
|
||||
"src/crypto/cipher_extra/e_aesctrhmac.c",
|
||||
"src/crypto/cipher_extra/e_aesgcmsiv.c",
|
||||
"src/crypto/cipher_extra/e_chacha20poly1305.c",
|
||||
"src/crypto/cipher_extra/e_des.c",
|
||||
"src/crypto/cipher_extra/e_null.c",
|
||||
"src/crypto/cipher_extra/e_rc2.c",
|
||||
"src/crypto/cipher_extra/e_rc4.c",
|
||||
"src/crypto/cipher_extra/e_tls.c",
|
||||
"src/crypto/cipher_extra/tls_cbc.c",
|
||||
"src/crypto/conf/conf.c",
|
||||
"src/crypto/cpu_aarch64_apple.c",
|
||||
"src/crypto/cpu_aarch64_fuchsia.c",
|
||||
"src/crypto/cpu_aarch64_linux.c",
|
||||
"src/crypto/cpu_aarch64_openbsd.c",
|
||||
"src/crypto/cpu_aarch64_sysreg.c",
|
||||
"src/crypto/cpu_aarch64_win.c",
|
||||
"src/crypto/cpu_arm_freebsd.c",
|
||||
"src/crypto/cpu_arm_linux.c",
|
||||
"src/crypto/cpu_intel.c",
|
||||
"src/crypto/crypto.c",
|
||||
"src/crypto/curve25519/curve25519.c",
|
||||
"src/crypto/curve25519/curve25519_64_adx.c",
|
||||
"src/crypto/curve25519/spake25519.c",
|
||||
"src/crypto/des/des.c",
|
||||
"src/crypto/dh_extra/dh_asn1.c",
|
||||
"src/crypto/dh_extra/params.c",
|
||||
"src/crypto/digest_extra/digest_extra.c",
|
||||
"src/crypto/dilithium/dilithium.c",
|
||||
"src/crypto/dsa/dsa.c",
|
||||
"src/crypto/dsa/dsa_asn1.c",
|
||||
"src/crypto/ec_extra/ec_asn1.c",
|
||||
"src/crypto/ec_extra/ec_derive.c",
|
||||
"src/crypto/ec_extra/hash_to_curve.c",
|
||||
"src/crypto/ecdh_extra/ecdh_extra.c",
|
||||
"src/crypto/ecdsa_extra/ecdsa_asn1.c",
|
||||
"src/crypto/engine/engine.c",
|
||||
"src/crypto/err/err.c",
|
||||
"src/crypto/evp/evp.c",
|
||||
"src/crypto/evp/evp_asn1.c",
|
||||
"src/crypto/evp/evp_ctx.c",
|
||||
"src/crypto/evp/p_dh.c",
|
||||
"src/crypto/evp/p_dh_asn1.c",
|
||||
"src/crypto/evp/p_dsa_asn1.c",
|
||||
"src/crypto/evp/p_ec.c",
|
||||
"src/crypto/evp/p_ec_asn1.c",
|
||||
"src/crypto/evp/p_ed25519.c",
|
||||
"src/crypto/evp/p_ed25519_asn1.c",
|
||||
"src/crypto/evp/p_hkdf.c",
|
||||
"src/crypto/evp/p_rsa.c",
|
||||
"src/crypto/evp/p_rsa_asn1.c",
|
||||
"src/crypto/evp/p_x25519.c",
|
||||
"src/crypto/evp/p_x25519_asn1.c",
|
||||
"src/crypto/evp/pbkdf.c",
|
||||
"src/crypto/evp/print.c",
|
||||
"src/crypto/evp/scrypt.c",
|
||||
"src/crypto/evp/sign.c",
|
||||
"src/crypto/ex_data.c",
|
||||
"src/crypto/fipsmodule/bcm.c",
|
||||
"src/crypto/fipsmodule/fips_shared_support.c",
|
||||
"src/crypto/hpke/hpke.c",
|
||||
"src/crypto/hrss/hrss.c",
|
||||
"src/crypto/keccak/keccak.c",
|
||||
"src/crypto/kyber/kyber.c",
|
||||
"src/crypto/lhash/lhash.c",
|
||||
"src/crypto/mem.c",
|
||||
"src/crypto/obj/obj.c",
|
||||
"src/crypto/obj/obj_xref.c",
|
||||
"src/crypto/pem/pem_all.c",
|
||||
"src/crypto/pem/pem_info.c",
|
||||
"src/crypto/pem/pem_lib.c",
|
||||
"src/crypto/pem/pem_oth.c",
|
||||
"src/crypto/pem/pem_pk8.c",
|
||||
"src/crypto/pem/pem_pkey.c",
|
||||
"src/crypto/pem/pem_x509.c",
|
||||
"src/crypto/pem/pem_xaux.c",
|
||||
"src/crypto/pkcs7/pkcs7.c",
|
||||
"src/crypto/pkcs7/pkcs7_x509.c",
|
||||
"src/crypto/pkcs8/p5_pbev2.c",
|
||||
"src/crypto/pkcs8/pkcs8.c",
|
||||
"src/crypto/pkcs8/pkcs8_x509.c",
|
||||
"src/crypto/poly1305/poly1305.c",
|
||||
"src/crypto/poly1305/poly1305_arm.c",
|
||||
"src/crypto/poly1305/poly1305_vec.c",
|
||||
"src/crypto/pool/pool.c",
|
||||
"src/crypto/rand_extra/deterministic.c",
|
||||
"src/crypto/rand_extra/forkunsafe.c",
|
||||
"src/crypto/rand_extra/getentropy.c",
|
||||
"src/crypto/rand_extra/ios.c",
|
||||
"src/crypto/rand_extra/passive.c",
|
||||
"src/crypto/rand_extra/rand_extra.c",
|
||||
"src/crypto/rand_extra/trusty.c",
|
||||
"src/crypto/rand_extra/windows.c",
|
||||
"src/crypto/rc4/rc4.c",
|
||||
"src/crypto/refcount.c",
|
||||
"src/crypto/rsa_extra/rsa_asn1.c",
|
||||
"src/crypto/rsa_extra/rsa_crypt.c",
|
||||
"src/crypto/rsa_extra/rsa_print.c",
|
||||
"src/crypto/siphash/siphash.c",
|
||||
"src/crypto/spx/address.c",
|
||||
"src/crypto/spx/fors.c",
|
||||
"src/crypto/spx/merkle.c",
|
||||
"src/crypto/spx/spx.c",
|
||||
"src/crypto/spx/spx_util.c",
|
||||
"src/crypto/spx/thash.c",
|
||||
"src/crypto/spx/wots.c",
|
||||
"src/crypto/stack/stack.c",
|
||||
"src/crypto/thread.c",
|
||||
"src/crypto/thread_none.c",
|
||||
"src/crypto/thread_pthread.c",
|
||||
"src/crypto/thread_win.c",
|
||||
"src/crypto/trust_token/pmbtoken.c",
|
||||
"src/crypto/trust_token/trust_token.c",
|
||||
"src/crypto/trust_token/voprf.c",
|
||||
"src/crypto/x509/a_digest.c",
|
||||
"src/crypto/x509/a_sign.c",
|
||||
"src/crypto/x509/a_verify.c",
|
||||
"src/crypto/x509/algorithm.c",
|
||||
"src/crypto/x509/asn1_gen.c",
|
||||
"src/crypto/x509/by_dir.c",
|
||||
"src/crypto/x509/by_file.c",
|
||||
"src/crypto/x509/i2d_pr.c",
|
||||
"src/crypto/x509/name_print.c",
|
||||
"src/crypto/x509/policy.c",
|
||||
"src/crypto/x509/rsa_pss.c",
|
||||
"src/crypto/x509/t_crl.c",
|
||||
"src/crypto/x509/t_req.c",
|
||||
"src/crypto/x509/t_x509.c",
|
||||
"src/crypto/x509/t_x509a.c",
|
||||
"src/crypto/x509/v3_akey.c",
|
||||
"src/crypto/x509/v3_akeya.c",
|
||||
"src/crypto/x509/v3_alt.c",
|
||||
"src/crypto/x509/v3_bcons.c",
|
||||
"src/crypto/x509/v3_bitst.c",
|
||||
"src/crypto/x509/v3_conf.c",
|
||||
"src/crypto/x509/v3_cpols.c",
|
||||
"src/crypto/x509/v3_crld.c",
|
||||
"src/crypto/x509/v3_enum.c",
|
||||
"src/crypto/x509/v3_extku.c",
|
||||
"src/crypto/x509/v3_genn.c",
|
||||
"src/crypto/x509/v3_ia5.c",
|
||||
"src/crypto/x509/v3_info.c",
|
||||
"src/crypto/x509/v3_int.c",
|
||||
"src/crypto/x509/v3_lib.c",
|
||||
"src/crypto/x509/v3_ncons.c",
|
||||
"src/crypto/x509/v3_ocsp.c",
|
||||
"src/crypto/x509/v3_pcons.c",
|
||||
"src/crypto/x509/v3_pmaps.c",
|
||||
"src/crypto/x509/v3_prn.c",
|
||||
"src/crypto/x509/v3_purp.c",
|
||||
"src/crypto/x509/v3_skey.c",
|
||||
"src/crypto/x509/v3_utl.c",
|
||||
"src/crypto/x509/x509.c",
|
||||
"src/crypto/x509/x509_att.c",
|
||||
"src/crypto/x509/x509_cmp.c",
|
||||
"src/crypto/x509/x509_d2.c",
|
||||
"src/crypto/x509/x509_def.c",
|
||||
"src/crypto/x509/x509_ext.c",
|
||||
"src/crypto/x509/x509_lu.c",
|
||||
"src/crypto/x509/x509_obj.c",
|
||||
"src/crypto/x509/x509_req.c",
|
||||
"src/crypto/x509/x509_set.c",
|
||||
"src/crypto/x509/x509_trs.c",
|
||||
"src/crypto/x509/x509_txt.c",
|
||||
"src/crypto/x509/x509_v3.c",
|
||||
"src/crypto/x509/x509_vfy.c",
|
||||
"src/crypto/x509/x509_vpm.c",
|
||||
"src/crypto/x509/x509cset.c",
|
||||
"src/crypto/x509/x509name.c",
|
||||
"src/crypto/x509/x509rset.c",
|
||||
"src/crypto/x509/x509spki.c",
|
||||
"src/crypto/x509/x_algor.c",
|
||||
"src/crypto/x509/x_all.c",
|
||||
"src/crypto/x509/x_attrib.c",
|
||||
"src/crypto/x509/x_crl.c",
|
||||
"src/crypto/x509/x_exten.c",
|
||||
"src/crypto/x509/x_name.c",
|
||||
"src/crypto/x509/x_pubkey.c",
|
||||
"src/crypto/x509/x_req.c",
|
||||
"src/crypto/x509/x_sig.c",
|
||||
"src/crypto/x509/x_spki.c",
|
||||
"src/crypto/x509/x_val.c",
|
||||
"src/crypto/x509/x_x509.c",
|
||||
"src/crypto/x509/x_x509a.c",
|
||||
"src/gen/crypto/err_data.c",
|
||||
"src/ssl/bio_ssl.cc",
|
||||
"src/ssl/d1_both.cc",
|
||||
"src/ssl/d1_lib.cc",
|
||||
"src/ssl/d1_pkt.cc",
|
||||
"src/ssl/d1_srtp.cc",
|
||||
"src/ssl/dtls_method.cc",
|
||||
"src/ssl/dtls_record.cc",
|
||||
"src/ssl/encrypted_client_hello.cc",
|
||||
"src/ssl/extensions.cc",
|
||||
"src/ssl/handoff.cc",
|
||||
"src/ssl/handshake.cc",
|
||||
"src/ssl/handshake_client.cc",
|
||||
"src/ssl/handshake_server.cc",
|
||||
"src/ssl/s3_both.cc",
|
||||
"src/ssl/s3_lib.cc",
|
||||
"src/ssl/s3_pkt.cc",
|
||||
"src/ssl/ssl_aead_ctx.cc",
|
||||
"src/ssl/ssl_asn1.cc",
|
||||
"src/ssl/ssl_buffer.cc",
|
||||
"src/ssl/ssl_cert.cc",
|
||||
"src/ssl/ssl_cipher.cc",
|
||||
"src/ssl/ssl_credential.cc",
|
||||
"src/ssl/ssl_file.cc",
|
||||
"src/ssl/ssl_key_share.cc",
|
||||
"src/ssl/ssl_lib.cc",
|
||||
"src/ssl/ssl_privkey.cc",
|
||||
"src/ssl/ssl_session.cc",
|
||||
"src/ssl/ssl_stat.cc",
|
||||
"src/ssl/ssl_transcript.cc",
|
||||
"src/ssl/ssl_versions.cc",
|
||||
"src/ssl/ssl_x509.cc",
|
||||
"src/ssl/t1_enc.cc",
|
||||
"src/ssl/tls13_both.cc",
|
||||
"src/ssl/tls13_client.cc",
|
||||
"src/ssl/tls13_enc.cc",
|
||||
"src/ssl/tls13_server.cc",
|
||||
"src/ssl/tls_method.cc",
|
||||
"src/ssl/tls_record.cc",
|
||||
],
|
||||
resources: [
|
||||
.copy(privacyInfoPath),
|
||||
],
|
||||
publicHeadersPath: "src/include",
|
||||
|
||||
cSettings: [
|
||||
.define("OPENSSL_NO_ASM", to: "1"),
|
||||
.headerSearchPath("./"),
|
||||
.headerSearchPath("include/"),
|
||||
]
|
||||
),
|
||||
.testTarget(
|
||||
name: "build-test",
|
||||
dependencies: [
|
||||
"openssl_grpc",
|
||||
],
|
||||
path: testPath
|
||||
),
|
||||
],
|
||||
cxxLanguageStandard: .cxx14
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,137 +0,0 @@
|
|||
# Contributing to gRPC: A Step-By-Step Guide
|
||||
|
||||
Note: This document is not meant for Google employees.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To contribute to the gRPC codebase, you need the following:
|
||||
|
||||
1. An
|
||||
[active GitHub account](https://docs.github.com/en/get-started/quickstart/creating-an-account-on-github)
|
||||
1. [An understanding of Git and GitHub](https://docs.github.com/en/get-started/using-git/about-git)
|
||||
1. [Knowledge of how to fork a repository, clone a repository, merge, rebase,
|
||||
resolve, push, pull, fetch
|
||||
etc.](https://docs.github.com/en/get-started/using-git/about-git)
|
||||
1. [git installed and working on your machine](https://github.com/git-guides/install-git)
|
||||
1. Knowledge of the language being used, which can be C++, Python, Ruby,
|
||||
Objective-C, PHP, or C#.
|
||||
|
||||
## Steps to Contribute gRPC C++ Code
|
||||
|
||||
The GitHub repository for the C-based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
|
||||
is at https://github.com/grpc/grpc.
|
||||
|
||||
### Fork and Clone the Repository
|
||||
|
||||
If you want to contribute to the gRPC code base, you need to make a fork of the
|
||||
repository.
|
||||
|
||||
1. Create your
|
||||
[own fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)
|
||||
from https://github.com/grpc/grpc.
|
||||
|
||||

|
||||
|
||||
1. [Clone your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo#cloning-your-forked-repository)
|
||||
on your local machine.
|
||||
|
||||
### Prepare and Push Your Commit
|
||||
|
||||
1. In your cloned repository, create a new branch from `master`.
|
||||
1. Then prepare a commit for the files that you want to contribute.
|
||||
1. Commit to this branch.
|
||||
1. Push the commit to your fork on GitHub.
|
||||
|
||||
Take care that your commits are aligned with these
|
||||
[guidelines](https://github.com/grpc/grpc/blob/master/CONTRIBUTING.md#guidelines-for-pull-requests).
|
||||
|
||||
### Prepare a Pull Request
|
||||
|
||||
After pushing your commit, visit https://github.com/grpc/grpc . If the
|
||||
forking, branch creation, commit and push have been successful, you will see
|
||||
the following message:
|
||||
|
||||

|
||||
|
||||
Take care to allow edits by maintainers. If there is a specific issue
|
||||
with your pull request, the maintainer can help if needed. This access to help will reduce
|
||||
the turnaround time for your submission.
|
||||
|
||||

|
||||
|
||||
Create a pull request.
|
||||
|
||||
### Pull Request Status - Safe Review
|
||||
|
||||
Once the pull request is ready, you must wait for a reviewer to be
|
||||
assigned to your pull request.
|
||||
|
||||
If you see *Not Covered* in the EasyCLA screen, as shown in the following image,
|
||||
click on the mentioned link to start the authorization process.
|
||||
|
||||

|
||||
|
||||
You will see a series of screens:
|
||||
|
||||
1. Select *Authorize LF-Engineering:
|
||||
|
||||

|
||||
|
||||
1. Select your contributor type:
|
||||
|
||||

|
||||
|
||||
1. Select *SIGN CLA*:
|
||||
|
||||

|
||||
|
||||
Some time after you've digitally signed the document, the EasyCLA will appear as
|
||||
*Covered*.
|
||||
|
||||

|
||||
|
||||
After a few hours, you will notice a new "assignee" assigned to the pull request.
|
||||
|
||||

|
||||
|
||||
After a reviewer is assigned to you, they will help with the next
|
||||
steps, which are as follows:
|
||||
|
||||
1. You complete the code review and address the comments.
|
||||
1. Your reviewer may add a few labels as needed.
|
||||
|
||||
### Pull Request Status - Green
|
||||
|
||||
Once you have approval from the reviewer, check if the tests are running. After
|
||||
the tests are complete, look at the status of all the tests. If
|
||||
everything is green, everything is good. But usually some failures exist. If
|
||||
there are failures, select each failure. The selection will take you to a page
|
||||
that has error details. Try to fix the issue.
|
||||
|
||||
### Pull Request Approval
|
||||
|
||||
For pull requests that are non-trivial, there is a thorough code review process.
|
||||
You can read more about the process and requirements
|
||||
[here](https://github.com/grpc/grpc/blob/master/CONTRIBUTING.md#guidelines-for-pull-requests).
|
||||
|
||||
After you fix the code review, you will finally get an approval. After getting
|
||||
approval, you can submit the pull request.
|
||||
|
||||

|
||||
|
||||
### Submission
|
||||
|
||||
You **cannot** do submission or merge of a pull request through Github.
|
||||
|
||||

|
||||
|
||||
After you have approval from a reviewer, a Google employee will trigger
|
||||
the submission process. When the submission happens:
|
||||
|
||||
1. A commit with your changes, along with a few additional formatting changes, will
|
||||
be committed to the `grpc/master` branch.
|
||||

|
||||
|
||||
1. The pull request you originally created will be closed.
|
||||

|
||||
|
||||
376
LICENSE
376
LICENSE
|
|
@ -235,376 +235,8 @@ THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
Mozilla Public License, v. 2.0
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
||||
This Source Code Form is subject to the terms of the Mozilla Public License,
|
||||
v. 2.0. If a copy of the MPL was not distributed with this file, You can
|
||||
obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
|
|
|||
|
|
@ -8,89 +8,77 @@ See [CONTRIBUTING.md](https://github.com/grpc/grpc-community/blob/master/CONTRIB
|
|||
for general contribution guidelines.
|
||||
|
||||
## Maintainers (in alphabetical order)
|
||||
<!-- go/keep-sorted start case=no -->
|
||||
- [a11r](https://github.com/a11r), Google LLC
|
||||
- [apolcyn](https://github.com/apolcyn), Google LLC
|
||||
- [arjunroy](https://github.com/arjunroy), Google LLC
|
||||
- [AspirinSJL](https://github.com/AspirinSJL), Google LLC
|
||||
- [bogdandrutu](https://github.com/bogdandrutu), Google LLC
|
||||
- [ctiller](https://github.com/ctiller), Google LLC
|
||||
- [daniel-j-born](https://github.com/daniel-j-born), Google LLC
|
||||
- [dapengzhang0](https://github.com/dapengzhang0), Google LLC
|
||||
- [dfawley](https://github.com/dfawley), Google LLC
|
||||
- [dklempner](https://github.com/dklempner), Google LLC
|
||||
- [drfloob](https://github.com/drfloob), Google LLC
|
||||
- [ejona86](https://github.com/ejona86), Google LLC
|
||||
- [ericgribkoff](https://github.com/ericgribkoff), Google LLC
|
||||
- [gnossen](https://github.com/gnossen), Google LLC
|
||||
- [guantaol](https://github.com/guantaol), Google LLC
|
||||
- [hcaseyal](https://github.com/hcaseyal), Google LLC
|
||||
- [jtattermusch](https://github.com/jtattermusch), Google LLC
|
||||
- [kevinnilson](https://github.com/kevinnilson), Google LLC
|
||||
- [LittleCVR](https://github.com/littlecvr), Google LLC
|
||||
- [markdroth](https://github.com/markdroth), Google LLC
|
||||
- [matthewstevenson88](https://github.com/matthewstevenson88), Google LLC
|
||||
- [murgatroid99](https://github.com/murgatroid99), Google LLC
|
||||
- [nanahpang](https://github.com/nanahpang), Google LLC
|
||||
- [pfreixes](https://github.com/pfreixes), Skyscanner Ltd
|
||||
- [ran-su](https://github.com/ran-su), Google LLC
|
||||
- [sanjaypujare](https://github.com/sanjaypujare), Google LLC
|
||||
- [sastryvp](https://github.com/sastryvp), Google LLC
|
||||
- [sergiitk](https://github.com/sergiitk), Google LLC
|
||||
- [soheilhy](https://github.com/soheilhy), Google LLC
|
||||
- [stanley-cheung](https://github.com/stanley-cheung), Google LLC
|
||||
- [thisisnotapril](https://github.com/thisisnotapril), Google LLC
|
||||
- [tjagtap](https://github.com/tjagtap), Google LLC
|
||||
- [veblush](https://github.com/veblush), Google LLC
|
||||
- [vishalpowar](https://github.com/vishalpowar), Google LLC
|
||||
- [wenbozhu](https://github.com/wenbozhu), Google LLC
|
||||
- [yashykt](https://github.com/yashykt), Google LLC
|
||||
- [yijiem](https://github.com/yijiem), Google LLC
|
||||
- [ZhouyihaiDing](https://github.com/ZhouyihaiDing), Google LLC
|
||||
<!-- go/keep-sorted end -->
|
||||
|
||||
## Emeritus Maintainers (in alphabetical order)
|
||||
<!-- go/keep-sorted start case=no -->
|
||||
- [adelez](https://github.com/adelez), Google LLC
|
||||
- [AspirinSJL](https://github.com/AspirinSJL), Google LLC
|
||||
- [billfeng327](https://github.com/billfeng327), Google LLC
|
||||
- [bogdandrutu](https://github.com/bogdandrutu), Google LLC
|
||||
- [dapengzhang0](https://github.com/dapengzhang0), Google LLC
|
||||
- [dgquintas](https://github.com/dgquintas), Google LLC
|
||||
- [ericgribkoff](https://github.com/ericgribkoff), Google LLC
|
||||
- [fengli79](https://github.com/fengli79), Google LLC
|
||||
- [jboeuf](https://github.com/jboeuf), Google LLC
|
||||
- [jcanizales](https://github.com/jcanizales), Google LLC
|
||||
- [jiangtaoli2016](https://github.com/jiangtaoli2016), Google LLC
|
||||
- [jkolhe](https://github.com/jkolhe), Google LLC
|
||||
- [jpalmerLinuxFoundation](https://github.com/jpalmerLinuxFoundation), Linux Foundation
|
||||
- [justinburke](https://github.com/justinburke), Google LLC
|
||||
- [jtattermusch](https://github.com/jtattermusch), Google LLC
|
||||
- [karthikravis](https://github.com/karthikravis), Google LLC
|
||||
- [kpayson64](https://github.com/kpayson64), Google LLC
|
||||
- [kumaralokgithub](https://github.com/kumaralokgithub), Google LLC
|
||||
- [lidizheng](https://github.com/lidizheng), Google LLC
|
||||
- [lyuxuan](https://github.com/lyuxuan), Google LLC
|
||||
- [matt-kwong](https://github.com/matt-kwong), Google LLC
|
||||
- [medinandres](https://github.com/medinandres), Google LLC
|
||||
- [markdroth](https://github.com/markdroth), Google LLC
|
||||
- [matthewstevenson88](https://github.com/matthewstevenson88), Google LLC
|
||||
- [mehrdada](https://github.com/mehrdada), Dropbox, Inc.
|
||||
- [mhaidrygoog](https://github.com/mhaidrygoog), Google LLC
|
||||
- [mit-mit](https://github.com/mit-mit), Google LLC
|
||||
- [mpwarres](https://github.com/mpwarres), Google LLC
|
||||
- [murgatroid99](https://github.com/murgatroid99), Google LLC
|
||||
- [muxi](https://github.com/muxi), Google LLC
|
||||
- [nanahpang](https://github.com/nanahpang), Google LLC
|
||||
- [nathanielmanistaatgoogle](https://github.com/nathanielmanistaatgoogle), Google LLC
|
||||
- [ncteisen](https://github.com/ncteisen), Google LLC
|
||||
- [nicolasnoble](https://github.com/nicolasnoble), Google LLC
|
||||
- [pmarks-net](https://github.com/pmarks-net), Google LLC
|
||||
- [pfreixes](https://github.com/pfreixes), Skyscanner Ltd
|
||||
- [qixuanl1](https://github.com/qixuanl1), Google LLC
|
||||
- [ran-su](https://github.com/ran-su), Google LLC
|
||||
- [rmstar](https://github.com/rmstar), Google LLC
|
||||
- [sanjaypujare](https://github.com/sanjaypujare), Google LLC
|
||||
- [sheenaqotj](https://github.com/sheenaqotj), Google LLC
|
||||
- [slash-lib](https://github.com/slash-lib), Google LLC
|
||||
- [soltanmm](https://github.com/soltanmm), Google LLC
|
||||
- [soheilhy](https://github.com/soheilhy), Google LLC
|
||||
- [sreecha](https://github.com/sreecha), LinkedIn
|
||||
- [srini100](https://github.com/srini100), Google LLC
|
||||
- [summerxyt](https://github.com/summerxyt), Google LLC
|
||||
- [vjpai](https://github.com/vjpai), Google LLC
|
||||
- [stanley-cheung](https://github.com/stanley-cheung), Google LLC
|
||||
- [veblush](https://github.com/veblush), Google LLC
|
||||
- [vishalpowar](https://github.com/vishalpowar), Google LLC
|
||||
- [Vizerai](https://github.com/Vizerai), Google LLC
|
||||
- [vjpai](https://github.com/vjpai), Google LLC
|
||||
- [wcevans](https://github.com/wcevans), Google LLC
|
||||
- [y-zeng](https://github.com/y-zeng), Google LLC
|
||||
- [wenbozhu](https://github.com/wenbozhu), Google LLC
|
||||
- [yang-g](https://github.com/yang-g), Google LLC
|
||||
- [yashykt](https://github.com/yashykt), Google LLC
|
||||
- [yihuazhang](https://github.com/yihuazhang), Google LLC
|
||||
- [zpencer](https://github.com/zpencer), Google LLC
|
||||
- [ZhenLian](https://github.com/ZhenLian), Google LLC
|
||||
<!-- go/keep-sorted end -->
|
||||
- [ZhouyihaiDing](https://github.com/ZhouyihaiDing), Google LLC
|
||||
|
||||
|
||||
## Emeritus Maintainers (in alphabetical order)
|
||||
- [adelez](https://github.com/adelez), Google LLC
|
||||
- [billfeng327](https://github.com/billfeng327), Google LLC
|
||||
- [dgquintas](https://github.com/dgquintas), Google LLC
|
||||
- [fengli79](https://github.com/fengli79), Google LLC
|
||||
- [jcanizales](https://github.com/jcanizales), Google LLC
|
||||
- [jpalmerLinuxFoundation](https://github.com/jpalmerLinuxFoundation), Linux Foundation
|
||||
- [justinburke](https://github.com/justinburke), Google LLC
|
||||
- [kpayson64](https://github.com/kpayson64), Google LLC
|
||||
- [lyuxuan](https://github.com/lyuxuan), Google LLC
|
||||
- [matt-kwong](https://github.com/matt-kwong), Google LLC
|
||||
- [mit-mit](https://github.com/mit-mit), Google LLC
|
||||
- [mpwarres](https://github.com/mpwarres), Google LLC
|
||||
- [ncteisen](https://github.com/ncteisen), Google LLC
|
||||
- [pmarks-net](https://github.com/pmarks-net), Google LLC
|
||||
- [slash-lib](https://github.com/slash-lib), Google LLC
|
||||
- [soltanmm](https://github.com/soltanmm), Google LLC
|
||||
- [summerxyt](https://github.com/summerxyt), Google LLC
|
||||
- [y-zeng](https://github.com/y-zeng), Google LLC
|
||||
- [zpencer](https://github.com/zpencer), Google LLC
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
# Top level ownership
|
||||
@markdroth **/OWNERS
|
||||
@nicolasnoble **/OWNERS
|
||||
@a11r **/OWNERS
|
||||
@ctiller **/OWNERS
|
||||
|
||||
|
|
@ -10,7 +10,6 @@ graft third_party/boringssl-with-bazel
|
|||
graft third_party/cares
|
||||
graft third_party/re2
|
||||
graft third_party/upb
|
||||
graft third_party/utf8_range
|
||||
graft third_party/xxhash
|
||||
graft third_party/zlib
|
||||
include src/python/grpcio/_parallel_compile_patch.py
|
||||
|
|
|
|||
2247
Package.swift
2247
Package.swift
File diff suppressed because it is too large
Load Diff
72
README.md
72
README.md
|
|
@ -26,21 +26,20 @@ runtime comes as a package available in a user's language package manager.
|
|||
For instructions on how to use the language-specific gRPC runtime for a project,
|
||||
please refer to these documents
|
||||
|
||||
- [C++](src/cpp): follow the instructions under the `src/cpp` directory
|
||||
- [C#/.NET](https://github.com/grpc/grpc-dotnet): NuGet packages
|
||||
`Grpc.Net.Client`, `Grpc.AspNetCore.Server`
|
||||
- [Dart](https://github.com/grpc/grpc-dart): pub package `grpc`
|
||||
- [Go](https://github.com/grpc/grpc-go): `go get google.golang.org/grpc`
|
||||
- [Java](https://github.com/grpc/grpc-java): Use JARs from Maven Central
|
||||
Repository
|
||||
- [Kotlin](https://github.com/grpc/grpc-kotlin): Use JARs from Maven Central
|
||||
Repository
|
||||
- [Node](https://github.com/grpc/grpc-node): `npm install @grpc/grpc-js`
|
||||
- [Objective-C](src/objective-c): Add `gRPC-ProtoRPC` dependency to podspec
|
||||
- [PHP](src/php): `pecl install grpc`
|
||||
- [Python](src/python/grpcio): `pip install grpcio`
|
||||
- [Ruby](src/ruby): `gem install grpc`
|
||||
- [WebJS](https://github.com/grpc/grpc-web): follow the grpc-web instructions
|
||||
- [C++](src/cpp): follow the instructions under the `src/cpp` directory
|
||||
- [C#](src/csharp): NuGet package `Grpc`
|
||||
- [Dart](https://github.com/grpc/grpc-dart): pub package `grpc`
|
||||
- [Go](https://github.com/grpc/grpc-go): `go get google.golang.org/grpc`
|
||||
- [Java](https://github.com/grpc/grpc-java): Use JARs from Maven Central
|
||||
Repository
|
||||
- [Kotlin](https://github.com/grpc/grpc-kotlin): Use JARs from Maven Central
|
||||
Repository
|
||||
- [Node](https://github.com/grpc/grpc-node): `npm install grpc`
|
||||
- [Objective-C](src/objective-c): Add `gRPC-ProtoRPC` dependency to podspec
|
||||
- [PHP](src/php): `pecl install grpc`
|
||||
- [Python](src/python/grpcio): `pip install grpcio`
|
||||
- [Ruby](src/ruby): `gem install grpc`
|
||||
- [WebJS](https://github.com/grpc/grpc-web): follow the grpc-web instructions
|
||||
|
||||
Per-language quickstart guides and tutorials can be found in the
|
||||
[documentation section on the grpc.io website](https://grpc.io/docs/). Code
|
||||
|
|
@ -67,7 +66,8 @@ gRPC.
|
|||
|
||||
## Performance
|
||||
|
||||
See the [Performance dashboard](https://grafana-dot-grpc-testing.appspot.com/)
|
||||
See the
|
||||
[Performance dashboard](https://grafana-dot-grpc-testing.appspot.com/)
|
||||
for performance numbers of master branch daily builds.
|
||||
|
||||
## Concepts
|
||||
|
|
@ -77,28 +77,28 @@ See [gRPC Concepts](CONCEPTS.md)
|
|||
## About This Repository
|
||||
|
||||
This repository contains source code for gRPC libraries implemented in multiple
|
||||
languages written on top of a shared C++ core library [src/core](src/core).
|
||||
languages written on top of a shared C core library [src/core](src/core).
|
||||
|
||||
Libraries in different languages may be in various states of development. We are
|
||||
seeking contributions for all of these libraries:
|
||||
|
||||
Language | Source
|
||||
------------------------- | ----------------------------------
|
||||
Shared C++ [core library] | [src/core](src/core)
|
||||
C++ | [src/cpp](src/cpp)
|
||||
Ruby | [src/ruby](src/ruby)
|
||||
Python | [src/python](src/python)
|
||||
PHP | [src/php](src/php)
|
||||
C# (core library based) | [src/csharp](src/csharp)
|
||||
Objective-C | [src/objective-c](src/objective-c)
|
||||
| Language | Source |
|
||||
| ----------------------- | ---------------------------------- |
|
||||
| Shared C [core library] | [src/core](src/core) |
|
||||
| C++ | [src/cpp](src/cpp) |
|
||||
| Ruby | [src/ruby](src/ruby) |
|
||||
| Python | [src/python](src/python) |
|
||||
| PHP | [src/php](src/php) |
|
||||
| C# (core library based) | [src/csharp](src/csharp) |
|
||||
| Objective-C | [src/objective-c](src/objective-c) |
|
||||
|
||||
Language | Source repo
|
||||
-------------------- | --------------------------------------------------
|
||||
Java | [grpc-java](https://github.com/grpc/grpc-java)
|
||||
Kotlin | [grpc-kotlin](https://github.com/grpc/grpc-kotlin)
|
||||
Go | [grpc-go](https://github.com/grpc/grpc-go)
|
||||
NodeJS | [grpc-node](https://github.com/grpc/grpc-node)
|
||||
WebJS | [grpc-web](https://github.com/grpc/grpc-web)
|
||||
Dart | [grpc-dart](https://github.com/grpc/grpc-dart)
|
||||
.NET (pure C# impl.) | [grpc-dotnet](https://github.com/grpc/grpc-dotnet)
|
||||
Swift | [grpc-swift](https://github.com/grpc/grpc-swift)
|
||||
| Language | Source repo |
|
||||
| -------------------- | -------------------------------------------------- |
|
||||
| Java | [grpc-java](https://github.com/grpc/grpc-java) |
|
||||
| Kotlin | [grpc-kotlin](https://github.com/grpc/grpc-kotlin) |
|
||||
| Go | [grpc-go](https://github.com/grpc/grpc-go) |
|
||||
| NodeJS | [grpc-node](https://github.com/grpc/grpc-node) |
|
||||
| WebJS | [grpc-web](https://github.com/grpc/grpc-web) |
|
||||
| Dart | [grpc-dart](https://github.com/grpc/grpc-dart) |
|
||||
| .NET (pure C# impl.) | [grpc-dotnet](https://github.com/grpc/grpc-dotnet) |
|
||||
| Swift | [grpc-swift](https://github.com/grpc/grpc-swift) |
|
||||
|
|
|
|||
178
Rakefile
178
Rakefile
|
|
@ -4,7 +4,6 @@ require 'rspec/core/rake_task'
|
|||
require 'rubocop/rake_task'
|
||||
require 'bundler/gem_tasks'
|
||||
require 'fileutils'
|
||||
require 'tmpdir'
|
||||
|
||||
require_relative 'build_config.rb'
|
||||
|
||||
|
|
@ -29,16 +28,17 @@ Rake::ExtensionTask.new('grpc_c', spec) do |ext|
|
|||
ext.lib_dir = File.join('src', 'ruby', 'lib', 'grpc')
|
||||
ext.cross_compile = true
|
||||
ext.cross_platform = [
|
||||
'x86-mingw32', 'x64-mingw32', 'x64-mingw-ucrt',
|
||||
'x86_64-linux', 'x86-linux', 'aarch64-linux',
|
||||
'x86-mingw32', 'x64-mingw32',
|
||||
'x86_64-linux', 'x86-linux',
|
||||
'x86_64-darwin', 'arm64-darwin',
|
||||
'universal-darwin'
|
||||
]
|
||||
ext.cross_compiling do |spec|
|
||||
spec.files = spec.files.select {
|
||||
|file| file.start_with?(
|
||||
"src/ruby/bin/", "src/ruby/ext/", "src/ruby/lib/", "src/ruby/pb/")
|
||||
}
|
||||
spec.files += %w( etc/roots.pem grpc_c.32-msvcrt.ruby grpc_c.64-msvcrt.ruby grpc_c.64-ucrt.ruby )
|
||||
spec.files += %w( etc/roots.pem grpc_c.32.ruby grpc_c.64.ruby )
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -86,16 +86,13 @@ task 'dlls', [:plat] do |t, args|
|
|||
nproc_override = ENV['GRPC_RUBY_BUILD_PROCS'] || `nproc`.strip
|
||||
plat_list = args[:plat]
|
||||
|
||||
build_configs = [
|
||||
{ cross: 'x86_64-w64-mingw32', out: 'grpc_c.64-ucrt.ruby', platform: 'x64-mingw-ucrt' },
|
||||
{ cross: 'x86_64-w64-mingw32', out: 'grpc_c.64-msvcrt.ruby', platform: 'x64-mingw32' },
|
||||
{ cross: 'i686-w64-mingw32', out: 'grpc_c.32-msvcrt.ruby', platform: 'x86-mingw32' }
|
||||
]
|
||||
selected_build_configs = []
|
||||
build_configs.each do |config|
|
||||
build_configs = []
|
||||
w64 = { cross: 'x86_64-w64-mingw32', out: 'grpc_c.64.ruby', platform: 'x64-mingw32' }
|
||||
w32 = { cross: 'i686-w64-mingw32', out: 'grpc_c.32.ruby', platform: 'x86-mingw32' }
|
||||
[w64, w32].each do |config|
|
||||
if plat_list.include?(config[:platform])
|
||||
# build the DLL (as grpc_c.*.ruby)
|
||||
selected_build_configs.append(config)
|
||||
build_configs.append(config)
|
||||
else
|
||||
# create an empty grpc_c.*.ruby file as a placeholder
|
||||
FileUtils.touch config[:out]
|
||||
|
|
@ -104,11 +101,12 @@ task 'dlls', [:plat] do |t, args|
|
|||
|
||||
env = 'CPPFLAGS="-D_WIN32_WINNT=0x600 -DNTDDI_VERSION=0x06000000 -DUNICODE -D_UNICODE -Wno-unused-variable -Wno-unused-result -DCARES_STATICLIB -Wno-error=conversion -Wno-sign-compare -Wno-parentheses -Wno-format -DWIN32_LEAN_AND_MEAN" '
|
||||
env += 'CFLAGS="-Wno-incompatible-pointer-types" '
|
||||
env += 'CXXFLAGS="-std=c++14 -fno-exceptions" '
|
||||
env += 'CXXFLAGS="-std=c++11 -fno-exceptions" '
|
||||
env += 'LDFLAGS=-static '
|
||||
env += 'SYSTEM=MINGW32 '
|
||||
env += 'EMBED_ZLIB=true '
|
||||
env += 'EMBED_OPENSSL=true '
|
||||
env += 'EMBED_CARES=true '
|
||||
env += 'BUILDDIR=/tmp '
|
||||
env += "V=#{verbose} "
|
||||
env += "GRPC_RUBY_BUILD_PROCS=#{nproc_override} "
|
||||
|
|
@ -123,7 +121,7 @@ task 'dlls', [:plat] do |t, args|
|
|||
prepare_ccache_cmd += "export PATH=\"$PATH:/usr/local/bin\" && "
|
||||
prepare_ccache_cmd += "source tools/internal_ci/helper_scripts/prepare_ccache_symlinks_rc "
|
||||
|
||||
selected_build_configs.each do |opt|
|
||||
build_configs.each do |opt|
|
||||
env_comp = "CC=#{opt[:cross]}-gcc "
|
||||
env_comp += "CXX=#{opt[:cross]}-g++ "
|
||||
env_comp += "LD=#{opt[:cross]}-gcc "
|
||||
|
|
@ -143,94 +141,88 @@ task 'gem:native', [:plat] do |t, args|
|
|||
verbose = ENV['V'] || '0'
|
||||
|
||||
grpc_config = ENV['GRPC_CONFIG'] || 'opt'
|
||||
ruby_cc_versions = ['3.3.0', '3.2.0', '3.1.0', '3.0.0', '2.7.0'].join(':')
|
||||
ruby_cc_versions = ['3.1.0', '3.0.0', '2.7.0', '2.6.0', '2.5.0'].join(':')
|
||||
selected_plat = "#{args[:plat]}"
|
||||
|
||||
# use env variable to set artifact build paralellism
|
||||
nproc_override = ENV['GRPC_RUBY_BUILD_PROCS'] || `nproc`.strip
|
||||
if RUBY_PLATFORM =~ /darwin/
|
||||
if !selected_plat.empty? && selected_plat != 'darwin'
|
||||
fail "Cannot pass platform as an argument when on Darwin."
|
||||
end
|
||||
|
||||
# propagate env variables with ccache configuration to the rake-compiler-dock docker container
|
||||
# and setup ccache symlinks as needed.
|
||||
prepare_ccache_cmd = "export GRPC_BUILD_ENABLE_CCACHE=\"#{ENV.fetch('GRPC_BUILD_ENABLE_CCACHE', '')}\" && "
|
||||
prepare_ccache_cmd += "export CCACHE_SECONDARY_STORAGE=\"#{ENV.fetch('CCACHE_SECONDARY_STORAGE', '')}\" && "
|
||||
prepare_ccache_cmd += "export PATH=\"$PATH:/usr/local/bin\" && "
|
||||
prepare_ccache_cmd += "source tools/internal_ci/helper_scripts/prepare_ccache_symlinks_rc "
|
||||
|
||||
supported_windows_platforms = ['x86-mingw32', 'x64-mingw32', 'x64-mingw-ucrt']
|
||||
supported_unix_platforms = ['x86_64-linux', 'x86-linux', 'aarch64-linux', 'x86_64-darwin', 'arm64-darwin']
|
||||
supported_platforms = supported_windows_platforms + supported_unix_platforms
|
||||
|
||||
if selected_plat.empty?
|
||||
# build everything
|
||||
windows_platforms = supported_windows_platforms
|
||||
unix_platforms = supported_unix_platforms
|
||||
FileUtils.touch 'grpc_c.32.ruby'
|
||||
FileUtils.touch 'grpc_c.64.ruby'
|
||||
unless '2.5' == /(\d+\.\d+)/.match(RUBY_VERSION).to_s
|
||||
fail "rake gem:native (the rake task to build the binary packages) is being " \
|
||||
"invoked on macos with ruby #{RUBY_VERSION}. The ruby macos artifact " \
|
||||
"build should be running on ruby 2.5."
|
||||
end
|
||||
system "bundle exec rake cross native gem RUBY_CC_VERSION=#{ruby_cc_versions} V=#{verbose} GRPC_CONFIG=#{grpc_config}"
|
||||
else
|
||||
# build only selected platform
|
||||
if supported_windows_platforms.include?(selected_plat)
|
||||
windows_platforms = [selected_plat]
|
||||
unix_platforms = []
|
||||
elsif supported_unix_platforms.include?(selected_plat)
|
||||
windows_platforms = []
|
||||
unix_platforms = [selected_plat]
|
||||
# use env variable to set artifact build paralellism
|
||||
nproc_override = ENV['GRPC_RUBY_BUILD_PROCS'] || `nproc`.strip
|
||||
|
||||
# propagate env variables with ccache configuration to the rake-compiler-dock docker container
|
||||
# and setup ccache symlinks as needed.
|
||||
prepare_ccache_cmd = "export GRPC_BUILD_ENABLE_CCACHE=\"#{ENV.fetch('GRPC_BUILD_ENABLE_CCACHE', '')}\" && "
|
||||
prepare_ccache_cmd += "export CCACHE_SECONDARY_STORAGE=\"#{ENV.fetch('CCACHE_SECONDARY_STORAGE', '')}\" && "
|
||||
prepare_ccache_cmd += "export PATH=\"$PATH:/usr/local/bin\" && "
|
||||
prepare_ccache_cmd += "source tools/internal_ci/helper_scripts/prepare_ccache_symlinks_rc "
|
||||
|
||||
supported_windows_platforms = ['x86-mingw32', 'x64-mingw32']
|
||||
supported_unix_platforms = ['x86_64-linux', 'x86-linux', 'x86_64-darwin', 'arm64-darwin']
|
||||
supported_platforms = supported_windows_platforms + supported_unix_platforms
|
||||
|
||||
if selected_plat.empty?
|
||||
# build everything
|
||||
windows_platforms = supported_windows_platforms
|
||||
unix_platforms = supported_unix_platforms
|
||||
else
|
||||
fail "Unsupported platform '#{selected_plat}' passed as an argument."
|
||||
# build only selected platform
|
||||
if supported_windows_platforms.include?(selected_plat)
|
||||
windows_platforms = [selected_plat]
|
||||
unix_platforms = []
|
||||
elsif supported_unix_platforms.include?(selected_plat)
|
||||
windows_platforms = []
|
||||
unix_platforms = [selected_plat]
|
||||
else
|
||||
fail "Unsupported platform '#{selected_plat}' passed as an argument."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Create the windows dlls or create the empty placeholders
|
||||
Rake::Task['dlls'].execute(plat: windows_platforms)
|
||||
# Create the windows dlls or create the empty placeholders
|
||||
Rake::Task['dlls'].execute(plat: windows_platforms)
|
||||
|
||||
windows_platforms.each do |plat|
|
||||
run_rake_compiler(plat, <<~EOT)
|
||||
#{prepare_ccache_cmd} && \
|
||||
gem update --system --no-document && \
|
||||
bundle && \
|
||||
bundle exec rake clean && \
|
||||
bundle exec rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem pkg/#{spec.full_name}.gem \
|
||||
RUBY_CC_VERSION=#{ruby_cc_versions} \
|
||||
V=#{verbose} \
|
||||
GRPC_CONFIG=#{grpc_config} \
|
||||
GRPC_RUBY_BUILD_PROCS=#{nproc_override}
|
||||
EOT
|
||||
end
|
||||
|
||||
# Truncate grpc_c.*.ruby files because they're for Windows only and we don't want
|
||||
# them to take up space in the gems that don't target windows.
|
||||
File.truncate('grpc_c.32-msvcrt.ruby', 0)
|
||||
File.truncate('grpc_c.64-msvcrt.ruby', 0)
|
||||
File.truncate('grpc_c.64-ucrt.ruby', 0)
|
||||
|
||||
`mkdir -p src/ruby/nativedebug/symbols`
|
||||
# TODO(apolcyn): make debug symbols work on apple platforms.
|
||||
# Currently we hit "objcopy: grpc_c.bundle: file format not recognized"
|
||||
# TODO(apolcyn): make debug symbols work on aarch64 linux.
|
||||
# Currently we hit "objcopy: Unable to recognise the format of the input file `grpc_c.so'"
|
||||
unix_platforms_without_debug_symbols = ['x86_64-darwin', 'arm64-darwin', 'aarch64-linux']
|
||||
|
||||
unix_platforms.each do |plat|
|
||||
if unix_platforms_without_debug_symbols.include?(plat)
|
||||
debug_symbols_dir = ''
|
||||
else
|
||||
debug_symbols_dir = File.join(Dir.pwd, 'src/ruby/nativedebug/symbols')
|
||||
windows_platforms.each do |plat|
|
||||
run_rake_compiler(plat, <<~EOT)
|
||||
#{prepare_ccache_cmd} && \
|
||||
gem update --system --no-document && \
|
||||
bundle && \
|
||||
bundle exec rake clean && \
|
||||
bundle exec rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem pkg/#{spec.full_name}.gem \
|
||||
RUBY_CC_VERSION=#{ruby_cc_versions} \
|
||||
V=#{verbose} \
|
||||
GRPC_CONFIG=#{grpc_config} \
|
||||
GRPC_RUBY_BUILD_PROCS=#{nproc_override}
|
||||
EOT
|
||||
end
|
||||
run_rake_compiler(plat, <<~EOT)
|
||||
#{prepare_ccache_cmd} && \
|
||||
gem update --system --no-document && \
|
||||
bundle && \
|
||||
bundle exec rake clean && \
|
||||
export GRPC_RUBY_DEBUG_SYMBOLS_OUTPUT_DIR=#{debug_symbols_dir} && \
|
||||
bundle exec rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem pkg/#{spec.full_name}.gem \
|
||||
RUBY_CC_VERSION=#{ruby_cc_versions} \
|
||||
V=#{verbose} \
|
||||
GRPC_CONFIG=#{grpc_config} \
|
||||
GRPC_RUBY_BUILD_PROCS=#{nproc_override}
|
||||
EOT
|
||||
end
|
||||
# Generate debug symbol packages to complement the native libraries we just built
|
||||
unix_platforms.each do |plat|
|
||||
unless unix_platforms_without_debug_symbols.include?(plat)
|
||||
`bash src/ruby/nativedebug/build_package.sh #{plat}`
|
||||
`cp src/ruby/nativedebug/pkg/*.gem pkg/`
|
||||
|
||||
# Truncate grpc_c.*.ruby files because they're for Windows only and we don't want
|
||||
# them to take up space in the gems that don't target windows.
|
||||
File.truncate('grpc_c.32.ruby', 0)
|
||||
File.truncate('grpc_c.64.ruby', 0)
|
||||
|
||||
unix_platforms.each do |plat|
|
||||
run_rake_compiler(plat, <<~EOT)
|
||||
#{prepare_ccache_cmd} && \
|
||||
gem update --system --no-document && \
|
||||
bundle && \
|
||||
bundle exec rake clean && \
|
||||
bundle exec rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem pkg/#{spec.full_name}.gem \
|
||||
RUBY_CC_VERSION=#{ruby_cc_versions} \
|
||||
V=#{verbose} \
|
||||
GRPC_CONFIG=#{grpc_config} \
|
||||
GRPC_RUBY_BUILD_PROCS=#{nproc_override}
|
||||
EOT
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,27 +4,16 @@ This guide is for troubleshooting gRPC implementations based on C core library (
|
|||
|
||||
## Enabling extra logging and tracing
|
||||
|
||||
Extra logging can be very useful for diagnosing problems. It can be used to increase the amount of information
|
||||
Extra logging can be very useful for diagnosing problems. All gRPC implementations based on C core library support
|
||||
the `GRPC_VERBOSITY` and `GRPC_TRACE` environment variables that can be used to increase the amount of information
|
||||
that gets printed to stderr.
|
||||
|
||||
## GRPC_VERBOSITY
|
||||
|
||||
<!-- BEGIN_GOOGLE_INTERNAL_DOCUMENTATION
|
||||
GRPC_VERBOSITY has been disabled for internal usage and will not work anymore.
|
||||
If anyone wants to debug, we need to set verbose logs using absl.
|
||||
END_GOOGLE_INTERNAL_DOCUMENTATION -->
|
||||
|
||||
<!-- BEGIN_OPEN_SOURCE_DOCUMENTATION -->
|
||||
`GRPC_VERBOSITY` is used to set the minimum level of log messages printed by gRPC (supported values are `DEBUG`, `INFO` and `ERROR`). If this environment variable is unset, only `ERROR` logs will be printed. `ERROR` is recomeded for production systems.
|
||||
<!-- END_OPEN_SOURCE_DOCUMENTATION -->
|
||||
`GRPC_VERBOSITY` is used to set the minimum level of log messages printed by gRPC (supported values are `DEBUG`, `INFO` and `ERROR`). If this environment variable is unset, only `ERROR` logs will be printed.
|
||||
|
||||
## GRPC_TRACE
|
||||
|
||||
<!-- BEGIN_GOOGLE_INTERNAL_DOCUMENTATION
|
||||
GRPC_VERBOSITY has been disabled for internal usage and will not work anymore.
|
||||
If anyone wants to debug, we need to set verbose logs using absl.
|
||||
END_GOOGLE_INTERNAL_DOCUMENTATION -->
|
||||
|
||||
`GRPC_TRACE` can be used to enable extra logging for some internal gRPC components. Enabling the right traces can be invaluable
|
||||
for diagnosing for what is going wrong when things aren't working as intended. Possible values for `GRPC_TRACE` are listed in [Environment Variables Overview](doc/environment_variables.md).
|
||||
Multiple traces can be enabled at once (use comma as separator).
|
||||
|
|
|
|||
160
WORKSPACE
160
WORKSPACE
|
|
@ -24,37 +24,42 @@ custom_exec_properties(
|
|||
},
|
||||
)
|
||||
|
||||
load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
|
||||
|
||||
# Create toolchain configuration for remote execution.
|
||||
rbe_autoconfig(
|
||||
name = "rbe_default",
|
||||
exec_properties = create_rbe_exec_properties_dict(
|
||||
docker_add_capabilities = "SYS_PTRACE",
|
||||
docker_privileged = True,
|
||||
labels = {
|
||||
"os": "ubuntu",
|
||||
"machine_size": "small",
|
||||
},
|
||||
os_family = "Linux",
|
||||
),
|
||||
# use exec_properties instead of deprecated remote_execution_properties
|
||||
use_legacy_platform_definition = False,
|
||||
)
|
||||
|
||||
load("@bazel_toolchains//rules:environments.bzl", "clang_env")
|
||||
load("@bazel_skylib//lib:dicts.bzl", "dicts")
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
http_archive(
|
||||
name = "platforms",
|
||||
sha256 = "8150406605389ececb6da07cbcb509d5637a3ab9a24bc69b1101531367d89d74",
|
||||
urls = ["https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz"],
|
||||
name = "build_bazel_rules_android",
|
||||
sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
|
||||
strip_prefix = "rules_android-0.1.1",
|
||||
urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"],
|
||||
)
|
||||
|
||||
RULES_ANDROID_NDK_COMMIT = "010f4f17dd13a8baaaacc28ba6c8c2c75f54c68b"
|
||||
load("//third_party/android:android_configure.bzl", "android_configure")
|
||||
|
||||
RULES_ANDROID_NDK_SHA = "2ab6a97748772f289331d75caaaee0593825935d1d9d982231a437fb8ab5a14d"
|
||||
android_configure(name = "local_config_android")
|
||||
|
||||
http_archive(
|
||||
name = "rules_android_ndk",
|
||||
sha256 = RULES_ANDROID_NDK_SHA,
|
||||
strip_prefix = "rules_android_ndk-%s" % RULES_ANDROID_NDK_COMMIT,
|
||||
url = "https://github.com/bazelbuild/rules_android_ndk/archive/%s.zip" % RULES_ANDROID_NDK_COMMIT,
|
||||
)
|
||||
load("@local_config_android//:android_configure.bzl", "android_workspace")
|
||||
|
||||
android_sdk_repository(
|
||||
name = "androidsdk",
|
||||
build_tools_version = "34.0.0",
|
||||
)
|
||||
|
||||
load("@rules_android_ndk//:rules.bzl", "android_ndk_repository")
|
||||
|
||||
android_ndk_repository(name = "androidndk")
|
||||
|
||||
# Note that we intentionally avoid calling `register_toolchains("@androidndk//:all")`
|
||||
# here, because the toolchain rule fails when $ANDROID_NDK_HOME is not set.
|
||||
# Use `--extra_toolchains=@androidndk//:all` to manually register it when building for Android.
|
||||
android_workspace()
|
||||
|
||||
# Prevents bazel's '...' expansion from including the following folder.
|
||||
# This is required because the BUILD file in the following folder
|
||||
|
|
@ -63,106 +68,23 @@ android_ndk_repository(name = "androidndk")
|
|||
# be invoked by binder transport implementation through JNI.
|
||||
local_repository(
|
||||
name = "binder_transport_android_helper",
|
||||
path = "src/core/ext/transport/binder/java",
|
||||
path = "./src/core/ext/transport/binder/java",
|
||||
)
|
||||
|
||||
# Prevents bazel's '...' expansion from including the following folder.
|
||||
# This is required to avoid triggering "Unable to find package for @rules_fuzzing//fuzzing:cc_defs.bzl"
|
||||
# error.
|
||||
local_repository(
|
||||
name = "ignore_third_party_utf8_range_subtree",
|
||||
path = "third_party/utf8_range",
|
||||
# Create msan toolchain configuration for remote execution.
|
||||
rbe_autoconfig(
|
||||
name = "rbe_msan",
|
||||
env = dicts.add(
|
||||
clang_env(),
|
||||
{
|
||||
"BAZEL_LINKOPTS": "-lc++:-lc++abi:-lm",
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
load("@rules_python//python:pip.bzl", "pip_parse")
|
||||
load("@io_bazel_rules_python//python:pip.bzl", "pip_install")
|
||||
|
||||
pip_parse(
|
||||
pip_install(
|
||||
name = "grpc_python_dependencies",
|
||||
requirements_lock = "@com_github_grpc_grpc//:requirements.bazel.txt",
|
||||
requirements = "@com_github_grpc_grpc//:requirements.bazel.txt",
|
||||
)
|
||||
|
||||
load("@grpc_python_dependencies//:requirements.bzl", "install_deps")
|
||||
|
||||
install_deps()
|
||||
|
||||
load("@com_google_protobuf//bazel:system_python.bzl", "system_python")
|
||||
|
||||
system_python(
|
||||
name = "system_python",
|
||||
minimum_python_version = "3.7",
|
||||
)
|
||||
|
||||
load("@system_python//:pip.bzl", system_pip_parse = "pip_parse")
|
||||
|
||||
system_pip_parse(
|
||||
name = "pip_deps",
|
||||
requirements = "@com_google_protobuf//python:requirements.txt",
|
||||
requirements_overrides = {
|
||||
"3.11": "@com_google_protobuf//python:requirements_311.txt",
|
||||
},
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "build_bazel_rules_swift",
|
||||
sha256 = "bf2861de6bf75115288468f340b0c4609cc99cc1ccc7668f0f71adfd853eedb3",
|
||||
url = "https://github.com/bazelbuild/rules_swift/releases/download/1.7.1/rules_swift.1.7.1.tar.gz",
|
||||
)
|
||||
|
||||
load(
|
||||
"@build_bazel_apple_support//lib:repositories.bzl",
|
||||
"apple_support_dependencies",
|
||||
)
|
||||
|
||||
apple_support_dependencies()
|
||||
|
||||
load(
|
||||
"@build_bazel_rules_swift//swift:repositories.bzl",
|
||||
"swift_rules_dependencies",
|
||||
)
|
||||
|
||||
swift_rules_dependencies()
|
||||
|
||||
# This loads the libpfm transitive dependency.
|
||||
# See https://github.com/google/benchmark/pull/1520
|
||||
load("@com_github_google_benchmark//:bazel/benchmark_deps.bzl", "benchmark_deps")
|
||||
|
||||
benchmark_deps()
|
||||
|
||||
# This is a transitive dependency from google_cloud_cpp
|
||||
bind(
|
||||
name = "cares",
|
||||
actual = "@com_github_cares_cares//:ares",
|
||||
)
|
||||
|
||||
load("@io_opentelemetry_cpp//bazel:repository.bzl", "opentelemetry_cpp_deps")
|
||||
|
||||
opentelemetry_cpp_deps()
|
||||
|
||||
load("@io_opentelemetry_cpp//bazel:extra_deps.bzl", "opentelemetry_extra_deps")
|
||||
|
||||
opentelemetry_extra_deps()
|
||||
|
||||
# Transitive dependency of opentelemetry_extra_deps()
|
||||
bind(
|
||||
name = "madler_zlib",
|
||||
actual = "@zlib//:zlib",
|
||||
)
|
||||
|
||||
# TODO: Enable below once https://github.com/bazel-xcode/PodToBUILD/issues/232 is resolved
|
||||
#
|
||||
#http_archive(
|
||||
# name = "rules_pods",
|
||||
# urls = ["https://github.com/pinterest/PodToBUILD/releases/download/4.1.0-412495/PodToBUILD.zip"],
|
||||
#)
|
||||
#
|
||||
#load(
|
||||
# "@rules_pods//BazelExtensions:workspace.bzl",
|
||||
# "new_pod_repository",
|
||||
#)
|
||||
#
|
||||
#new_pod_repository(
|
||||
# name = "CronetFramework",
|
||||
# is_dynamic_framework = True,
|
||||
# podspec_url = "https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/2/e/1/CronetFramework/0.0.5/CronetFramework.podspec.json",
|
||||
# url = "https://storage.googleapis.com/grpc-precompiled-binaries/cronet/Cronet.framework-v0.0.5.zip",
|
||||
#)
|
||||
|
|
|
|||
|
|
@ -14,4 +14,4 @@
|
|||
|
||||
# AUTO-GENERATED FROM `$REPO_ROOT/templates/_metadata.py.template`!!!
|
||||
|
||||
__version__ = """1.65.0.dev0"""
|
||||
__version__ = """1.46.7"""
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
set noparent
|
||||
@nicolasnoble
|
||||
@jtattermusch
|
||||
@veblush
|
||||
@gnossen
|
||||
@ctiller
|
||||
|
||||
|
|
@ -42,7 +42,6 @@ import unittest
|
|||
import sys
|
||||
import os
|
||||
import pkgutil
|
||||
import importlib
|
||||
|
||||
def trace_callback(event, args):
|
||||
if event in ("switch", "throw"):
|
||||
|
|
@ -74,9 +73,7 @@ class SingleLoader(object):
|
|||
tests = []
|
||||
for importer, module_name, is_package in pkgutil.walk_packages([os.path.dirname(os.path.relpath(__file__))]):
|
||||
if pattern in module_name:
|
||||
spec = importer.find_spec(module_name)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
module = importer.find_module(module_name).load_module(module_name)
|
||||
tests.append(loader.loadTestsFromModule(module))
|
||||
if len(tests) != 1:
|
||||
raise AssertionError("Expected only 1 test module. Found {}".format(tests))
|
||||
|
|
|
|||
|
|
@ -74,8 +74,7 @@ def cc_grpc_library(
|
|||
cc_proto_target = name if proto_only else "_" + name + "_cc_proto"
|
||||
|
||||
proto_deps = ["_" + dep + "_only" for dep in deps if dep.find(":") == -1]
|
||||
proto_deps += [dep.split(":")[0] + ":" + "_" + dep.split(":")[1] + "_only" for dep in deps if dep.find(":") != -1 and dep.find("com_google_googleapis") == -1]
|
||||
proto_deps += [dep for dep in deps if dep.find("com_google_googleapis") != -1]
|
||||
proto_deps += [dep.split(":")[0] + ":" + "_" + dep.split(":")[1] + "_only" for dep in deps if dep.find(":") != -1]
|
||||
if well_known_protos:
|
||||
proto_deps += well_known_proto_libs()
|
||||
proto_library(
|
||||
|
|
|
|||
103
bazel/copts.bzl
103
bazel/copts.bzl
|
|
@ -45,7 +45,6 @@ GRPC_LLVM_WARNING_FLAGS = [
|
|||
"-Wtautological-overlap-compare",
|
||||
"-Wthread-safety-analysis",
|
||||
"-Wthread-safety-beta",
|
||||
"-Wunused-but-set-variable",
|
||||
"-Wunused-comparison",
|
||||
"-Wvla",
|
||||
# -Wextra compatibility between gcc and clang
|
||||
|
|
@ -57,107 +56,7 @@ GRPC_LLVM_WARNING_FLAGS = [
|
|||
"-Wno-unused-function",
|
||||
]
|
||||
|
||||
GRPC_LLVM_WINDOWS_WARNING_FLAGS = GRPC_LLVM_WARNING_FLAGS + [
|
||||
### Some checks that are missing with clang-cl
|
||||
"-Wthread-safety",
|
||||
"-Wreorder-ctor",
|
||||
|
||||
### Avoid some checks that are default on clang-cl
|
||||
"-Wno-c++98-compat-pedantic",
|
||||
"-Wno-missing-prototypes",
|
||||
"-Wno-thread-safety-precise", # too many aliases
|
||||
|
||||
# abseil offenses
|
||||
"-Wno-comma",
|
||||
"-Wno-deprecated-redundant-constexpr-static-def",
|
||||
"-Wno-deprecated", # remove when the above works in all clang versions we test with
|
||||
"-Wno-float-equal",
|
||||
"-Wno-gcc-compat",
|
||||
"-Wno-reserved-identifier",
|
||||
"-Wno-thread-safety-negative",
|
||||
"-Wno-sign-compare",
|
||||
|
||||
# re2 offenses
|
||||
"-Wno-zero-as-null-pointer-constant",
|
||||
|
||||
# ares offenses
|
||||
"-Wno-macro-redefined",
|
||||
|
||||
# protobuf offenses
|
||||
"-Wno-cast-align",
|
||||
"-Wno-inconsistent-missing-destructor-override",
|
||||
|
||||
# xxhash offenses
|
||||
"-Wno-disabled-macro-expansion",
|
||||
|
||||
# benchmark offenses
|
||||
"-Wno-shift-sign-overflow",
|
||||
|
||||
# Evidently nodiscard is inappropriately pinned as a C++17 feature
|
||||
"-Wno-c++17-attribute-extensions",
|
||||
|
||||
# declarations are not used in many places
|
||||
"-Wno-missing-variable-declarations",
|
||||
|
||||
# TODO: delete iomgr
|
||||
"-Wno-old-style-cast",
|
||||
"-Wno-cast-qual",
|
||||
"-Wno-unused-member-function",
|
||||
"-Wno-unused-template",
|
||||
|
||||
# TODO(hork): see if the TraceFlag offense can be removed
|
||||
"-Wno-global-constructors",
|
||||
# TODO(hork): clean up EE offenses
|
||||
"-Wno-missing-field-initializers",
|
||||
"-Wno-non-virtual-dtor",
|
||||
"-Wno-thread-safety-reference-return",
|
||||
|
||||
# TODO(ctiller): offense: dump_args. signed to unsigned
|
||||
"-Wno-sign-conversion",
|
||||
"-Wno-shorten-64-to-32",
|
||||
|
||||
# TODO: general cleanup required. Maybe new developer or rainy day projects.
|
||||
"-Wno-unreachable-code-break",
|
||||
"-Wno-unreachable-code-return",
|
||||
"-Wno-unreachable-code",
|
||||
"-Wno-used-but-marked-unused",
|
||||
"-Wno-newline-eof",
|
||||
"-Wno-unused-const-variable",
|
||||
"-Wno-extra-semi",
|
||||
"-Wno-extra-semi-stmt",
|
||||
"-Wno-suggest-destructor-override",
|
||||
"-Wno-shadow",
|
||||
"-Wno-missing-noreturn",
|
||||
"-Wno-nested-anon-types",
|
||||
"-Wno-gnu-anonymous-struct",
|
||||
"-Wno-nonportable-system-include-path",
|
||||
"-Wno-microsoft-cast",
|
||||
"-Wno-exit-time-destructors",
|
||||
"-Wno-undef", # #if <MACRO_NAME> to #ifdef <MACRO_NAME>
|
||||
"-Wno-unused-macros",
|
||||
"-Wno-redundant-parens",
|
||||
"-Wno-undefined-func-template",
|
||||
"-Wno-gnu-zero-variadic-macro-arguments",
|
||||
"-Wno-double-promotion",
|
||||
"-Wno-implicit-float-conversion",
|
||||
"-Wno-implicit-int-conversion",
|
||||
"-Wno-float-conversion",
|
||||
"-Wno-unused-parameter",
|
||||
"-Wno-suggest-override",
|
||||
"-Wno-documentation",
|
||||
"-Wno-documentation-unknown-command",
|
||||
"-Wno-unsafe-buffer-usage",
|
||||
|
||||
### possibly bad warnings for this codebase
|
||||
"-Wno-covered-switch-default",
|
||||
"-Wno-switch-default",
|
||||
"-Wno-switch-enum",
|
||||
"-Wno-c99-extensions",
|
||||
"-Wno-unused-private-field", # GRPC_UNUSED does not appear to work for private fields
|
||||
]
|
||||
|
||||
GRPC_DEFAULT_COPTS = select({
|
||||
"//:use_strict_warning": GRPC_LLVM_WARNING_FLAGS + ["-DUSE_STRICT_WARNING=1"],
|
||||
"//:use_strict_warning_windows": GRPC_LLVM_WINDOWS_WARNING_FLAGS + ["-DUSE_STRICT_WARNING=1"],
|
||||
"//:use_strict_warning": GRPC_LLVM_WARNING_FLAGS,
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs):
|
|||
)
|
||||
|
||||
shared_objects = []
|
||||
defines = kwargs.pop("defines", [])
|
||||
for src in pyx_srcs:
|
||||
stem = src.split(".")[0]
|
||||
shared_object_name = stem + ".so"
|
||||
|
|
@ -73,7 +72,6 @@ def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs):
|
|||
name = shared_object_name,
|
||||
srcs = [stem + ".cpp"],
|
||||
deps = deps + ["@local_config_python//:python_headers"],
|
||||
defines = defines,
|
||||
linkshared = 1,
|
||||
)
|
||||
shared_objects.append(shared_object_name)
|
||||
|
|
|
|||
|
|
@ -1,190 +0,0 @@
|
|||
# Copyright 2023 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Auto generated by tools/codegen/core/gen_experiments.py
|
||||
|
||||
"""Dictionary of tags to experiments so we know when to test different experiments."""
|
||||
|
||||
EXPERIMENT_ENABLES = {
|
||||
"call_status_override_on_cancellation": "call_status_override_on_cancellation",
|
||||
"canary_client_privacy": "canary_client_privacy",
|
||||
"client_privacy": "client_privacy",
|
||||
"event_engine_client": "event_engine_client",
|
||||
"event_engine_dns": "event_engine_dns",
|
||||
"event_engine_listener": "event_engine_listener",
|
||||
"free_large_allocator": "free_large_allocator",
|
||||
"http2_stats_fix": "http2_stats_fix",
|
||||
"keepalive_fix": "keepalive_fix",
|
||||
"keepalive_server_fix": "keepalive_server_fix",
|
||||
"max_pings_wo_data_throttle": "max_pings_wo_data_throttle",
|
||||
"monitoring_experiment": "monitoring_experiment",
|
||||
"multiping": "multiping",
|
||||
"peer_state_based_framing": "peer_state_based_framing",
|
||||
"pick_first_new": "pick_first_new",
|
||||
"promise_based_inproc_transport": "promise_based_inproc_transport",
|
||||
"rstpit": "rstpit",
|
||||
"schedule_cancellation_over_write": "schedule_cancellation_over_write",
|
||||
"server_privacy": "server_privacy",
|
||||
"tcp_frame_size_tuning": "tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat": "tcp_rcv_lowat",
|
||||
"trace_record_callops": "trace_record_callops",
|
||||
"unconstrained_max_quota_buffer_size": "unconstrained_max_quota_buffer_size",
|
||||
"work_serializer_clears_time_cache": "work_serializer_clears_time_cache",
|
||||
"work_serializer_dispatch": "work_serializer_dispatch",
|
||||
}
|
||||
|
||||
EXPERIMENT_POLLERS = [
|
||||
"event_engine_client",
|
||||
"event_engine_dns",
|
||||
"event_engine_listener",
|
||||
]
|
||||
|
||||
EXPERIMENTS = {
|
||||
"windows": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
"endpoint_test": [
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"flow_control_test": [
|
||||
"multiping",
|
||||
"peer_state_based_framing",
|
||||
"rstpit",
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"resource_quota_test": [
|
||||
"free_large_allocator",
|
||||
"unconstrained_max_quota_buffer_size",
|
||||
],
|
||||
},
|
||||
"on": {
|
||||
"cancel_ares_query_test": [
|
||||
"event_engine_dns",
|
||||
],
|
||||
"core_end2end_test": [
|
||||
"event_engine_client",
|
||||
"event_engine_listener",
|
||||
],
|
||||
"cpp_lb_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"event_engine_client_test": [
|
||||
"event_engine_client",
|
||||
],
|
||||
"event_engine_listener_test": [
|
||||
"event_engine_listener",
|
||||
],
|
||||
"lb_unit_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"resolver_component_tests_runner_invoker": [
|
||||
"event_engine_dns",
|
||||
],
|
||||
"xds_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
},
|
||||
},
|
||||
"ios": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
"endpoint_test": [
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"flow_control_test": [
|
||||
"multiping",
|
||||
"peer_state_based_framing",
|
||||
"rstpit",
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"resource_quota_test": [
|
||||
"free_large_allocator",
|
||||
"unconstrained_max_quota_buffer_size",
|
||||
],
|
||||
},
|
||||
"on": {
|
||||
"cpp_lb_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"lb_unit_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"xds_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
},
|
||||
},
|
||||
"posix": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
"core_end2end_test": [
|
||||
"event_engine_client",
|
||||
],
|
||||
"endpoint_test": [
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"event_engine_client_test": [
|
||||
"event_engine_client",
|
||||
],
|
||||
"flow_control_test": [
|
||||
"multiping",
|
||||
"peer_state_based_framing",
|
||||
"rstpit",
|
||||
"tcp_frame_size_tuning",
|
||||
"tcp_rcv_lowat",
|
||||
],
|
||||
"resource_quota_test": [
|
||||
"free_large_allocator",
|
||||
"unconstrained_max_quota_buffer_size",
|
||||
],
|
||||
},
|
||||
"on": {
|
||||
"cancel_ares_query_test": [
|
||||
"event_engine_dns",
|
||||
],
|
||||
"core_end2end_test": [
|
||||
"event_engine_listener",
|
||||
"work_serializer_dispatch",
|
||||
],
|
||||
"cpp_end2end_test": [
|
||||
"work_serializer_dispatch",
|
||||
],
|
||||
"cpp_lb_end2end_test": [
|
||||
"pick_first_new",
|
||||
],
|
||||
"event_engine_listener_test": [
|
||||
"event_engine_listener",
|
||||
],
|
||||
"lb_unit_test": [
|
||||
"pick_first_new",
|
||||
"work_serializer_dispatch",
|
||||
],
|
||||
"resolver_component_tests_runner_invoker": [
|
||||
"event_engine_dns",
|
||||
],
|
||||
"xds_end2end_test": [
|
||||
"pick_first_new",
|
||||
"work_serializer_dispatch",
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@ def generate_cc_impl(ctx):
|
|||
f = ctx.attr.well_known_protos.files.to_list()[0].dirname
|
||||
if f != "external/com_google_protobuf/src/google/protobuf":
|
||||
print(
|
||||
"Error: Only @com_google_protobuf//:well_known_type_protos is supported",
|
||||
"Error: Only @com_google_protobuf//:well_known_protos is supported",
|
||||
) # buildifier: disable=print
|
||||
else:
|
||||
# f points to "external/com_google_protobuf/src/google/protobuf"
|
||||
|
|
@ -163,7 +163,7 @@ def generate_cc_impl(ctx):
|
|||
use_default_shell_env = True,
|
||||
)
|
||||
|
||||
return DefaultInfo(files = depset(out_files))
|
||||
return struct(files = depset(out_files)) # buildifier: disable=rule-impl-return
|
||||
|
||||
_generate_cc = rule(
|
||||
attrs = {
|
||||
|
|
@ -175,7 +175,7 @@ _generate_cc = rule(
|
|||
"plugin": attr.label(
|
||||
executable = True,
|
||||
providers = ["files_to_run"],
|
||||
cfg = "exec",
|
||||
cfg = "host",
|
||||
),
|
||||
"flags": attr.string_list(
|
||||
mandatory = False,
|
||||
|
|
@ -187,9 +187,9 @@ _generate_cc = rule(
|
|||
mandatory = False,
|
||||
),
|
||||
"_protoc": attr.label(
|
||||
default = Label("@com_google_protobuf//:protoc"),
|
||||
default = Label("//external:protocol_compiler"),
|
||||
executable = True,
|
||||
cfg = "exec",
|
||||
cfg = "host",
|
||||
),
|
||||
},
|
||||
# We generate .h files, so we need to output to genfiles.
|
||||
|
|
@ -200,7 +200,7 @@ _generate_cc = rule(
|
|||
def generate_cc(well_known_protos, **kwargs):
|
||||
if well_known_protos:
|
||||
_generate_cc(
|
||||
well_known_protos = "@com_google_protobuf//:well_known_type_protos",
|
||||
well_known_protos = "@com_google_protobuf//:well_known_protos",
|
||||
**kwargs
|
||||
)
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ generate_objc = rule(
|
|||
default = "@com_github_grpc_grpc//src/compiler:grpc_objective_c_plugin",
|
||||
executable = True,
|
||||
providers = ["files_to_run"],
|
||||
cfg = "exec",
|
||||
cfg = "host",
|
||||
),
|
||||
"srcs": attr.string_list(
|
||||
mandatory = False,
|
||||
|
|
@ -177,12 +177,12 @@ generate_objc = rule(
|
|||
default = False,
|
||||
),
|
||||
"well_known_protos": attr.label(
|
||||
default = "@com_google_protobuf//:well_known_type_protos",
|
||||
default = "@com_google_protobuf//:well_known_protos",
|
||||
),
|
||||
"_protoc": attr.label(
|
||||
default = Label("@com_google_protobuf//:protoc"),
|
||||
default = Label("//external:protocol_compiler"),
|
||||
executable = True,
|
||||
cfg = "exec",
|
||||
cfg = "host",
|
||||
),
|
||||
},
|
||||
output_to_genfiles = True,
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ def py_grpc_gevent_test(
|
|||
native.py_test(
|
||||
name = name + ".gevent",
|
||||
args = [name],
|
||||
data = data,
|
||||
deps = augmented_deps,
|
||||
srcs = [copied_main_filename],
|
||||
main = copied_main_filename,
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
# Copyright 2023 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
# This is needed for the dependency on google_cloud_cpp to work.
|
||||
# Taken from https://github.com/googleapis/google-cloud-cpp/blob/2839e9dba793ca023e11ea67f201f66f74fa7d3e/bazel/googleapis.BUILD
|
||||
cc_library(
|
||||
name = "googleapis_system_includes",
|
||||
includes = [
|
||||
".",
|
||||
],
|
||||
)
|
||||
|
|
@ -27,13 +27,11 @@
|
|||
Contains macros used throughout the repo.
|
||||
"""
|
||||
|
||||
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
|
||||
load("@build_bazel_rules_apple//apple/testing/default_runner:ios_test_runner.bzl", "ios_test_runner")
|
||||
load("@com_google_protobuf//bazel:upb_proto_library.bzl", "upb_proto_library", "upb_proto_reflection_library")
|
||||
load("//bazel:cc_grpc_library.bzl", "cc_grpc_library")
|
||||
load("//bazel:copts.bzl", "GRPC_DEFAULT_COPTS")
|
||||
load("//bazel:experiments.bzl", "EXPERIMENTS", "EXPERIMENT_ENABLES", "EXPERIMENT_POLLERS")
|
||||
load("//bazel:test_experiments.bzl", "TEST_EXPERIMENTS", "TEST_EXPERIMENT_ENABLES", "TEST_EXPERIMENT_POLLERS")
|
||||
load("@upb//bazel:upb_proto_library.bzl", "upb_proto_library", "upb_proto_reflection_library")
|
||||
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
|
||||
load("@build_bazel_rules_apple//apple/testing/default_runner:ios_test_runner.bzl", "ios_test_runner")
|
||||
|
||||
# The set of pollers to test against if a test exercises polling
|
||||
POLLERS = ["epoll1", "poll"]
|
||||
|
|
@ -45,7 +43,6 @@ def if_not_windows(a):
|
|||
return select({
|
||||
"//:windows": [],
|
||||
"//:windows_msvc": [],
|
||||
"//:windows_clang": [],
|
||||
"//conditions:default": a,
|
||||
})
|
||||
|
||||
|
|
@ -53,88 +50,58 @@ def if_windows(a):
|
|||
return select({
|
||||
"//:windows": a,
|
||||
"//:windows_msvc": a,
|
||||
"//:windows_clang": a,
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
def _get_external_deps(external_deps):
|
||||
ret = []
|
||||
for dep in external_deps:
|
||||
if dep.startswith("@"):
|
||||
ret.append(dep)
|
||||
elif dep == "address_sorting":
|
||||
if dep == "address_sorting":
|
||||
ret.append("//third_party/address_sorting")
|
||||
elif dep == "xxhash":
|
||||
ret.append("//third_party/xxhash")
|
||||
elif dep == "cares":
|
||||
ret += select({
|
||||
"//:grpc_no_ares": [],
|
||||
"//conditions:default": ["//third_party:cares"],
|
||||
"//conditions:default": ["//external:cares"],
|
||||
})
|
||||
elif dep == "cronet_c_for_grpc":
|
||||
ret.append("//third_party/objective_c/Cronet:cronet_c_for_grpc")
|
||||
elif dep.startswith("absl/"):
|
||||
ret.append("@com_google_absl//" + dep)
|
||||
elif dep.startswith("google/"):
|
||||
ret.append("@com_google_googleapis//" + dep)
|
||||
elif dep.startswith("otel/"):
|
||||
ret.append(dep.replace("otel/", "@io_opentelemetry_cpp//"))
|
||||
elif dep.startswith("google_cloud_cpp"):
|
||||
ret.append(dep.replace("google_cloud_cpp", "@google_cloud_cpp//"))
|
||||
elif dep == "libprotobuf_mutator":
|
||||
ret.append("@com_google_libprotobuf_mutator//:libprotobuf_mutator")
|
||||
else:
|
||||
ret.append("//third_party:" + dep)
|
||||
ret.append("//external:" + dep)
|
||||
return ret
|
||||
|
||||
def _update_visibility(visibility):
|
||||
if visibility == None:
|
||||
return None
|
||||
|
||||
# Visibility rules prefixed with '@grpc:' are used to flag different visibility rule
|
||||
# Visibility rules prefixed with '@grpc_' are used to flag different visibility rule
|
||||
# classes upstream.
|
||||
PUBLIC = ["//visibility:public"]
|
||||
PRIVATE = ["//:__subpackages__"]
|
||||
VISIBILITY_TARGETS = {
|
||||
"alt_gpr_base_legacy": PRIVATE,
|
||||
"alt_grpc++_base_legacy": PRIVATE,
|
||||
"alt_grpc_base_legacy": PRIVATE,
|
||||
"alt_grpc++_base_unsecure_legacy": PRIVATE,
|
||||
"alts_frame_protector": PRIVATE,
|
||||
"channelz": PRIVATE,
|
||||
"chaotic_good": PRIVATE,
|
||||
"client_channel": PRIVATE,
|
||||
"cli": PRIVATE,
|
||||
"core_credentials": PRIVATE,
|
||||
"debug_location": PRIVATE,
|
||||
"endpoint_tests": PRIVATE,
|
||||
"exec_ctx": PRIVATE,
|
||||
"gpr_public_hdrs": PRIVATE,
|
||||
"grpclb": PRIVATE,
|
||||
"grpc_experiments": PRIVATE,
|
||||
"grpc_opencensus_plugin": PUBLIC,
|
||||
"grpc_public_hdrs": PRIVATE,
|
||||
"grpcpp_gcp_observability": PUBLIC,
|
||||
"grpc_resolver_fake": PRIVATE,
|
||||
"grpc++_public_hdrs": PUBLIC,
|
||||
"grpc++_test": PRIVATE,
|
||||
"http": PRIVATE,
|
||||
"httpcli": PRIVATE,
|
||||
"iomgr_internal_errqueue": PRIVATE,
|
||||
"iomgr_buffer_list": PRIVATE,
|
||||
"json_reader_legacy": PRIVATE,
|
||||
"otel_plugin": PRIVATE,
|
||||
"public": PUBLIC,
|
||||
"ref_counted_ptr": PRIVATE,
|
||||
"tcp_tracer": PRIVATE,
|
||||
"trace": PRIVATE,
|
||||
"tsi_interface": PRIVATE,
|
||||
"tsi": PRIVATE,
|
||||
"xds": PRIVATE,
|
||||
"xds_client_core": PRIVATE,
|
||||
"xds_end2end_test_utils": PRIVATE,
|
||||
"grpc_python_observability": PRIVATE,
|
||||
"event_engine_base_hdrs": PRIVATE,
|
||||
"useful": PRIVATE,
|
||||
}
|
||||
final_visibility = []
|
||||
for rule in visibility:
|
||||
|
|
@ -161,7 +128,6 @@ def grpc_cc_library(
|
|||
alwayslink = 0,
|
||||
data = [],
|
||||
tags = [],
|
||||
linkopts = [],
|
||||
linkstatic = False):
|
||||
"""An internal wrapper around cc_library.
|
||||
|
||||
|
|
@ -181,14 +147,13 @@ def grpc_cc_library(
|
|||
alwayslink: Whether to enable alwayslink on the cc_library.
|
||||
data: Data dependencies.
|
||||
tags: Tags to apply to the rule.
|
||||
linkopts: Extra libraries to link.
|
||||
linkstatic: Whether to enable linkstatic on the cc_library.
|
||||
"""
|
||||
visibility = _update_visibility(visibility)
|
||||
copts = []
|
||||
if language.upper() == "C":
|
||||
copts = copts + if_not_windows(["-std=c11"])
|
||||
linkopts = linkopts + if_not_windows(["-pthread"]) + if_windows(["-defaultlib:ws2_32.lib"])
|
||||
copts = copts + if_not_windows(["-std=c99"])
|
||||
linkopts = if_not_windows(["-pthread"]) + if_windows(["-defaultlib:ws2_32.lib"])
|
||||
if select_deps:
|
||||
for select_deps_entry in select_deps:
|
||||
deps += select(select_deps_entry)
|
||||
|
|
@ -208,6 +173,10 @@ def grpc_cc_library(
|
|||
"//:grpc_allow_exceptions": ["GRPC_ALLOW_EXCEPTIONS=1"],
|
||||
"//:grpc_disallow_exceptions": ["GRPC_ALLOW_EXCEPTIONS=0"],
|
||||
"//conditions:default": [],
|
||||
}) +
|
||||
select({
|
||||
"//:use_abseil_status": ["GRPC_ERROR_IS_ABSEIL_STATUS=1"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
hdrs = hdrs + public_hdrs,
|
||||
deps = deps + _get_external_deps(external_deps),
|
||||
|
|
@ -217,8 +186,8 @@ def grpc_cc_library(
|
|||
linkopts = linkopts,
|
||||
includes = [
|
||||
"include",
|
||||
"src/core/ext/upb-gen", # Once upb code-gen issue is resolved, remove this.
|
||||
"src/core/ext/upbdefs-gen", # Once upb code-gen issue is resolved, remove this.
|
||||
"src/core/ext/upb-generated", # Once upb code-gen issue is resolved, remove this.
|
||||
"src/core/ext/upbdefs-generated", # Once upb code-gen issue is resolved, remove this.
|
||||
],
|
||||
alwayslink = alwayslink,
|
||||
data = data,
|
||||
|
|
@ -237,7 +206,6 @@ def grpc_proto_library(
|
|||
name,
|
||||
srcs = [],
|
||||
deps = [],
|
||||
visibility = None,
|
||||
well_known_protos = False,
|
||||
has_services = True,
|
||||
use_external = False,
|
||||
|
|
@ -246,7 +214,6 @@ def grpc_proto_library(
|
|||
name = name,
|
||||
srcs = srcs,
|
||||
deps = deps,
|
||||
visibility = visibility,
|
||||
well_known_protos = well_known_protos,
|
||||
proto_only = not has_services,
|
||||
use_external = use_external,
|
||||
|
|
@ -293,226 +260,75 @@ def ios_cc_test(
|
|||
deps = ios_test_deps,
|
||||
)
|
||||
|
||||
def expand_poller_config(name, srcs, deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky):
|
||||
def expand_tests_for_each_poller_and_engine(name, srcs, deps, tags, args, exclude_pollers, uses_event_engine):
|
||||
"""Common logic used to parameterize tests for every poller and EventEngine.
|
||||
|
||||
Used by expand_tests (repeatedly) to form base lists of pollers for each experiment.
|
||||
|
||||
Args:
|
||||
name: base name of the test
|
||||
srcs: source files
|
||||
deps: base deps
|
||||
tags: base tags
|
||||
args: base args
|
||||
flaky: base flaky
|
||||
exclude_pollers: list of poller names to exclude for this set of tests.
|
||||
uses_polling: set to False if the test is not sensitive to polling methodology.
|
||||
uses_event_engine: set to False if the test is not sensitive to
|
||||
EventEngine implementation differences
|
||||
|
||||
Returns:
|
||||
A list of dictionaries containing modified values of name, srcs, deps, tags, and args.
|
||||
"""
|
||||
|
||||
poller_config = []
|
||||
|
||||
# See work_stealing_thread_pool.cc for details.
|
||||
default_env = {"GRPC_THREAD_POOL_VERBOSE_FAILURES": "true"}
|
||||
|
||||
if not uses_polling:
|
||||
tags = tags + ["no_uses_polling"]
|
||||
# On linux we run the same test with the default EventEngine, once for each
|
||||
# poller
|
||||
for poller in POLLERS:
|
||||
if poller in exclude_pollers:
|
||||
continue
|
||||
poller_config.append({
|
||||
"name": name + "@poller=" + poller,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": (tags + EVENT_ENGINES["default"]["tags"] + [
|
||||
"no_windows",
|
||||
"no_mac",
|
||||
"bazel_only",
|
||||
]),
|
||||
"args": args + ["--poller=" + poller],
|
||||
})
|
||||
|
||||
# Now generate one test for each subsequent EventEngine, all using the
|
||||
# default poller. These tests will have `@engine=<name>` appended to the
|
||||
# test target name. If a test target name has no `@engine=<name>` component,
|
||||
# that indicates that the default EventEngine is being used.
|
||||
if not uses_event_engine:
|
||||
# The poller tests exercise the default engine on Linux. This test
|
||||
# handles other platforms.
|
||||
poller_config.append({
|
||||
"name": name,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": tags,
|
||||
"tags": tags + ["no_linux"],
|
||||
"args": args,
|
||||
"flaky": flaky,
|
||||
"env": default_env,
|
||||
})
|
||||
else:
|
||||
# On linux we run the same test with the default EventEngine, once for each
|
||||
# poller
|
||||
for poller in POLLERS:
|
||||
if poller in exclude_pollers:
|
||||
continue
|
||||
for engine_name, engine in EVENT_ENGINES.items():
|
||||
test_name = name + "@engine=" + engine_name
|
||||
test_tags = tags + engine["tags"] + ["bazel_only"]
|
||||
test_args = args + ["--engine=" + engine_name]
|
||||
if engine_name == "default":
|
||||
# The poller tests exercise the default engine on Linux.
|
||||
# This test handles other platforms.
|
||||
test_name = name
|
||||
test_tags = tags + engine["tags"] + ["no_linux"]
|
||||
test_args = args
|
||||
poller_config.append({
|
||||
"name": name + "@poller=" + poller,
|
||||
"name": test_name,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": (tags + EVENT_ENGINES["default"]["tags"] + [
|
||||
"no_windows",
|
||||
"no_mac",
|
||||
"bazel_only",
|
||||
]),
|
||||
"args": args,
|
||||
"env": {
|
||||
"GRPC_POLL_STRATEGY": poller,
|
||||
} | default_env,
|
||||
"flaky": flaky,
|
||||
"tags": test_tags,
|
||||
"args": test_args,
|
||||
})
|
||||
|
||||
# Now generate one test for each subsequent EventEngine, all using the
|
||||
# default poller. These tests will have `@engine=<name>` appended to the
|
||||
# test target name. If a test target name has no `@engine=<name>` component,
|
||||
# that indicates that the default EventEngine is being used.
|
||||
if not uses_event_engine:
|
||||
# The poller tests exercise the default engine on Linux. This test
|
||||
# handles other platforms.
|
||||
poller_config.append({
|
||||
"name": name,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": tags + ["no_linux"],
|
||||
"args": args,
|
||||
"env": default_env,
|
||||
"flaky": flaky,
|
||||
})
|
||||
else:
|
||||
for engine_name, engine in EVENT_ENGINES.items():
|
||||
test_name = name + "@engine=" + engine_name
|
||||
test_tags = tags + engine["tags"] + ["bazel_only"]
|
||||
test_args = args + ["--engine=" + engine_name]
|
||||
if engine_name == "default":
|
||||
# The poller tests exercise the default engine on Linux.
|
||||
# This test handles other platforms.
|
||||
test_name = name
|
||||
test_tags = tags + engine["tags"] + ["no_linux"]
|
||||
test_args = args
|
||||
poller_config.append({
|
||||
"name": test_name,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": test_tags,
|
||||
"args": test_args,
|
||||
"env": default_env,
|
||||
"flaky": flaky,
|
||||
})
|
||||
|
||||
return poller_config
|
||||
|
||||
def expand_tests(name, srcs, deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky):
|
||||
"""Common logic used to parameterize tests for every poller and EventEngine and experiment.
|
||||
|
||||
Args:
|
||||
name: base name of the test
|
||||
srcs: source files
|
||||
deps: base deps
|
||||
tags: base tags
|
||||
args: base args
|
||||
flaky: base flaky
|
||||
exclude_pollers: list of poller names to exclude for this set of tests.
|
||||
uses_polling: set to False if the test is not sensitive to polling methodology.
|
||||
uses_event_engine: set to False if the test is not sensitive to
|
||||
EventEngine implementation differences
|
||||
|
||||
Returns:
|
||||
A list of dictionaries containing modified values of name, srcs, deps, tags, and args.
|
||||
"""
|
||||
|
||||
experiments = {}
|
||||
|
||||
# buildifier: disable=uninitialized
|
||||
def _populate_experiments_platform_config(config, platform_experiments_map):
|
||||
for platform, experiments_on_platform in platform_experiments_map.items():
|
||||
for mode, tag_to_experiments in experiments_on_platform.items():
|
||||
if mode not in config:
|
||||
config[mode] = {}
|
||||
for tag in tags:
|
||||
if tag not in tag_to_experiments:
|
||||
continue
|
||||
for experiment in tag_to_experiments[tag]:
|
||||
if experiment not in config[mode]:
|
||||
config[mode][experiment] = []
|
||||
config[mode][experiment].append(platform)
|
||||
|
||||
_populate_experiments_platform_config(experiments, EXPERIMENTS)
|
||||
_populate_experiments_platform_config(experiments, TEST_EXPERIMENTS)
|
||||
|
||||
mode_config = {
|
||||
# format: <mode>: (enabled_target_tags, disabled_target_tags)
|
||||
"on": (None, []),
|
||||
"off": ([], None),
|
||||
}
|
||||
|
||||
must_have_tags = [
|
||||
# We don't run experiments on cmake builds
|
||||
"bazel_only",
|
||||
# Nor on mac
|
||||
"no_mac",
|
||||
# Nor on arm64
|
||||
"no_arm64",
|
||||
]
|
||||
|
||||
def _update_experiments_platform_test_tags(tags, platforms):
|
||||
if "posix" not in platforms:
|
||||
if "no_linux" not in tags:
|
||||
tags.append("no_linux")
|
||||
if "no_mac" not in tags:
|
||||
tags.append("no_mac")
|
||||
if "windows" not in platforms:
|
||||
if "no_windows" not in tags:
|
||||
tags.append("no_windows")
|
||||
if "ios" not in platforms:
|
||||
if "no_test_ios" not in tags:
|
||||
tags.append("no_test_ios")
|
||||
return tags
|
||||
|
||||
base_params = {
|
||||
"name": name,
|
||||
"srcs": srcs,
|
||||
"deps": deps,
|
||||
"tags": tags,
|
||||
"args": args,
|
||||
"exclude_pollers": exclude_pollers,
|
||||
"uses_polling": uses_polling,
|
||||
"uses_event_engine": uses_event_engine,
|
||||
"flaky": flaky,
|
||||
}
|
||||
|
||||
experiment_config = expand_poller_config(**base_params)
|
||||
experiment_enables = {k: v for k, v in EXPERIMENT_ENABLES.items() + TEST_EXPERIMENT_ENABLES.items()}
|
||||
experiment_pollers = EXPERIMENT_POLLERS + TEST_EXPERIMENT_POLLERS
|
||||
for mode, config in mode_config.items():
|
||||
enabled_tags, disabled_tags = config
|
||||
if enabled_tags != None:
|
||||
for experiment in experiments[mode].keys():
|
||||
experiment_params = dict(base_params)
|
||||
experiment_params["uses_polling"] = uses_polling and (experiment in experiment_pollers)
|
||||
for config in expand_poller_config(**experiment_params):
|
||||
config = dict(config)
|
||||
config["name"] = config["name"] + "@experiment=" + experiment
|
||||
env = dict(config["env"])
|
||||
env["GRPC_EXPERIMENTS"] = experiment_enables[experiment]
|
||||
env["GRPC_CI_EXPERIMENTS"] = "1"
|
||||
config["env"] = env
|
||||
tags = config["tags"] + ["experiment_variation"]
|
||||
for tag in must_have_tags + enabled_tags:
|
||||
if tag not in tags:
|
||||
tags = tags + [tag]
|
||||
config["tags"] = _update_experiments_platform_test_tags(tags, experiments[mode][experiment])
|
||||
config["flaky"] = True
|
||||
experiment_config.append(config)
|
||||
if disabled_tags != None:
|
||||
for experiment in experiments[mode].keys():
|
||||
experiment_params = dict(base_params)
|
||||
experiment_params["uses_polling"] = uses_polling and (experiment in experiment_pollers)
|
||||
for config in expand_poller_config(**experiment_params):
|
||||
config = dict(config)
|
||||
config["name"] = config["name"] + "@experiment=no_" + experiment
|
||||
env = dict(config["env"])
|
||||
env["GRPC_EXPERIMENTS"] = "-" + experiment
|
||||
env["GRPC_CI_EXPERIMENTS"] = "1"
|
||||
config["env"] = env
|
||||
tags = config["tags"] + ["experiment_variation"]
|
||||
for tag in must_have_tags + disabled_tags:
|
||||
if tag not in tags:
|
||||
tags = tags + [tag]
|
||||
config["tags"] = _update_experiments_platform_test_tags(tags, experiments[mode][experiment])
|
||||
experiment_config.append(config)
|
||||
return experiment_config
|
||||
|
||||
def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = [], uses_polling = True, language = "C++", size = "medium", timeout = None, tags = [], exec_compatible_with = [], exec_properties = {}, shard_count = None, flaky = None, copts = [], linkstatic = None, exclude_pollers = [], uses_event_engine = True):
|
||||
"""A cc_test target for use in the gRPC repo.
|
||||
|
||||
|
|
@ -541,9 +357,9 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
|
|||
EventEngine implementation differences
|
||||
"""
|
||||
if language.upper() == "C":
|
||||
copts = copts + if_not_windows(["-std=c11"])
|
||||
copts = copts + if_not_windows(["-std=c99"])
|
||||
|
||||
core_deps = deps + _get_external_deps(external_deps) + ["//test/core/test_util:grpc_suppressions"]
|
||||
core_deps = deps + _get_external_deps(external_deps)
|
||||
|
||||
# Test args for all tests
|
||||
test_args = {
|
||||
|
|
@ -555,44 +371,41 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
|
|||
"exec_compatible_with": exec_compatible_with,
|
||||
"exec_properties": exec_properties,
|
||||
"shard_count": shard_count,
|
||||
"flaky": flaky,
|
||||
"linkstatic": linkstatic,
|
||||
}
|
||||
|
||||
if "grpc-fuzzer" not in tags and "no_test_ios" not in tags:
|
||||
ios_cc_test(
|
||||
ios_cc_test(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
tags = tags,
|
||||
deps = core_deps,
|
||||
args = args,
|
||||
**test_args
|
||||
)
|
||||
if not uses_polling:
|
||||
# the test behavior doesn't depend on polling, just generate the test
|
||||
native.cc_test(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
tags = tags,
|
||||
tags = tags + ["no_uses_polling"],
|
||||
deps = core_deps,
|
||||
args = args,
|
||||
flaky = True,
|
||||
**test_args
|
||||
)
|
||||
return
|
||||
|
||||
native.cc_library(
|
||||
name = "%s_TEST_LIBRARY" % name,
|
||||
testonly = 1,
|
||||
srcs = srcs,
|
||||
deps = core_deps,
|
||||
tags = tags,
|
||||
)
|
||||
|
||||
for poller_config in expand_tests(name, srcs, core_deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky):
|
||||
if poller_config["srcs"] != srcs:
|
||||
fail("srcs changed")
|
||||
if poller_config["deps"] != core_deps:
|
||||
fail("deps changed: %r --> %r" % (deps, poller_config["deps"]))
|
||||
for poller_config in expand_tests_for_each_poller_and_engine(name, srcs, core_deps, tags, args, exclude_pollers, uses_event_engine):
|
||||
native.cc_test(
|
||||
name = poller_config["name"],
|
||||
deps = ["%s_TEST_LIBRARY" % name],
|
||||
srcs = poller_config["srcs"],
|
||||
deps = poller_config["deps"],
|
||||
tags = poller_config["tags"],
|
||||
args = poller_config["args"],
|
||||
env = poller_config["env"],
|
||||
flaky = poller_config["flaky"],
|
||||
**test_args
|
||||
)
|
||||
|
||||
def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], data = [], language = "C++", testonly = False, linkshared = False, linkopts = [], tags = [], features = [], visibility = None):
|
||||
def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], data = [], language = "C++", testonly = False, linkshared = False, linkopts = [], tags = [], features = []):
|
||||
"""Generates a cc_binary for use in the gRPC repo.
|
||||
|
||||
Args:
|
||||
|
|
@ -608,12 +421,10 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
|
|||
linkopts: linkopts to supply to the cc_binary.
|
||||
tags: Tags to apply to the target.
|
||||
features: features to be supplied to the cc_binary.
|
||||
visibility: The visibility of the target.
|
||||
"""
|
||||
visibility = _update_visibility(visibility)
|
||||
copts = []
|
||||
if language.upper() == "C":
|
||||
copts = ["-std=c11"]
|
||||
copts = ["-std=c99"]
|
||||
native.cc_binary(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
|
|
@ -621,7 +432,7 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
|
|||
data = data,
|
||||
testonly = testonly,
|
||||
linkshared = linkshared,
|
||||
deps = deps + _get_external_deps(external_deps) + ["//test/core/test_util:grpc_suppressions"],
|
||||
deps = deps + _get_external_deps(external_deps),
|
||||
copts = GRPC_DEFAULT_COPTS + copts,
|
||||
linkopts = if_not_windows(["-pthread"]) + linkopts,
|
||||
tags = tags,
|
||||
|
|
@ -635,17 +446,10 @@ def grpc_generate_one_off_targets():
|
|||
name = "grpc_objc",
|
||||
actual = "//:grpc",
|
||||
)
|
||||
native.config_setting(
|
||||
name = "windows_other",
|
||||
values = {"define": "GRPC_WINDOWS_OTHER=1"},
|
||||
)
|
||||
|
||||
def grpc_generate_objc_one_off_targets():
|
||||
pass
|
||||
|
||||
def grpc_generate_one_off_internal_targets():
|
||||
pass
|
||||
|
||||
def grpc_sh_test(name, srcs = [], args = [], data = [], uses_polling = True, size = "medium", timeout = None, tags = [], exec_compatible_with = [], exec_properties = {}, shard_count = None, flaky = None, exclude_pollers = [], uses_event_engine = True):
|
||||
"""Execute an sh_test for every <poller> x <EventEngine> combination
|
||||
|
||||
|
|
@ -675,17 +479,25 @@ def grpc_sh_test(name, srcs = [], args = [], data = [], uses_polling = True, siz
|
|||
"exec_compatible_with": exec_compatible_with,
|
||||
"exec_properties": exec_properties,
|
||||
"shard_count": shard_count,
|
||||
"flaky": flaky,
|
||||
}
|
||||
if not uses_polling:
|
||||
native.sh_test(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
args = args,
|
||||
tags = tags,
|
||||
**test_args
|
||||
)
|
||||
return
|
||||
|
||||
for poller_config in expand_tests(name, srcs, [], tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky):
|
||||
for poller_config in expand_tests_for_each_poller_and_engine(name, srcs, [], tags, args, exclude_pollers, uses_event_engine):
|
||||
native.sh_test(
|
||||
name = poller_config["name"],
|
||||
srcs = poller_config["srcs"],
|
||||
deps = poller_config["deps"],
|
||||
tags = poller_config["tags"],
|
||||
args = poller_config["args"],
|
||||
env = poller_config["env"],
|
||||
flaky = poller_config["flaky"],
|
||||
**test_args
|
||||
)
|
||||
|
||||
|
|
@ -739,24 +551,14 @@ def grpc_package(name, visibility = "private", features = []):
|
|||
features = features,
|
||||
)
|
||||
|
||||
def grpc_filegroup(name, srcs, **kwargs):
|
||||
native.filegroup(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
def grpc_objc_library(
|
||||
name,
|
||||
srcs = [],
|
||||
hdrs = [],
|
||||
non_arc_srcs = [],
|
||||
textual_hdrs = [],
|
||||
testonly = False,
|
||||
data = [],
|
||||
deps = [],
|
||||
defines = [],
|
||||
sdk_frameworks = [],
|
||||
includes = [],
|
||||
visibility = ["//visibility:public"]):
|
||||
"""The grpc version of objc_library, only used for the Objective-C library compilation
|
||||
|
|
@ -765,12 +567,9 @@ def grpc_objc_library(
|
|||
name: name of target
|
||||
hdrs: public headers
|
||||
srcs: all source files (.m)
|
||||
non_arc_srcs: list of Objective-C files that DO NOT use ARC.
|
||||
textual_hdrs: private headers
|
||||
testonly: Whether the binary is for tests only.
|
||||
data: any other bundle resources
|
||||
defines: preprocessors
|
||||
sdk_frameworks: sdks
|
||||
includes: added to search path, always [the path to objc directory]
|
||||
deps: dependencies
|
||||
visibility: visibility, default to public
|
||||
|
|
@ -780,15 +579,11 @@ def grpc_objc_library(
|
|||
name = name,
|
||||
hdrs = hdrs,
|
||||
srcs = srcs,
|
||||
non_arc_srcs = non_arc_srcs,
|
||||
textual_hdrs = textual_hdrs,
|
||||
copts = GRPC_DEFAULT_COPTS + ["-ObjC++", "-std=gnu++14"],
|
||||
testonly = testonly,
|
||||
data = data,
|
||||
deps = deps,
|
||||
defines = defines,
|
||||
includes = includes,
|
||||
sdk_frameworks = sdk_frameworks,
|
||||
visibility = visibility,
|
||||
)
|
||||
|
||||
|
|
@ -804,22 +599,3 @@ def python_config_settings():
|
|||
name = "python3",
|
||||
flag_values = {"@bazel_tools//tools/python:python_version": "PY3"},
|
||||
)
|
||||
|
||||
# buildifier: disable=unnamed-macro
|
||||
def grpc_clang_cl_settings():
|
||||
native.platform(
|
||||
name = "x64_windows-clang-cl",
|
||||
constraint_values = [
|
||||
"@platforms//cpu:x86_64",
|
||||
"@platforms//os:windows",
|
||||
"@bazel_tools//tools/cpp:clang-cl",
|
||||
],
|
||||
)
|
||||
native.config_setting(
|
||||
name = "windows_clang",
|
||||
constraint_values = [
|
||||
"@platforms//cpu:x86_64",
|
||||
"@platforms//os:windows",
|
||||
"@bazel_tools//tools/cpp:clang-cl",
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -14,32 +14,192 @@
|
|||
"""Load dependencies needed to compile and test the grpc library as a 3rd-party consumer."""
|
||||
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
load("//bazel:grpc_python_deps.bzl", "grpc_python_deps")
|
||||
load("@com_github_grpc_grpc//bazel:grpc_python_deps.bzl", "grpc_python_deps")
|
||||
|
||||
# buildifier: disable=unnamed-macro
|
||||
def grpc_deps():
|
||||
"""Loads dependencies need to compile and test the grpc library."""
|
||||
|
||||
if "platforms" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "platforms",
|
||||
sha256 = "8150406605389ececb6da07cbcb509d5637a3ab9a24bc69b1101531367d89d74",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz",
|
||||
"https://github.com/bazelbuild/platforms/releases/download/0.0.8/platforms-0.0.8.tar.gz",
|
||||
],
|
||||
)
|
||||
native.bind(
|
||||
name = "upb_lib",
|
||||
actual = "@upb//:upb",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "upb_reflection",
|
||||
actual = "@upb//:reflection",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "upb_lib_descriptor",
|
||||
actual = "@upb//:descriptor_upb_proto",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "upb_lib_descriptor_reflection",
|
||||
actual = "@upb//:descriptor_upb_proto_reflection",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "upb_textformat_lib",
|
||||
actual = "@upb//:textformat",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "upb_json_lib",
|
||||
actual = "@upb//:json",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "upb_generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
|
||||
actual = "@upb//:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "absl",
|
||||
actual = "@com_google_absl//absl",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "absl-base",
|
||||
actual = "@com_google_absl//absl/base",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "absl-time",
|
||||
actual = "@com_google_absl//absl/time:time",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "libssl",
|
||||
actual = "@boringssl//:ssl",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "libcrypto",
|
||||
actual = "@boringssl//:crypto",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "madler_zlib",
|
||||
actual = "@zlib//:zlib",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "protobuf",
|
||||
actual = "@com_google_protobuf//:protobuf",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "protobuf_clib",
|
||||
actual = "@com_google_protobuf//:protoc_lib",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "protobuf_headers",
|
||||
actual = "@com_google_protobuf//:protobuf_headers",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "protocol_compiler",
|
||||
actual = "@com_google_protobuf//:protoc",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "cares",
|
||||
actual = "@com_github_cares_cares//:ares",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "gtest",
|
||||
actual = "@com_google_googletest//:gtest",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "benchmark",
|
||||
actual = "@com_github_google_benchmark//:benchmark",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "re2",
|
||||
actual = "@com_googlesource_code_re2//:re2",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "grpc_cpp_plugin",
|
||||
actual = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "grpc++_codegen_proto",
|
||||
actual = "@com_github_grpc_grpc//:grpc++_codegen_proto",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "opencensus-context",
|
||||
actual = "@io_opencensus_cpp//opencensus/context:context",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "opencensus-trace",
|
||||
actual = "@io_opencensus_cpp//opencensus/trace:trace",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "opencensus-trace-context_util",
|
||||
actual = "@io_opencensus_cpp//opencensus/trace:context_util",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "opencensus-trace-propagation",
|
||||
actual = "@io_opencensus_cpp//opencensus/trace:grpc_trace_bin",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "opencensus-stats",
|
||||
actual = "@io_opencensus_cpp//opencensus/stats:stats",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "opencensus-stats-test",
|
||||
actual = "@io_opencensus_cpp//opencensus/stats:test_utils",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "opencensus-with-tag-map",
|
||||
actual = "@io_opencensus_cpp//opencensus/tags:with_tag_map",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "opencensus-tags",
|
||||
actual = "@io_opencensus_cpp//opencensus/tags:tags",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "opencensus-tags-context_util",
|
||||
actual = "@io_opencensus_cpp//opencensus/tags:context_util",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "libuv",
|
||||
actual = "@com_github_libuv_libuv//:libuv",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "libuv_test",
|
||||
actual = "@com_github_libuv_libuv//:libuv_test",
|
||||
)
|
||||
|
||||
if "boringssl" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "boringssl",
|
||||
# Use github mirror instead of https://boringssl.googlesource.com/boringssl
|
||||
# to obtain a boringssl archive with consistent sha256
|
||||
sha256 = "9f441d72fccb9a3faf96470478c8ccfaaeb8db1cffd4d78b698f782124dad1b0",
|
||||
strip_prefix = "boringssl-b8a2bffc598f230484ff48a247526a9820facfc2",
|
||||
sha256 = "ad0b806b6c5cbd6cae121c608945d5fed468748e330632e8d53315089ad52c67",
|
||||
strip_prefix = "boringssl-6195bf8242156c9a2fa75702eee058f91b86a88b",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/b8a2bffc598f230484ff48a247526a9820facfc2.tar.gz",
|
||||
"https://github.com/google/boringssl/archive/b8a2bffc598f230484ff48a247526a9820facfc2.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/6195bf8242156c9a2fa75702eee058f91b86a88b.tar.gz",
|
||||
"https://github.com/google/boringssl/archive/6195bf8242156c9a2fa75702eee058f91b86a88b.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -47,85 +207,70 @@ def grpc_deps():
|
|||
http_archive(
|
||||
name = "zlib",
|
||||
build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD",
|
||||
sha256 = "18337cdb32562003c39d9f7322b9a166ad4abfb2b909566428e11f96d2385586",
|
||||
strip_prefix = "zlib-09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851",
|
||||
sha256 = "90f43a9c998740e8a0db24b0af0147033db2aaaa99423129abbd76640757cac9",
|
||||
strip_prefix = "zlib-04f42ceca40f73e2978b50e93806c2a18c1281fc",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/madler/zlib/archive/09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851.tar.gz",
|
||||
"https://github.com/madler/zlib/archive/09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/madler/zlib/archive/04f42ceca40f73e2978b50e93806c2a18c1281fc.tar.gz",
|
||||
"https://github.com/madler/zlib/archive/04f42ceca40f73e2978b50e93806c2a18c1281fc.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "com_google_protobuf" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_google_protobuf",
|
||||
sha256 = "387478260190c540388839a3449c635a69708d92fc38ea6e2364b1196db90ea5",
|
||||
strip_prefix = "protobuf-2434ef2adf0c74149b9d547ac5fb545a1ff8b6b5",
|
||||
sha256 = "245da8acf76b24317c885b8157b7ddcbe5e4919bd8ff60def824c8ed3ee49a8e",
|
||||
strip_prefix = "protobuf-b464cfbee18c71c40e761a5273ad369f3547294b",
|
||||
urls = [
|
||||
# https://github.com/protocolbuffers/protobuf/commits/v26.1
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/2434ef2adf0c74149b9d547ac5fb545a1ff8b6b5.tar.gz",
|
||||
"https://github.com/protocolbuffers/protobuf/archive/2434ef2adf0c74149b9d547ac5fb545a1ff8b6b5.tar.gz",
|
||||
],
|
||||
patches = [
|
||||
"@com_github_grpc_grpc//third_party:protobuf.patch",
|
||||
"@com_github_grpc_grpc//third_party:protobuf.10007.patch",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/protobuf/archive/b464cfbee18c71c40e761a5273ad369f3547294b.tar.gz",
|
||||
"https://github.com/protocolbuffers/protobuf/archive/b464cfbee18c71c40e761a5273ad369f3547294b.tar.gz",
|
||||
],
|
||||
patches = ["@com_github_grpc_grpc//third_party:protobuf.patch"],
|
||||
patch_args = ["-p1"],
|
||||
)
|
||||
|
||||
if "com_google_googletest" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_google_googletest",
|
||||
sha256 = "31bf78bd91b96dd5e24fab3bb1d7f3f7453ccbaceec9afb86d6e4816a15ab109",
|
||||
strip_prefix = "googletest-2dd1c131950043a8ad5ab0d2dda0e0970596586a",
|
||||
sha256 = "c8de6c60e12ad014a28225c5247ee735861d85cf906df617f6a29954ca05f547",
|
||||
strip_prefix = "googletest-0e402173c97aea7a00749e825b194bfede4f2e45",
|
||||
urls = [
|
||||
# 2023-10-09
|
||||
"https://github.com/google/googletest/archive/2dd1c131950043a8ad5ab0d2dda0e0970596586a.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "com_google_fuzztest" not in native.existing_rules():
|
||||
# when updating this remember to run:
|
||||
# bazel run @com_google_fuzztest//bazel:setup_configs > tools/fuzztest.bazelrc
|
||||
http_archive(
|
||||
name = "com_google_fuzztest",
|
||||
sha256 = "cdf8d8cd3cdc77280a7c59b310edf234e489a96b6e727cb271e7dfbeb9bcca8d",
|
||||
strip_prefix = "fuzztest-4ecaeb5084a061a862af8f86789ee184cd3d3f18",
|
||||
urls = [
|
||||
# 2023-05-16
|
||||
"https://github.com/google/fuzztest/archive/4ecaeb5084a061a862af8f86789ee184cd3d3f18.tar.gz",
|
||||
# 2022-02-09
|
||||
"https://github.com/google/googletest/archive/0e402173c97aea7a00749e825b194bfede4f2e45.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "rules_cc" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "rules_cc",
|
||||
sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf",
|
||||
strip_prefix = "rules_cc-0.0.9",
|
||||
sha256 = "35f2fb4ea0b3e61ad64a369de284e4fbbdcdba71836a5555abb5e194cf119509",
|
||||
strip_prefix = "rules_cc-624b5d59dfb45672d4239422fa1e3de1822ee110",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz",
|
||||
"https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz",
|
||||
#2019-08-15
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_cc/archive/624b5d59dfb45672d4239422fa1e3de1822ee110.tar.gz",
|
||||
"https://github.com/bazelbuild/rules_cc/archive/624b5d59dfb45672d4239422fa1e3de1822ee110.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "com_github_google_benchmark" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_github_google_benchmark",
|
||||
sha256 = "8e7b955f04bc6984e4f14074d0d191474f76a6c8e849e04a9dced49bc975f2d4",
|
||||
strip_prefix = "benchmark-344117638c8ff7e239044fd0fa7085839fc03021",
|
||||
sha256 = "0b921a3bc39e35f4275c8dcc658af2391c150fb966102341287b0401ff2e6f21",
|
||||
strip_prefix = "benchmark-0baacde3618ca617da95375e0af13ce1baadea47",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/benchmark/archive/344117638c8ff7e239044fd0fa7085839fc03021.tar.gz",
|
||||
"https://github.com/google/benchmark/archive/344117638c8ff7e239044fd0fa7085839fc03021.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/benchmark/archive/0baacde3618ca617da95375e0af13ce1baadea47.tar.gz",
|
||||
"https://github.com/google/benchmark/archive/0baacde3618ca617da95375e0af13ce1baadea47.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "com_googlesource_code_re2" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_googlesource_code_re2",
|
||||
sha256 = "1ae8ccfdb1066a731bba6ee0881baad5efd2cd661acd9569b689f2586e1a50e9",
|
||||
strip_prefix = "re2-2022-04-01",
|
||||
sha256 = "319a58a58d8af295db97dfeecc4e250179c5966beaa2d842a82f0a013b6a239b",
|
||||
# Release 2021-09-01
|
||||
strip_prefix = "re2-8e08f47b11b413302749c0d8b17a1c94777495d5",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/re2/archive/2022-04-01.tar.gz",
|
||||
"https://github.com/google/re2/archive/2022-04-01.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/re2/archive/8e08f47b11b413302749c0d8b17a1c94777495d5.tar.gz",
|
||||
"https://github.com/google/re2/archive/8e08f47b11b413302749c0d8b17a1c94777495d5.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -133,33 +278,33 @@ def grpc_deps():
|
|||
http_archive(
|
||||
name = "com_github_cares_cares",
|
||||
build_file = "@com_github_grpc_grpc//third_party:cares/cares.BUILD",
|
||||
sha256 = "bf26e5b25e259911914a85ae847b6d723488adb5af4f8bdeb9d0871a318476e3",
|
||||
strip_prefix = "c-ares-6360e96b5cf8e5980c887ce58ef727e53d77243a",
|
||||
sha256 = "ec76c5e79db59762776bece58b69507d095856c37b81fd35bfb0958e74b61d93",
|
||||
strip_prefix = "c-ares-6654436a307a5a686b008c1d4c93b0085da6e6d8",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/c-ares/c-ares/archive/6360e96b5cf8e5980c887ce58ef727e53d77243a.tar.gz",
|
||||
"https://github.com/c-ares/c-ares/archive/6360e96b5cf8e5980c887ce58ef727e53d77243a.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/c-ares/c-ares/archive/6654436a307a5a686b008c1d4c93b0085da6e6d8.tar.gz",
|
||||
"https://github.com/c-ares/c-ares/archive/6654436a307a5a686b008c1d4c93b0085da6e6d8.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "com_google_absl" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_google_absl",
|
||||
sha256 = "338420448b140f0dfd1a1ea3c3ce71b3bc172071f24f4d9a57d59b45037da440",
|
||||
strip_prefix = "abseil-cpp-20240116.0",
|
||||
sha256 = "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4",
|
||||
strip_prefix = "abseil-cpp-20211102.0",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/20240116.0.tar.gz",
|
||||
"https://github.com/abseil/abseil-cpp/archive/20240116.0.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/20211102.0.tar.gz",
|
||||
"https://github.com/abseil/abseil-cpp/archive/20211102.0.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "bazel_toolchains" not in native.existing_rules():
|
||||
# list of releases is at https://github.com/bazelbuild/bazel-toolchains/releases
|
||||
# list of releases is at https://releases.bazel.build/bazel-toolchains.html
|
||||
http_archive(
|
||||
name = "bazel_toolchains",
|
||||
sha256 = "179ec02f809e86abf56356d8898c8bd74069f1bd7c56044050c2cd3d79d0e024",
|
||||
strip_prefix = "bazel-toolchains-4.1.0",
|
||||
urls = [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz",
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/4.1.0.tar.gz",
|
||||
"https://github.com/bazelbuild/bazel-toolchains/releases/download/4.1.0/bazel-toolchains-4.1.0.tar.gz",
|
||||
],
|
||||
)
|
||||
|
|
@ -168,10 +313,10 @@ def grpc_deps():
|
|||
http_archive(
|
||||
name = "bazel_skylib",
|
||||
urls = [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
||||
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
|
||||
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz",
|
||||
],
|
||||
sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
|
||||
sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
|
||||
)
|
||||
|
||||
if "bazel_compdb" not in native.existing_rules():
|
||||
|
|
@ -188,22 +333,33 @@ def grpc_deps():
|
|||
if "io_opencensus_cpp" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "io_opencensus_cpp",
|
||||
sha256 = "46b3b5812c150a21bacf860c2f76fc42b89773ed77ee954c32adeb8593aa2a8e",
|
||||
strip_prefix = "opencensus-cpp-5501a1a255805e0be83a41348bb5f2630d5ed6b3",
|
||||
sha256 = "90d6fafa8b1a2ea613bf662731d3086e1c2ed286f458a95c81744df2dbae41b1",
|
||||
strip_prefix = "opencensus-cpp-c9a4da319bc669a772928ffc55af4a61be1a1176",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-cpp/archive/5501a1a255805e0be83a41348bb5f2630d5ed6b3.tar.gz",
|
||||
"https://github.com/census-instrumentation/opencensus-cpp/archive/5501a1a255805e0be83a41348bb5f2630d5ed6b3.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-cpp/archive/c9a4da319bc669a772928ffc55af4a61be1a1176.tar.gz",
|
||||
"https://github.com/census-instrumentation/opencensus-cpp/archive/c9a4da319bc669a772928ffc55af4a61be1a1176.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "upb" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "upb",
|
||||
sha256 = "d0fe259d650bf9547e75896a1307bfc7034195e4ae89f5139814d295991ba681",
|
||||
strip_prefix = "upb-bef53686ec702607971bd3ea4d4fefd80c6cc6e8",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/bef53686ec702607971bd3ea4d4fefd80c6cc6e8.tar.gz",
|
||||
"https://github.com/protocolbuffers/upb/archive/bef53686ec702607971bd3ea4d4fefd80c6cc6e8.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "envoy_api" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "envoy_api",
|
||||
sha256 = "ddd3beedda1178a79e0d988f76f362002aced09749452515853f106e22bd2249",
|
||||
strip_prefix = "data-plane-api-78f198cf96ecdc7120ef640406770aa01af775c4",
|
||||
sha256 = "c5807010b67033330915ca5a20483e30538ae5e689aa14b3631d6284beca4630",
|
||||
strip_prefix = "data-plane-api-9c42588c956220b48eb3099d186487c2f04d32ec",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/envoyproxy/data-plane-api/archive/78f198cf96ecdc7120ef640406770aa01af775c4.tar.gz",
|
||||
"https://github.com/envoyproxy/data-plane-api/archive/78f198cf96ecdc7120ef640406770aa01af775c4.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/envoyproxy/data-plane-api/archive/9c42588c956220b48eb3099d186487c2f04d32ec.tar.gz",
|
||||
"https://github.com/envoyproxy/data-plane-api/archive/9c42588c956220b48eb3099d186487c2f04d32ec.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -220,20 +376,32 @@ def grpc_deps():
|
|||
if "build_bazel_rules_apple" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "build_bazel_rules_apple",
|
||||
sha256 = "34c41bfb59cdaea29ac2df5a2fa79e5add609c71bb303b2ebb10985f93fa20e7",
|
||||
sha256 = "0052d452af7742c8f3a4e0929763388a66403de363775db7e90adecb2ba4944b",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_apple/releases/download/3.1.1/rules_apple.3.1.1.tar.gz",
|
||||
"https://github.com/bazelbuild/rules_apple/releases/download/3.1.1/rules_apple.3.1.1.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_apple/releases/download/0.31.3/rules_apple.0.31.3.tar.gz",
|
||||
"https://github.com/bazelbuild/rules_apple/releases/download/0.31.3/rules_apple.0.31.3.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "build_bazel_apple_support" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "build_bazel_apple_support",
|
||||
sha256 = "cf4d63f39c7ba9059f70e995bf5fe1019267d3f77379c2028561a5d7645ef67c",
|
||||
sha256 = "76df040ade90836ff5543888d64616e7ba6c3a7b33b916aa3a4b68f342d1b447",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/apple_support/releases/download/1.11.1/apple_support.1.11.1.tar.gz",
|
||||
"https://github.com/bazelbuild/apple_support/releases/download/1.11.1/apple_support.1.11.1.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/apple_support/releases/download/0.11.0/apple_support.0.11.0.tar.gz",
|
||||
"https://github.com/bazelbuild/apple_support/releases/download/0.11.0/apple_support.0.11.0.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "com_github_libuv_libuv" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_github_libuv_libuv",
|
||||
build_file = "@com_github_grpc_grpc//third_party:libuv.BUILD",
|
||||
sha256 = "5ca4e9091f3231d8ad8801862dc4e851c23af89c69141d27723157776f7291e7",
|
||||
strip_prefix = "libuv-02a9e1be252b623ee032a3137c0b0c94afbe6809",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/libuv/libuv/archive/02a9e1be252b623ee032a3137c0b0c94afbe6809.tar.gz",
|
||||
"https://github.com/libuv/libuv/archive/02a9e1be252b623ee032a3137c0b0c94afbe6809.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -242,7 +410,6 @@ def grpc_deps():
|
|||
name = "com_google_googleapis",
|
||||
sha256 = "5bb6b0253ccf64b53d6c7249625a7e3f6c3bc6402abd52d3778bfa48258703a0",
|
||||
strip_prefix = "googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92",
|
||||
build_file = Label("//bazel:googleapis.BUILD"),
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz",
|
||||
"https://github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz",
|
||||
|
|
@ -252,10 +419,10 @@ def grpc_deps():
|
|||
if "bazel_gazelle" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "bazel_gazelle",
|
||||
sha256 = "d76bf7a60fd8b050444090dfa2837a4eaf9829e1165618ee35dceca5cbdf58d5",
|
||||
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
|
||||
urls = [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.37.0/bazel-gazelle-v0.37.0.tar.gz",
|
||||
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.37.0/bazel-gazelle-v0.37.0.tar.gz",
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
|
||||
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -282,53 +449,14 @@ def grpc_deps():
|
|||
patch_args = ["-p1"],
|
||||
)
|
||||
|
||||
if "com_github_cncf_xds" not in native.existing_rules():
|
||||
if "com_github_cncf_udpa" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_github_cncf_xds",
|
||||
sha256 = "dc305e20c9fa80822322271b50aa2ffa917bf4fd3973bcec52bfc28dc32c5927",
|
||||
strip_prefix = "xds-3a472e524827f72d1ad621c4983dd5af54c46776",
|
||||
name = "com_github_cncf_udpa",
|
||||
sha256 = "5bc8365613fe2f8ce6cc33959b7667b13b7fe56cb9d16ba740c06e1a7c4242fc",
|
||||
strip_prefix = "xds-cb28da3451f158a947dfc45090fe92b07b243bc1",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/cncf/xds/archive/3a472e524827f72d1ad621c4983dd5af54c46776.tar.gz",
|
||||
"https://github.com/cncf/xds/archive/3a472e524827f72d1ad621c4983dd5af54c46776.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
# TODO(stanleycheung): remove this when prometheus-cpp AND
|
||||
# opentelemetry-cpp cut a new release
|
||||
# This override is needed because this fix
|
||||
# https://github.com/jupp0r/prometheus-cpp/pull/626
|
||||
# has not been included in the latest prometheus-cpp release yet.
|
||||
# We also need opentelemetry-cpp to update their dependency on
|
||||
# prometheus-cpp after that fix is released.
|
||||
# Without the fix, we cannot build the prometheus exporter with bazel 6
|
||||
if "com_github_jupp0r_prometheus_cpp" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_github_jupp0r_prometheus_cpp",
|
||||
strip_prefix = "prometheus-cpp-b1234816facfdda29845c46696a02998a4af115a",
|
||||
urls = [
|
||||
"https://github.com/jupp0r/prometheus-cpp/archive/b123481.zip",
|
||||
],
|
||||
)
|
||||
|
||||
if "io_opentelemetry_cpp" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "io_opentelemetry_cpp",
|
||||
sha256 = "ed681d20a684b7d485a49288e7cfb2d182bf882e5c112c5f2fa3f9e9da2278fc",
|
||||
strip_prefix = "opentelemetry-cpp-4bd64c9a336fd438d6c4c9dad2e6b61b0585311f",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/open-telemetry/opentelemetry-cpp/archive/4bd64c9a336fd438d6c4c9dad2e6b61b0585311f.tar.gz",
|
||||
"https://github.com/open-telemetry/opentelemetry-cpp/archive/4bd64c9a336fd438d6c4c9dad2e6b61b0585311f.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
if "google_cloud_cpp" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "google_cloud_cpp",
|
||||
sha256 = "7ca7f583b60d2aa1274411fed3b9fb3887119b2e84244bb3fc69ea1db819e4e5",
|
||||
strip_prefix = "google-cloud-cpp-2.16.0",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz",
|
||||
"https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/cncf/xds/archive/cb28da3451f158a947dfc45090fe92b07b243bc1.tar.gz",
|
||||
"https://github.com/cncf/xds/archive/cb28da3451f158a947dfc45090fe92b07b243bc1.tar.gz",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
@ -341,6 +469,15 @@ def grpc_test_only_deps():
|
|||
|
||||
Loads dependencies that are only needed to run grpc library's tests.
|
||||
"""
|
||||
native.bind(
|
||||
name = "twisted",
|
||||
actual = "@com_github_twisted_twisted//:twisted",
|
||||
)
|
||||
|
||||
native.bind(
|
||||
name = "yaml",
|
||||
actual = "@com_github_yaml_pyyaml//:yaml",
|
||||
)
|
||||
|
||||
if "com_github_twisted_twisted" not in native.existing_rules():
|
||||
http_archive(
|
||||
|
|
@ -357,11 +494,11 @@ def grpc_test_only_deps():
|
|||
if "com_github_yaml_pyyaml" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_github_yaml_pyyaml",
|
||||
sha256 = "e34d97db6d846f5e2ad51417fd646e7ce6a3a70726ccea2a857e0580a7155f39",
|
||||
strip_prefix = "pyyaml-6.0.1",
|
||||
sha256 = "6b4314b1b2051ddb9d4fcd1634e1fa9c1bb4012954273c9ff3ef689f6ec6c93e",
|
||||
strip_prefix = "pyyaml-3.12",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/yaml/pyyaml/archive/6.0.1.zip",
|
||||
"https://github.com/yaml/pyyaml/archive/6.0.1.zip",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/yaml/pyyaml/archive/3.12.zip",
|
||||
"https://github.com/yaml/pyyaml/archive/3.12.zip",
|
||||
],
|
||||
build_file = "@com_github_grpc_grpc//third_party:yaml.BUILD",
|
||||
)
|
||||
|
|
@ -405,11 +542,11 @@ def grpc_test_only_deps():
|
|||
if "com_google_libprotobuf_mutator" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_google_libprotobuf_mutator",
|
||||
sha256 = "9c8f800aed088cdf89adc3eaaa66b56b4da7da041f26338aa71a2ab43d860d46",
|
||||
sha256 = "b847c71723d8ce0b747aa661d7f3a07f1d16c595bf9c0202f30febc2f9a24a06",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/libprotobuf-mutator/archive/1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d.tar.gz",
|
||||
"https://github.com/google/libprotobuf-mutator/archive/1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d.tar.gz",
|
||||
"https://github.com/google/libprotobuf-mutator/archive/ffd86a32874e5c08a143019aad1aaf0907294c9f.tar.gz",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/libprotobuf-mutator/archive/ffd86a32874e5c08a143019aad1aaf0907294c9f.tar.gz",
|
||||
],
|
||||
strip_prefix = "libprotobuf-mutator-1f95f8083066f5b38fd2db172e7e7f9aa7c49d2d",
|
||||
strip_prefix = "libprotobuf-mutator-ffd86a32874e5c08a143019aad1aaf0907294c9f",
|
||||
build_file = "@com_github_grpc_grpc//third_party:libprotobuf_mutator.BUILD",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -20,9 +20,8 @@ load("@com_envoyproxy_protoc_gen_validate//:dependencies.bzl", "go_third_party")
|
|||
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
|
||||
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
|
||||
load("@envoy_api//bazel:repositories.bzl", "api_dependencies")
|
||||
load("@google_cloud_cpp//bazel:google_cloud_cpp_deps.bzl", "google_cloud_cpp_deps")
|
||||
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
|
||||
load("@rules_python//python:repositories.bzl", "py_repositories")
|
||||
load("@upb//bazel:workspace_deps.bzl", "upb_deps")
|
||||
|
||||
def grpc_extra_deps(ignore_version_differences = False):
|
||||
"""Loads the extra dependencies.
|
||||
|
|
@ -49,10 +48,12 @@ def grpc_extra_deps(ignore_version_differences = False):
|
|||
"""
|
||||
protobuf_deps()
|
||||
|
||||
upb_deps()
|
||||
|
||||
api_dependencies()
|
||||
|
||||
go_rules_dependencies()
|
||||
go_register_toolchains(version = "1.20")
|
||||
go_register_toolchains(version = "1.18")
|
||||
gazelle_dependencies()
|
||||
|
||||
# Pull-in the go 3rd party dependencies for protoc_gen_validate, which is
|
||||
|
|
@ -70,7 +71,3 @@ def grpc_extra_deps(ignore_version_differences = False):
|
|||
grpc = True,
|
||||
python = True,
|
||||
)
|
||||
|
||||
google_cloud_cpp_deps()
|
||||
|
||||
py_repositories()
|
||||
|
|
|
|||
|
|
@ -19,12 +19,43 @@ load("@com_github_grpc_grpc//third_party/py:python_configure.bzl", "python_confi
|
|||
# buildifier: disable=unnamed-macro
|
||||
def grpc_python_deps():
|
||||
"""Loads dependencies for gRPC Python."""
|
||||
if "rules_python" not in native.existing_rules():
|
||||
|
||||
# protobuf binds to the name "six", so we can't use it here.
|
||||
# See https://github.com/bazelbuild/bazel/issues/1952 for why bind is
|
||||
# horrible.
|
||||
if "six" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "rules_python",
|
||||
sha256 = "9d04041ac92a0985e344235f5d946f71ac543f1b1565f2cdbc9a2aaee8adf55b",
|
||||
strip_prefix = "rules_python-0.26.0",
|
||||
url = "https://github.com/bazelbuild/rules_python/releases/download/0.26.0/rules_python-0.26.0.tar.gz",
|
||||
name = "six",
|
||||
build_file = "@com_github_grpc_grpc//third_party:six.BUILD",
|
||||
sha256 = "1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
|
||||
urls = ["https://files.pythonhosted.org/packages/71/39/171f1c67cd00715f190ba0b100d606d440a28c93c7714febeca8b79af85e/six-1.16.0.tar.gz"],
|
||||
)
|
||||
|
||||
if "enum34" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "enum34",
|
||||
build_file = "@com_github_grpc_grpc//third_party:enum34.BUILD",
|
||||
strip_prefix = "enum34-1.1.6",
|
||||
sha256 = "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1",
|
||||
urls = ["https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz"],
|
||||
)
|
||||
|
||||
if "futures" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "futures",
|
||||
build_file = "@com_github_grpc_grpc//third_party:futures.BUILD",
|
||||
strip_prefix = "futures-3.3.0",
|
||||
sha256 = "7e033af76a5e35f58e56da7a91e687706faf4e7bdfb2cbc3f2cca6b9bcda9794",
|
||||
urls = ["https://files.pythonhosted.org/packages/47/04/5fc6c74ad114032cd2c544c575bffc17582295e9cd6a851d6026ab4b2c00/futures-3.3.0.tar.gz"],
|
||||
)
|
||||
|
||||
if "io_bazel_rules_python" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "io_bazel_rules_python",
|
||||
url = "https://github.com/bazelbuild/rules_python/releases/download/0.4.0/rules_python-0.4.0.tar.gz",
|
||||
sha256 = "954aa89b491be4a083304a2cb838019c8b8c3720a7abb9c4cb81ac7a24230cea",
|
||||
patches = ["@com_github_grpc_grpc//third_party:rules_python.patch"],
|
||||
patch_args = ["-p1"],
|
||||
)
|
||||
|
||||
python_configure(name = "local_config_python")
|
||||
|
|
@ -38,9 +69,9 @@ def grpc_python_deps():
|
|||
http_archive(
|
||||
name = "cython",
|
||||
build_file = "@com_github_grpc_grpc//third_party:cython.BUILD",
|
||||
sha256 = "a2da56cc22be823acf49741b9aa3aa116d4f07fa8e8b35a3cb08b8447b37c607",
|
||||
strip_prefix = "cython-0.29.35",
|
||||
sha256 = "bb72b2f0ef029472759c711f0a4bded6e15e3f9bda3797550cef3c1d87d02283",
|
||||
strip_prefix = "cython-0.29.26",
|
||||
urls = [
|
||||
"https://github.com/cython/cython/archive/0.29.35.tar.gz",
|
||||
"https://github.com/cython/cython/archive/0.29.26.tar.gz",
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
# Copyright 2024 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
platform(
|
||||
name = "x86_64",
|
||||
constraint_values = [
|
||||
"@platforms//os:android",
|
||||
"@platforms//cpu:x86_64",
|
||||
],
|
||||
)
|
||||
|
||||
platform(
|
||||
name = "arm64-v8a",
|
||||
constraint_values = [
|
||||
"@platforms//os:android",
|
||||
"@platforms//cpu:arm64",
|
||||
],
|
||||
)
|
||||
|
||||
platform(
|
||||
name = "armeabi-v7a",
|
||||
constraint_values = [
|
||||
"@platforms//os:android",
|
||||
"@platforms//cpu:armv7",
|
||||
],
|
||||
)
|
||||
|
|
@ -18,36 +18,24 @@ load("@rules_proto//proto:defs.bzl", "ProtoInfo")
|
|||
_PROTO_EXTENSION = ".proto"
|
||||
_VIRTUAL_IMPORTS = "/_virtual_imports/"
|
||||
|
||||
_WELL_KNOWN_PROTOS_BASE = [
|
||||
"any_proto",
|
||||
"api_proto",
|
||||
"compiler_plugin_proto",
|
||||
"descriptor_proto",
|
||||
"duration_proto",
|
||||
"empty_proto",
|
||||
"field_mask_proto",
|
||||
"source_context_proto",
|
||||
"struct_proto",
|
||||
"timestamp_proto",
|
||||
"type_proto",
|
||||
"wrappers_proto",
|
||||
]
|
||||
|
||||
def well_known_proto_libs():
|
||||
return ["@com_google_protobuf//:" + b for b in _WELL_KNOWN_PROTOS_BASE]
|
||||
return [
|
||||
"@com_google_protobuf//:any_proto",
|
||||
"@com_google_protobuf//:api_proto",
|
||||
"@com_google_protobuf//:compiler_plugin_proto",
|
||||
"@com_google_protobuf//:descriptor_proto",
|
||||
"@com_google_protobuf//:duration_proto",
|
||||
"@com_google_protobuf//:empty_proto",
|
||||
"@com_google_protobuf//:field_mask_proto",
|
||||
"@com_google_protobuf//:source_context_proto",
|
||||
"@com_google_protobuf//:struct_proto",
|
||||
"@com_google_protobuf//:timestamp_proto",
|
||||
"@com_google_protobuf//:type_proto",
|
||||
"@com_google_protobuf//:wrappers_proto",
|
||||
]
|
||||
|
||||
def is_well_known(label):
|
||||
# Bazel surfaces labels as their undelying identity, even if they are referenced
|
||||
# via aliases. Bazel also does not currently provide a way to find the real label
|
||||
# underlying an alias. So the implementation detail that the WKTs present at the
|
||||
# top level of the protobuf repo are actually backed by targets in the
|
||||
# //src/google/protobuf package leaks through here.
|
||||
# We include both the alias path and the underlying path to be resilient to
|
||||
# reversions of this change as well as for continuing compatiblity with repos
|
||||
# that happen to pull in older versions of protobuf.
|
||||
all_wkt_targets = (["@com_google_protobuf//:" + b for b in _WELL_KNOWN_PROTOS_BASE] +
|
||||
["@com_google_protobuf//src/google/protobuf:" + b for b in _WELL_KNOWN_PROTOS_BASE])
|
||||
return label in all_wkt_targets
|
||||
return label in well_known_proto_libs()
|
||||
|
||||
def get_proto_root(workspace_root):
|
||||
"""Gets the root protobuf directory.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ load(
|
|||
)
|
||||
|
||||
_GENERATED_PROTO_FORMAT = "{}_pb2.py"
|
||||
_GENERATED_PROTO_STUB_FORMAT = "{}_pb2.pyi"
|
||||
_GENERATED_GRPC_PROTO_FORMAT = "{}_pb2_grpc.py"
|
||||
|
||||
PyProtoInfo = provider(
|
||||
|
|
@ -49,10 +48,7 @@ def _gen_py_aspect_impl(target, context):
|
|||
# Early return for well-known protos.
|
||||
if is_well_known(str(context.label)):
|
||||
return [
|
||||
PyProtoInfo(
|
||||
py_info = context.attr._protobuf_library[PyInfo],
|
||||
generated_py_srcs = [],
|
||||
),
|
||||
PyProtoInfo(py_info = context.attr._protobuf_library[PyInfo]),
|
||||
]
|
||||
|
||||
protos = []
|
||||
|
|
@ -60,8 +56,7 @@ def _gen_py_aspect_impl(target, context):
|
|||
protos.append(get_staged_proto_file(target.label, context, p))
|
||||
|
||||
includes = depset(direct = protos, transitive = [target[ProtoInfo].transitive_imports])
|
||||
out_files = (declare_out_files(protos, context, _GENERATED_PROTO_FORMAT) +
|
||||
declare_out_files(protos, context, _GENERATED_PROTO_STUB_FORMAT))
|
||||
out_files = declare_out_files(protos, context, _GENERATED_PROTO_FORMAT)
|
||||
generated_py_srcs = out_files
|
||||
|
||||
tools = [context.executable._protoc]
|
||||
|
|
@ -70,7 +65,6 @@ def _gen_py_aspect_impl(target, context):
|
|||
|
||||
arguments = ([
|
||||
"--python_out={}".format(out_dir.path),
|
||||
"--pyi_out={}".format(out_dir.path),
|
||||
] + [
|
||||
"--proto_path={}".format(get_include_directory(i))
|
||||
for i in includes.to_list()
|
||||
|
|
@ -110,10 +104,10 @@ _gen_py_aspect = aspect(
|
|||
fragments = ["py"],
|
||||
attrs = {
|
||||
"_protoc": attr.label(
|
||||
default = Label("@com_google_protobuf//:protoc"),
|
||||
default = Label("//external:protocol_compiler"),
|
||||
providers = ["files_to_run"],
|
||||
executable = True,
|
||||
cfg = "exec",
|
||||
cfg = "host",
|
||||
),
|
||||
"_protobuf_library": attr.label(
|
||||
default = Label("@com_google_protobuf//:protobuf_python"),
|
||||
|
|
@ -140,7 +134,7 @@ def _generate_py_impl(context):
|
|||
for py_src in context.attr.deps[0][PyProtoInfo].generated_py_srcs:
|
||||
reimport_py_file = context.actions.declare_file(py_src.basename)
|
||||
py_sources.append(reimport_py_file)
|
||||
import_line = "from %s import *" % py_src.short_path.replace("..", "external").replace("/", ".")[:-len(".py")]
|
||||
import_line = "from %s import *" % py_src.short_path.replace("/", ".")[:-len(".py")]
|
||||
context.actions.write(reimport_py_file, import_line)
|
||||
|
||||
# Collect output PyInfo provider.
|
||||
|
|
@ -166,10 +160,10 @@ py_proto_library = rule(
|
|||
aspects = [_gen_py_aspect],
|
||||
),
|
||||
"_protoc": attr.label(
|
||||
default = Label("@com_google_protobuf//:protoc"),
|
||||
default = Label("//external:protocol_compiler"),
|
||||
providers = ["files_to_run"],
|
||||
executable = True,
|
||||
cfg = "exec",
|
||||
cfg = "host",
|
||||
),
|
||||
"_protobuf_library": attr.label(
|
||||
default = Label("@com_google_protobuf//:protobuf_python"),
|
||||
|
|
@ -190,15 +184,10 @@ def _generate_pb2_grpc_src_impl(context):
|
|||
arguments = []
|
||||
tools = [context.executable._protoc, context.executable._grpc_plugin]
|
||||
out_dir = get_out_dir(protos, context)
|
||||
if out_dir.import_path:
|
||||
# is virtual imports
|
||||
out_path = out_dir.path
|
||||
else:
|
||||
out_path = context.genfiles_dir.path
|
||||
arguments += get_plugin_args(
|
||||
context.executable._grpc_plugin,
|
||||
plugin_flags,
|
||||
out_path,
|
||||
out_dir.path,
|
||||
False,
|
||||
)
|
||||
|
||||
|
|
@ -222,11 +211,11 @@ def _generate_pb2_grpc_src_impl(context):
|
|||
py_info = _merge_pyinfos(
|
||||
[
|
||||
p,
|
||||
context.attr.grpc_library[PyInfo],
|
||||
context.attr._grpc_library[PyInfo],
|
||||
] + [dep[PyInfo] for dep in context.attr.py_deps],
|
||||
)
|
||||
|
||||
runfiles = context.runfiles(files = out_files, transitive_files = py_info.transitive_sources).merge(context.attr.grpc_library[DefaultInfo].data_runfiles)
|
||||
runfiles = context.runfiles(files = out_files, transitive_files = py_info.transitive_sources).merge(context.attr._grpc_library[DefaultInfo].data_runfiles)
|
||||
|
||||
return [
|
||||
DefaultInfo(
|
||||
|
|
@ -252,16 +241,16 @@ _generate_pb2_grpc_src = rule(
|
|||
"_grpc_plugin": attr.label(
|
||||
executable = True,
|
||||
providers = ["files_to_run"],
|
||||
cfg = "exec",
|
||||
cfg = "host",
|
||||
default = Label("//src/compiler:grpc_python_plugin"),
|
||||
),
|
||||
"_protoc": attr.label(
|
||||
executable = True,
|
||||
providers = ["files_to_run"],
|
||||
cfg = "exec",
|
||||
default = Label("@com_google_protobuf//:protoc"),
|
||||
cfg = "host",
|
||||
default = Label("//external:protocol_compiler"),
|
||||
),
|
||||
"grpc_library": attr.label(
|
||||
"_grpc_library": attr.label(
|
||||
default = Label("//src/python/grpcio/grpc:grpcio"),
|
||||
providers = [PyInfo],
|
||||
),
|
||||
|
|
@ -274,7 +263,6 @@ def py_grpc_library(
|
|||
srcs,
|
||||
deps,
|
||||
strip_prefixes = [],
|
||||
grpc_library = Label("//src/python/grpcio/grpc:grpcio"),
|
||||
**kwargs):
|
||||
"""Generate python code for gRPC services defined in a protobuf.
|
||||
|
||||
|
|
@ -288,9 +276,6 @@ def py_grpc_library(
|
|||
stripped from the beginning of foo_pb2 modules imported by the
|
||||
generated stubs. This is useful in combination with the `imports`
|
||||
attribute of the `py_library` rule.
|
||||
grpc_library: (`label`) a single `py_library` target representing the
|
||||
python gRPC library target to be depended upon. This can be used to
|
||||
generate code that depends on `grpcio` from the Python Package Index.
|
||||
**kwargs: Additional arguments to be supplied to the invocation of
|
||||
py_library.
|
||||
"""
|
||||
|
|
@ -305,6 +290,5 @@ def py_grpc_library(
|
|||
deps = srcs,
|
||||
py_deps = deps,
|
||||
strip_prefixes = strip_prefixes,
|
||||
grpc_library = grpc_library,
|
||||
**kwargs
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
7.1.0
|
||||
6.5.0
|
||||
5.0.0
|
||||
4.2.2
|
||||
3.7.2
|
||||
|
|
|
|||
|
|
@ -1,60 +0,0 @@
|
|||
# Copyright 2023 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Auto generated by tools/codegen/core/gen_experiments.py
|
||||
|
||||
"""Dictionary of tags to experiments so we know when to test different experiments."""
|
||||
|
||||
TEST_EXPERIMENT_ENABLES = {
|
||||
"test_experiment_1": "test_experiment_1",
|
||||
"test_experiment_2": "test_experiment_2",
|
||||
"test_experiment_3": "test_experiment_3",
|
||||
"test_experiment_4": "test_experiment_4",
|
||||
}
|
||||
|
||||
TEST_EXPERIMENT_POLLERS = [
|
||||
]
|
||||
|
||||
TEST_EXPERIMENTS = {
|
||||
"windows": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
"experiments_tag_test": [
|
||||
"test_experiment_1",
|
||||
],
|
||||
},
|
||||
"on": {
|
||||
},
|
||||
},
|
||||
"ios": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
},
|
||||
"on": {
|
||||
},
|
||||
},
|
||||
"posix": {
|
||||
"dbg": {
|
||||
},
|
||||
"off": {
|
||||
},
|
||||
"on": {
|
||||
"experiments_tag_test": [
|
||||
"test_experiment_1",
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -57,12 +57,21 @@ function upload {
|
|||
# upload "github.com/google/boringssl/archive/1c2769383f027befac5b75b6cedd25daf3bf4dcf.tar.gz"
|
||||
|
||||
# bazel binaries used by the tools/bazel wrapper script
|
||||
upload github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-linux-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-darwin-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-windows-x86_64.exe
|
||||
upload github.com/bazelbuild/bazel/releases/download/7.1.0/bazel-7.1.0-linux-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/7.1.0/bazel-7.1.0-darwin-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/7.1.0/bazel-7.1.0-windows-x86_64.exe
|
||||
upload github.com/bazelbuild/bazel/releases/download/1.0.0/bazel-1.0.0-linux-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/1.0.0/bazel-1.0.0-darwin-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/1.0.0/bazel-1.0.0-windows-x86_64.exe
|
||||
|
||||
upload github.com/bazelbuild/bazel/releases/download/2.2.0/bazel-2.2.0-linux-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/2.2.0/bazel-2.2.0-darwin-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/2.2.0/bazel-2.2.0-windows-x86_64.exe
|
||||
|
||||
upload github.com/bazelbuild/bazel/releases/download/3.7.1/bazel-3.7.1-linux-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/3.7.1/bazel-3.7.1-darwin-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/3.7.1/bazel-3.7.1-windows-x86_64.exe
|
||||
|
||||
upload github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-linux-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-darwin-x86_64
|
||||
upload github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-windows-x86_64.exe
|
||||
|
||||
# Collect the github archives to mirror from grpc_deps.bzl
|
||||
grep -o '"https://github.com/[^"]*"' bazel/grpc_deps.bzl | sed 's/^"https:\/\///' | sed 's/"$//' | while read -r line ; do
|
||||
|
|
|
|||
55
black.toml
55
black.toml
|
|
@ -1,55 +0,0 @@
|
|||
[tool.black]
|
||||
line-length = 80
|
||||
target-version = [
|
||||
"py37",
|
||||
"py38",
|
||||
"py39",
|
||||
"py310",
|
||||
"py311",
|
||||
]
|
||||
extend-exclude = '''
|
||||
# A regex preceded with ^/ will apply only to files and directories
|
||||
# in the root of the project.
|
||||
(
|
||||
site-packages
|
||||
| test/cpp/naming/resolver_component_tests_runner.py # AUTO-GENERATED
|
||||
# AUTO-GENERATED from a template:
|
||||
| grpc_version.py
|
||||
| src/python/grpcio/grpc_core_dependencies.py
|
||||
| src/python/grpcio/grpc/_grpcio_metadata.py
|
||||
# AUTO-GENERATED BY make_grpcio_tools.py
|
||||
| tools/distrib/python/grpcio_tools/protoc_lib_deps.py
|
||||
# AUTO-GENERATED BY make_grpcio_observability.py
|
||||
| src/python/grpcio_observability/observability_lib_deps.py
|
||||
| .*_pb2.py # autogenerated Protocol Buffer files
|
||||
| .*_pb2_grpc.py # autogenerated Protocol Buffer gRPC files
|
||||
# AUTO-GENERATED By tools/distrib/python/xds_protos/build.py
|
||||
| tools/distrib/python/xds_protos/.*
|
||||
)
|
||||
'''
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
line_length = 80
|
||||
src_paths = [
|
||||
"examples/python/data_transmission",
|
||||
"examples/python/async_streaming",
|
||||
"src/python/grpcio_tests",
|
||||
"tools/run_tests",
|
||||
]
|
||||
known_first_party = [
|
||||
"examples",
|
||||
"src",
|
||||
]
|
||||
known_third_party = ["grpc"]
|
||||
skip_glob = [
|
||||
"*/third_party/*",
|
||||
"*/env/*",
|
||||
"*pb2*.py",
|
||||
"*pb2*.pyi",
|
||||
"**/site-packages/**/*",
|
||||
"tools/distrib/python/xds_protos/*",
|
||||
]
|
||||
single_line_exclusions = ["typing"]
|
||||
force_single_line = true
|
||||
force_sort_within_sections = true
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -13,5 +13,5 @@
|
|||
# limitations under the License.
|
||||
|
||||
module GrpcBuildConfig
|
||||
CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-42.dll'
|
||||
CORE_WINDOWS_DLL = '/tmp/libs/opt/grpc-24.dll'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -12,11 +12,21 @@ settings:
|
|||
'#08': Use "-preN" suffixes to identify pre-release versions
|
||||
'#09': Per-language overrides are possible with (eg) ruby_version tag here
|
||||
'#10': See the expand_version.py for all the quirks here
|
||||
core_version: 42.0.0
|
||||
core_version: 24.0.0
|
||||
csharp_major_version: 2
|
||||
g_stands_for: gnarly
|
||||
protobuf_version: 3.26.1
|
||||
version: 1.65.0-dev
|
||||
g_stands_for: golazo
|
||||
protobuf_version: 3.19.5
|
||||
version: 1.46.7
|
||||
targets:
|
||||
- name: gen_hpack_tables
|
||||
build: tool
|
||||
language: c++
|
||||
src:
|
||||
- tools/codegen/core/gen_hpack_tables.cc
|
||||
deps:
|
||||
- grpc
|
||||
- gpr
|
||||
uses_polling: false
|
||||
configs:
|
||||
asan:
|
||||
CC: clang
|
||||
|
|
@ -29,7 +39,7 @@ configs:
|
|||
compile_the_world: true
|
||||
test_environ:
|
||||
ASAN_OPTIONS: detect_leaks=1:color=always
|
||||
LSAN_OPTIONS: suppressions=test/core/test_util/lsan_suppressions.txt:report_objects=1
|
||||
LSAN_OPTIONS: suppressions=test/core/util/lsan_suppressions.txt:report_objects=1
|
||||
asan-noleaks:
|
||||
CC: clang
|
||||
CPPFLAGS: -O0 -fsanitize-coverage=edge,trace-pc-guard -fsanitize=address -fno-omit-frame-pointer
|
||||
|
|
@ -53,11 +63,21 @@ configs:
|
|||
compile_the_world: true
|
||||
test_environ:
|
||||
ASAN_OPTIONS: detect_leaks=1:color=always
|
||||
LSAN_OPTIONS: suppressions=test/core/test_util/lsan_suppressions.txt:report_objects=1
|
||||
LSAN_OPTIONS: suppressions=test/core/util/lsan_suppressions.txt:report_objects=1
|
||||
basicprof:
|
||||
CPPFLAGS: -O2 -DGRPC_BASIC_PROFILER -DGRPC_TIMERS_RDTSC
|
||||
DEFINES: NDEBUG
|
||||
c++-compat:
|
||||
CFLAGS: -Wc++-compat
|
||||
CPPFLAGS: -O0
|
||||
DEFINES: _DEBUG DEBUG
|
||||
counters:
|
||||
CPPFLAGS: -O2 -DGPR_LOW_LEVEL_COUNTERS
|
||||
DEFINES: NDEBUG
|
||||
counters_with_memory_counter:
|
||||
CPPFLAGS: -O2 -DGPR_LOW_LEVEL_COUNTERS -DGPR_WRAP_MEMORY_COUNTER
|
||||
DEFINES: NDEBUG
|
||||
LDFLAGS: -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free
|
||||
dbg:
|
||||
CPPFLAGS: -O0
|
||||
DEFINES: _DEBUG DEBUG
|
||||
|
|
@ -97,6 +117,10 @@ configs:
|
|||
compile_the_world: true
|
||||
test_environ:
|
||||
MSAN_OPTIONS: poison_in_dtor=1
|
||||
mutrace:
|
||||
CPPFLAGS: -O3 -fno-omit-frame-pointer
|
||||
DEFINES: NDEBUG
|
||||
LDFLAGS: -rdynamic
|
||||
noexcept:
|
||||
CPPFLAGS: -O2 -Wframe-larger-than=16384
|
||||
CXXFLAGS: -fno-exceptions
|
||||
|
|
@ -104,6 +128,9 @@ configs:
|
|||
opt:
|
||||
CPPFLAGS: -O2 -Wframe-larger-than=16384
|
||||
DEFINES: NDEBUG
|
||||
stapprof:
|
||||
CPPFLAGS: -O2 -DGRPC_STAP_PROFILER
|
||||
DEFINES: NDEBUG
|
||||
tsan:
|
||||
CC: clang
|
||||
CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument
|
||||
|
|
@ -115,7 +142,7 @@ configs:
|
|||
LDXX: clang++
|
||||
compile_the_world: true
|
||||
test_environ:
|
||||
TSAN_OPTIONS: suppressions=test/core/test_util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
|
||||
TSAN_OPTIONS: suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
|
||||
ubsan:
|
||||
CC: clang
|
||||
CPPFLAGS: -O0 -stdlib=libc++ -fsanitize-coverage=edge,trace-pc-guard -fsanitize=undefined
|
||||
|
|
@ -127,27 +154,30 @@ configs:
|
|||
LDXX: clang++
|
||||
compile_the_world: true
|
||||
test_environ:
|
||||
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=test/core/test_util/ubsan_suppressions.txt
|
||||
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt
|
||||
defaults:
|
||||
boringssl:
|
||||
CFLAGS: -g
|
||||
CPPFLAGS: -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM
|
||||
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX
|
||||
CXXFLAGS: -fno-exceptions
|
||||
cares:
|
||||
abseil:
|
||||
CPPFLAGS: -g -Ithird_party/abseil-cpp
|
||||
ares:
|
||||
CFLAGS: -g
|
||||
CPPFLAGS: -Ithird_party/cares/cares/include -Ithird_party/cares -Ithird_party/cares/cares
|
||||
-fvisibility=hidden -D_GNU_SOURCE $(if $(subst Darwin,,$(SYSTEM)),,-Ithird_party/cares/config_darwin)
|
||||
$(if $(subst FreeBSD,,$(SYSTEM)),,-Ithird_party/cares/config_freebsd) $(if $(subst
|
||||
Linux,,$(SYSTEM)),,-Ithird_party/cares/config_linux) $(if $(subst OpenBSD,,$(SYSTEM)),,-Ithird_party/cares/config_openbsd)
|
||||
-DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(if $(subst MINGW32,,$(SYSTEM)),-DHAVE_CONFIG_H,)
|
||||
benchmark:
|
||||
CPPFLAGS: -Ithird_party/benchmark/include -DHAVE_POSIX_REGEX
|
||||
boringssl:
|
||||
CFLAGS: -g
|
||||
CPPFLAGS: -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM
|
||||
-D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX
|
||||
CXXFLAGS: -fno-exceptions
|
||||
global:
|
||||
CFLAGS: -g
|
||||
COREFLAGS: -fno-exceptions
|
||||
CPPFLAGS: -g -Wall -Wextra -DOSATOMIC_USE_INLINED=1 -Ithird_party/abseil-cpp -Ithird_party/re2
|
||||
-Ithird_party/upb -Isrc/core/ext/upb-gen -Isrc/core/ext/upbdefs-gen -Ithird_party/utf8_range
|
||||
-Ithird_party/xxhash -Ithird_party/cares/cares/include -Ithird_party/cares -Ithird_party/cares/cares
|
||||
-Ithird_party/address_sorting/include
|
||||
-Ithird_party/upb -Isrc/core/ext/upb-generated -Isrc/core/ext/upbdefs-generated
|
||||
-Ithird_party/xxhash
|
||||
LDFLAGS: -g
|
||||
zlib:
|
||||
CFLAGS: -fvisibility=hidden
|
||||
|
|
@ -187,7 +217,7 @@ python_dependencies:
|
|||
deps:
|
||||
- grpc
|
||||
- address_sorting
|
||||
- cares
|
||||
- ares
|
||||
- boringssl
|
||||
- re2
|
||||
- z
|
||||
|
|
@ -195,22 +225,7 @@ ruby_gem:
|
|||
deps:
|
||||
- grpc
|
||||
- address_sorting
|
||||
- cares
|
||||
- ares
|
||||
- boringssl
|
||||
- re2
|
||||
- z
|
||||
swift_boringssl_package:
|
||||
deps:
|
||||
- boringssl
|
||||
swift_package:
|
||||
deps:
|
||||
- grpc
|
||||
- grpc_authorization_provider
|
||||
- gpr
|
||||
- upb_base_lib
|
||||
- upb_mem_lib
|
||||
- upb_message_lib
|
||||
- upb_json_lib
|
||||
- upb_textformat_lib
|
||||
- utf8_range_lib
|
||||
- re2
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
set noparent
|
||||
@jtattermusch
|
||||
@nicolasnoble
|
||||
@apolcyn
|
||||
|
|
@ -12,10 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if(TARGET absl::strings)
|
||||
# If absl is included already, skip including it.
|
||||
# (https://github.com/grpc/grpc/issues/29608)
|
||||
elseif(gRPC_ABSL_PROVIDER STREQUAL "module")
|
||||
if(gRPC_ABSL_PROVIDER STREQUAL "module")
|
||||
if(NOT ABSL_ROOT_DIR)
|
||||
set(ABSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/abseil-cpp)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
# Copyright 2021 The gRPC Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(_download_archive_TEMPORARY_DIR ${CMAKE_BINARY_DIR}/http_archives)
|
||||
file(MAKE_DIRECTORY ${_download_archive_TEMPORARY_DIR})
|
||||
|
||||
# This is basically Bazel's http_archive.
|
||||
# Note that strip_prefix strips the directory path prefix of the extracted
|
||||
# archive content, and it may strip multiple directories.
|
||||
function(download_archive destination url hash strip_prefix)
|
||||
# Fetch and validate
|
||||
set(_TEMPORARY_FILE ${_download_archive_TEMPORARY_DIR}/${strip_prefix}.tar.gz)
|
||||
message(STATUS "Downloading from ${url}, if failed, please try configuring again")
|
||||
file(DOWNLOAD ${url} ${_TEMPORARY_FILE}
|
||||
TIMEOUT 60
|
||||
EXPECTED_HASH SHA256=${hash}
|
||||
TLS_VERIFY ON)
|
||||
# Extract
|
||||
execute_process(COMMAND
|
||||
${CMAKE_COMMAND} -E tar xvf ${_TEMPORARY_FILE}
|
||||
WORKING_DIRECTORY ${_download_archive_TEMPORARY_DIR}
|
||||
OUTPUT_QUIET)
|
||||
get_filename_component(_download_archive_Destination_Path ${destination} DIRECTORY)
|
||||
file(MAKE_DIRECTORY ${_download_archive_Destination_Path})
|
||||
file(RENAME ${_download_archive_TEMPORARY_DIR}/${strip_prefix} ${destination})
|
||||
# Clean up
|
||||
file(REMOVE ${_download_archive_TEMPORARY_DIR}/${strip_prefix})
|
||||
file(REMOVE ${_TEMPORARY_FILE})
|
||||
endfunction()
|
||||
|
|
@ -8,10 +8,6 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules)
|
|||
@_gRPC_FIND_CARES@
|
||||
@_gRPC_FIND_ABSL@
|
||||
@_gRPC_FIND_RE2@
|
||||
@_gRPC_FIND_OPENTELEMETRY@
|
||||
|
||||
# Targets
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake)
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/gRPCPluginTargets.cmake)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
# Copyright 2022 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
find_package(systemd QUIET CONFIG)
|
||||
if(systemd_FOUND)
|
||||
message(STATUS "Found systemd via CMake.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(TARGET systemd)
|
||||
message(STATUS "Found systemd via pkg-config already?")
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(SYSTEMD libsystemd>=233)
|
||||
|
||||
if(SYSTEMD_FOUND)
|
||||
set(systemd_FOUND "${SYSTEMD_FOUND}")
|
||||
add_library(systemd INTERFACE IMPORTED)
|
||||
message(STATUS "Found systemd via pkg-config.")
|
||||
endif()
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# Copyright 2024 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if(TARGET opentelemetry-cpp::api)
|
||||
# If opentelemetry is included already, skip including it.
|
||||
# OpenTelemetry does not work with "module" mode at present.
|
||||
# elseif(gRPC_OPENTELEMETRY_PROVIDER STREQUAL "module")
|
||||
# if(NOT OPENTELEMETRY_ROOT_DIR)
|
||||
# set(OPENTELEMETRY_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/opentelemetry-cpp)
|
||||
# endif()
|
||||
# set(BUILD_TESTING OFF)
|
||||
# if(NOT gRPC_BUILD_TESTS)
|
||||
# set(WITH_API_ONLY ON)
|
||||
# endif()
|
||||
# set(WITH_ABSEIL ON)
|
||||
# include_directories(${OPENTELEMETRY_ROOT_DIR} "${OPENTELEMETRY_ROOT_DIR}/api/include")
|
||||
# add_subdirectory(${OPENTELEMETRY_ROOT_DIR} third_party/opentelemetry-cpp)
|
||||
# if(EXISTS "${OPENTELEMETRY_ROOT_DIR}/CMakeLists.txt")
|
||||
# Unclear whether we should install OpenTelemetry along with gRPC
|
||||
# if(gRPC_INSTALL AND _gRPC_INSTALL_SUPPORTED_FROM_MODULE)
|
||||
# set(OPENTELEMETRY_INSTALL ON)
|
||||
# endif()
|
||||
# else()
|
||||
# message(WARNING "gRPC_OPENTELEMETRY_PROVIDER is \"module\" but OPENTELEMETRY_ROOT_DIR is wrong")
|
||||
# endif()
|
||||
# if(gRPC_INSTALL AND NOT _gRPC_INSTALL_SUPPORTED_FROM_MODULE)
|
||||
# message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_OPENTELEMETRY_PROVIDER is \"module\" and CMake version (${CMAKE_VERSION}) is less than 3.13.")
|
||||
# set(gRPC_INSTALL FALSE)
|
||||
# endif()
|
||||
elseif(gRPC_OPENTELEMETRY_PROVIDER STREQUAL "package")
|
||||
find_package(opentelemetry-cpp CONFIG REQUIRED)
|
||||
endif()
|
||||
set(_gRPC_FIND_OPENTELEMETRY "if(NOT TARGET opentelemetry-cpp::opentelemetry_api)\n find_package(opentelemetry-cpp)\nendif()")
|
||||
|
|
@ -1,13 +1,12 @@
|
|||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
includedir=${prefix}/@gRPC_INSTALL_INCLUDEDIR@
|
||||
libdir=${exec_prefix}/@gRPC_INSTALL_LIBDIR@
|
||||
includedir=${prefix}/include
|
||||
libdir=${exec_prefix}/lib
|
||||
|
||||
Name: @PC_NAME@
|
||||
Description: @PC_DESCRIPTION@
|
||||
Version: @PC_VERSION@
|
||||
Cflags: -I${includedir}
|
||||
Requires: @PC_REQUIRES@
|
||||
Requires.private: @PC_REQUIRES_PRIVATE@
|
||||
Libs: -L${libdir} @PC_LIB@
|
||||
Libs.private: @PC_LIBS_PRIVATE@
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ if(gRPC_PROTOBUF_PROVIDER STREQUAL "module")
|
|||
set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${PROTOBUF_ROOT_DIR}/CMakeLists.txt")
|
||||
if(EXISTS "${PROTOBUF_ROOT_DIR}/cmake/CMakeLists.txt")
|
||||
set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link static runtime libraries")
|
||||
add_subdirectory(${PROTOBUF_ROOT_DIR} third_party/protobuf)
|
||||
add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf)
|
||||
if(TARGET ${_gRPC_PROTOBUF_LIBRARY_NAME})
|
||||
set(_gRPC_PROTOBUF_LIBRARIES ${_gRPC_PROTOBUF_LIBRARY_NAME})
|
||||
endif()
|
||||
|
|
@ -55,8 +55,12 @@ if(gRPC_PROTOBUF_PROVIDER STREQUAL "module")
|
|||
set(gRPC_INSTALL FALSE)
|
||||
endif()
|
||||
elseif(gRPC_PROTOBUF_PROVIDER STREQUAL "package")
|
||||
find_package(Protobuf REQUIRED CONFIG)
|
||||
find_package(Protobuf REQUIRED ${gRPC_PROTOBUF_PACKAGE_TYPE})
|
||||
|
||||
# {Protobuf,PROTOBUF}_FOUND is defined based on find_package type ("MODULE" vs "CONFIG").
|
||||
# For "MODULE", the case has also changed between cmake 3.5 and 3.6.
|
||||
# We use the legacy uppercase version for *_LIBRARIES AND *_INCLUDE_DIRS variables
|
||||
# as newer cmake versions provide them too for backward compatibility.
|
||||
if(Protobuf_FOUND OR PROTOBUF_FOUND)
|
||||
if(TARGET protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
|
||||
set(_gRPC_PROTOBUF_LIBRARIES protobuf::${_gRPC_PROTOBUF_LIBRARY_NAME})
|
||||
|
|
@ -86,6 +90,6 @@ elseif(gRPC_PROTOBUF_PROVIDER STREQUAL "package")
|
|||
set(_gRPC_PROTOBUF_PROTOC_EXECUTABLE ${PROTOBUF_PROTOC_EXECUTABLE})
|
||||
endif()
|
||||
endif()
|
||||
set(_gRPC_FIND_PROTOBUF "include(CMakeFindDependencyMacro)\nfind_dependency(Protobuf CONFIG)")
|
||||
set(_gRPC_FIND_PROTOBUF "if(NOT Protobuf_FOUND AND NOT PROTOBUF_FOUND)\n find_package(Protobuf ${gRPC_PROTOBUF_PACKAGE_TYPE})\nendif()")
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
# Copyright 2022 gRPC authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(gRPC_USE_SYSTEMD "AUTO" CACHE STRING "Build with libsystemd support if available. Can be ON, OFF or AUTO")
|
||||
|
||||
if (NOT gRPC_USE_SYSTEMD STREQUAL "OFF")
|
||||
if (gRPC_USE_SYSTEMD STREQUAL "ON")
|
||||
find_package(systemd REQUIRED)
|
||||
elseif (gRPC_USE_SYSTEMD STREQUAL "AUTO")
|
||||
find_package(systemd)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown value for gRPC_USE_SYSTEMD = ${gRPC_USE_SYSTEMD}")
|
||||
endif()
|
||||
|
||||
if(TARGET systemd)
|
||||
set(_gRPC_SYSTEMD_LIBRARIES systemd ${SYSTEMD_LINK_LIBRARIES})
|
||||
add_definitions(-DHAVE_LIBSYSTEMD)
|
||||
endif()
|
||||
set(_gRPC_FIND_SYSTEMD "if(NOT systemd_FOUND)\n find_package(systemd)\nendif()")
|
||||
endif()
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb)
|
||||
|
||||
set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range")
|
||||
set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-gen" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-gen")
|
||||
set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}")
|
||||
set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated")
|
||||
|
||||
set(_gRPC_UPB_LIBRARIES upb)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -4,7 +4,7 @@
|
|||
This document serves as a detailed description for an implementation of gRPC carried over <a href="https://tools.ietf.org/html/rfc7540">HTTP2 framing</a>. It assumes familiarity with the HTTP2 specification.
|
||||
|
||||
## Protocol
|
||||
Production rules are using <a href="https://tools.ietf.org/html/rfc5234">ABNF syntax</a>.
|
||||
Production rules are using <a href="http://tools.ietf.org/html/rfc5234">ABNF syntax</a>.
|
||||
|
||||
### Outline
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ Base64-encoded values.
|
|||
|
||||
**ASCII-Value** should not have leading or trailing whitespace. If it contains
|
||||
leading or trailing whitespace, it may be stripped. The **ASCII-Value**
|
||||
character range defined is stricter than HTTP. Implementations must not error
|
||||
character range defined is more strict than HTTP. Implementations must not error
|
||||
due to receiving an invalid **ASCII-Value** that's a valid **field-value** in
|
||||
HTTP, but the precise behavior is not strictly defined: they may throw the value
|
||||
away or accept the value. If accepted, care must be taken to make sure that the
|
||||
|
|
|
|||
|
|
@ -48,8 +48,7 @@ Content-Type
|
|||
HTTP wire protocols
|
||||
|
||||
1. support any HTTP/*, with no dependency on HTTP/2 specific framing
|
||||
2. header names may be upper- or mixed-case over HTTP/1.1, but trailers encoded in
|
||||
the last length-prefixed message must always use lower-case names.
|
||||
2. use lower-case header/trailer names
|
||||
3. use EOF (end of body) to close the stream
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|||
http_archive(
|
||||
name = "com_github_grpc_grpc",
|
||||
strip_prefix = "grpc-1.45.0",
|
||||
sha256 = "ec19657a677d49af59aa806ec299c070c882986c9fcc022b1c22c2a3caf01bcd",
|
||||
sha256 = "ec19657a677d49af59aa806ec299c070c882986c9fcc022b1c22c2a3caf01bcd"k
|
||||
urls = ["https://github.com/grpc/grpc/archive/refs/tags/v1.45.0.tar.gz"],
|
||||
)
|
||||
|
||||
|
|
@ -34,16 +34,11 @@ grpc_extra_deps()
|
|||
|
||||
## Supported Versions
|
||||
|
||||
gRPC supports building with the latest stable release of Bazel,
|
||||
as well as the previous major version release for at least 6 months
|
||||
after it transitions into maintenance mode.
|
||||
This is consistent with the supported build systems of
|
||||
[the Google Foundational C++ Support Policy](https://opensource.google/documentation/policies/cplusplus-support).
|
||||
However individual releases may have a broader
|
||||
compatibility range. The currently supported versions are captured by the
|
||||
following list:
|
||||
In general, gRPC supports building with the latest patch release of the most
|
||||
recent two major versions of Bazel. However individual releases may have a
|
||||
broader compatibility range. The currently supported versions are captured by
|
||||
the following list:
|
||||
|
||||
- [`7.1.0`](https://github.com/bazelbuild/bazel/releases/tag/7.1.0)
|
||||
- [`6.5.0`](https://github.com/bazelbuild/bazel/releases/tag/6.5.0)
|
||||
|
||||
NOTE: gRPC doesn't support bzlmod yet.
|
||||
- [`5.0.0`](https://github.com/bazelbuild/bazel/releases/tag/5.0.0)
|
||||
- [`4.2.2`](https://github.com/bazelbuild/bazel/releases/tag/4.2.2)
|
||||
- [`3.7.2`](https://github.com/bazelbuild/bazel/releases/tag/3.7.2)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Format
|
||||
|
||||
The log format is described in [this proto file](https://github.com/grpc/grpc-proto/blob/master/grpc/binlog/v1/binarylog.proto). It is intended that multiple parts of the call will be logged in separate files, and then correlated by analysis tools using the rpc\_id.
|
||||
The log format is described in [this proto file](/src/proto/grpc/binary_log/v1alpha/log.proto). It is intended that multiple parts of the call will be logged in separate files, and then correlated by analysis tools using the rpc\_id.
|
||||
|
||||
## API
|
||||
|
||||
|
|
|
|||
|
|
@ -2,44 +2,37 @@
|
|||
|
||||
## Overview
|
||||
|
||||
This document describes the command line tool that comes with gRPC repository.
|
||||
It is desirable to have command line tools written in other languages roughly
|
||||
follow the same syntax and flags.
|
||||
This document describes the command line tool that comes with gRPC repository. It is desirable to have command line
|
||||
tools written in other languages roughly follow the same syntax and flags.
|
||||
|
||||
> [!NOTE]
|
||||
> At present, the tool needs to be built from source, and it should be moved out
|
||||
> to grpc-tools repository as a stand alone application once it is mature
|
||||
> enough. This tool in its current state though is not up to par in its
|
||||
> user-friendliness. Other tools in the ecosystem, for example,
|
||||
> [grpcurl](https://github.com/fullstorydev/grpcurl) are better maintained.
|
||||
At this point, the tool needs to be built from source, and it should be moved out to grpc-tools repository as a stand
|
||||
alone application once it is mature enough.
|
||||
|
||||
## Core functionality
|
||||
|
||||
The command line tool can do the following things:
|
||||
|
||||
- Send unary rpc.
|
||||
- Attach metadata and display received metadata.
|
||||
- Handle common authentication to server.
|
||||
- Infer request/response types from server reflection result.
|
||||
- Find the request/response types from a given proto file.
|
||||
- Read proto request in text form.
|
||||
- Read request in wire form (for protobuf messages, this means serialized
|
||||
binary form).
|
||||
- Display proto response in text form.
|
||||
- Write response in wire form to a file.
|
||||
- Send unary rpc.
|
||||
- Attach metadata and display received metadata.
|
||||
- Handle common authentication to server.
|
||||
- Infer request/response types from server reflection result.
|
||||
- Find the request/response types from a given proto file.
|
||||
- Read proto request in text form.
|
||||
- Read request in wire form (for protobuf messages, this means serialized binary form).
|
||||
- Display proto response in text form.
|
||||
- Write response in wire form to a file.
|
||||
|
||||
The command line tool should support the following things:
|
||||
|
||||
- List server services and methods through server reflection.
|
||||
- Fine-grained auth control (such as, use this oauth token to talk to the
|
||||
server).
|
||||
- Send streaming rpc.
|
||||
- List server services and methods through server reflection.
|
||||
- Fine-grained auth control (such as, use this oauth token to talk to the server).
|
||||
- Send streaming rpc.
|
||||
|
||||
## Code location
|
||||
|
||||
To use the tool, you need to get the grpc repository and make sure your system
|
||||
has the prerequisites for building grpc from source, given in the
|
||||
[installation instructions](../BUILDING.md).
|
||||
has the prerequisites for building grpc from source, given in the [installation
|
||||
instructions](../BUILDING.md).
|
||||
|
||||
In order to build the grpc command line tool from a fresh clone of the grpc
|
||||
repository, you need to run the following command to update submodules:
|
||||
|
|
@ -65,13 +58,10 @@ https://github.com/grpc/grpc/blob/master/test/cpp/util/grpc_cli.cc
|
|||
Most `grpc_cli` commands need the server to support server reflection. See
|
||||
guides for
|
||||
[Java](https://github.com/grpc/grpc-java/blob/master/documentation/server-reflection-tutorial.md#enable-server-reflection)
|
||||
,
|
||||
[C++](https://github.com/grpc/grpc/blob/master/doc/server_reflection_tutorial.md)
|
||||
and
|
||||
[Go](https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md)
|
||||
, [C++](https://github.com/grpc/grpc/blob/master/doc/server_reflection_tutorial.md)
|
||||
and [Go](https://github.com/grpc/grpc-go/blob/master/Documentation/server-reflection-tutorial.md)
|
||||
|
||||
Local proto files can be used as an alternative. See instructions
|
||||
[below](#Call-a-remote-method).
|
||||
Local proto files can be used as an alternative. See instructions [below](#Call-a-remote-method).
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
@ -186,8 +176,8 @@ We can send RPCs to a server and get responses using `grpc_cli call` command.
|
|||
```
|
||||
|
||||
If the proto file is not under the current directory, you can use
|
||||
`--proto_path` to specify new search roots (separated by colon on
|
||||
Mac/Linux/Cygwin or semicolon on Windows).
|
||||
`--proto_path` to specify new search roots
|
||||
(separated by colon on Mac/Linux/Cygwin or semicolon on Windows).
|
||||
|
||||
Note that the tool will always attempt to use the reflection service first,
|
||||
falling back to local proto files if the service is not found. Use
|
||||
|
|
|
|||
|
|
@ -90,15 +90,6 @@ The inheritance of the compression configuration by child RPCs is left up to the
|
|||
implementation. Note that in the absence of changes to the parent channel, its
|
||||
configuration will be used.
|
||||
|
||||
### Deflate Compression
|
||||
|
||||
Like HTTP implementations, gRPC implementations MUST use the "deflate"
|
||||
compression to mean the zlib structure (defined in
|
||||
[RFC 1950](https://datatracker.ietf.org/doc/html/rfc1950))
|
||||
with the deflate compression algorithm (defined in
|
||||
[RFC 1951](https://datatracker.ietf.org/doc/html/rfc1951)).
|
||||
Servers and clients MUST NOT send raw deflate data.
|
||||
|
||||
### Test cases
|
||||
|
||||
1. When a compression level is not specified for either the channel or the
|
||||
|
|
|
|||
|
|
@ -1,88 +0,0 @@
|
|||
# Default HTTP Proxy Mapper User Guide for gRPC Core (and dependents)
|
||||
|
||||
[A1-http-connect-proxy-support.md](https://github.com/grpc/proposal/blob/master/A1-http-connect-proxy-support.md)
|
||||
proposed how gRPC supports TCP-level proxies via the HTTP CONNECT request,
|
||||
defined in [RFC-2817](https://www.rfc-editor.org/rfc/rfc2817).
|
||||
|
||||
This guide documents gRPC C-Core's default proxy mapper implementation.
|
||||
|
||||
## HTTP Proxy
|
||||
|
||||
**Case 1** in the proposal documents a use-case where all outbound traffic from
|
||||
an environment must go through a proxy. Configurations for such environments are
|
||||
usually performed using environment variables such as `http_proxy`. gRPC
|
||||
supports this by providing a default proxy mapper implementation that allows for
|
||||
overriding the server name (provided in the channel creation hostname) to
|
||||
resolve based on such configurations.
|
||||
|
||||
### Enabling the HTTP Proxy
|
||||
|
||||
C-Core checks the following places to determine the HTTP proxy to use, stopping
|
||||
at the first one that is set:
|
||||
|
||||
1. `GRPC_ARG_HTTP_PROXY` channel arg
|
||||
2. `grpc_proxy` environment variable
|
||||
3. `https_proxy` environment variable
|
||||
4. `http_proxy` environment variable
|
||||
|
||||
If none of the above are set, then no HTTP proxy will be used.
|
||||
|
||||
The allowed format is an [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) URI
|
||||
string where the scheme is expected to be "http" and the authority portion is
|
||||
used to determine the proxy to be used. For example, for an HTTP proxy setting
|
||||
of `http://username:password@proxy.google.com:443`, `username:password` would be
|
||||
used as user credentials for proxy authentication as per
|
||||
[RFC7617](https://www.rfc-editor.org/rfc/rfc7617) and `proxy.google.com:443`
|
||||
would be the host:port HTTP proxy target. If the port part of the authority is
|
||||
omitted, a default port of 443 is used. Note that user credential can also be
|
||||
omitted if the proxy does not need authentication.
|
||||
|
||||
### Disabling HTTP Proxy
|
||||
|
||||
If an HTTP proxy is set, C-Core then checks the following places to exclude
|
||||
traffic destined to listed hosts from going through the proxy determined above,
|
||||
again stopping at the first one that is set:
|
||||
|
||||
1. `no_grpc_proxy` environment variable
|
||||
2. `no_proxy`environment variable
|
||||
|
||||
If none of the above are set, then the previously found HTTP proxy is used.
|
||||
|
||||
The format takes a comma-separated list of names, and if any of these names
|
||||
matches as a suffix of the server host (provided in the channel target), then
|
||||
the proxy will not be used for that target. For example, with a `grpc_proxy`
|
||||
setting of `proxy.google.com` and a `no_grpc_proxy` setting of `example.com,
|
||||
google.com`, channel targets such as `dns:///foo.google.com:50051` and
|
||||
`bar.example.com:1234` will not use the proxy, but `baz.googleapis.com:443`
|
||||
would still use the configured proxy `proxy.google.com`.
|
||||
|
||||
As of [PR#31119](https://github.com/grpc/grpc/pull/31119), CIDR blocks are also
|
||||
supported in the list of names. For example, a `no_proxy` setting of
|
||||
`10.10.0.0/24` would not use the proxy for channel targets that mention IP
|
||||
addresses as the host between the range `10.10.0.0` to `10.10.0.255`.
|
||||
|
||||
### Disabling HTTP Proxy Channel-wide
|
||||
|
||||
The lookup and subsequent usage of an HTTP proxy for a specific channel can also
|
||||
be disabled by setting the channel arg `GRPC_ARG_ENABLE_HTTP_PROXY` to 0.
|
||||
|
||||
## Address Proxy
|
||||
|
||||
**Case 2** in the proposal documents a partially protected environment, where
|
||||
access to certain addresses must go through a proxy. Name resolution
|
||||
of protected servers works normally, and the proxy allows the CONNECT request
|
||||
to use an IP address instead of a hostname.
|
||||
|
||||
Only requests for certain hosts must go through the proxy. Requests to other
|
||||
servers work without the proxy. Custom logic is used to determine which hosts
|
||||
the proxy will be used for.
|
||||
|
||||
To use the address proxy, both of the following parameters need to be specified:
|
||||
1. Address of the proxy can be specified using `GRPC_ARG_ADDRESS_HTTP_PROXY`
|
||||
channel argument or `GRPC_ADDRESS_HTTP_PROXY` environment variable. Value of
|
||||
the channel argument is preferred if both values are specified.
|
||||
1. Comma-separated list of IP addresses and/or CIDR blocks that should be
|
||||
accessed through the proxy. This can be specified using
|
||||
the `GRPC_ARG_ADDRESS_HTTP_PROXY_ENABLED_ADDRESSES` channel argument
|
||||
or `GRPC_ADDRESS_HTTP_PROXY_ENABLED_ADDRESSES` environment variable. Value of
|
||||
the channel argument is preferred if both values are specified.
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
# gRPC Error
|
||||
|
||||
## Background
|
||||
|
||||
`grpc_error` is the c-core's opaque representation of an error. It holds a
|
||||
collection of integers, strings, timestamps, and child errors that related to
|
||||
the final error.
|
||||
|
||||
always present are:
|
||||
|
||||
* GRPC_ERROR_STR_FILE and GRPC_ERROR_INT_FILE_LINE - the source location where
|
||||
the error was generated
|
||||
* GRPC_ERROR_STR_DESCRIPTION - a human readable description of the error
|
||||
* GRPC_ERROR_TIME_CREATED - a timestamp indicating when the error happened
|
||||
|
||||
An error can also have children; these are other errors that are believed to
|
||||
have contributed to this one. By accumulating children, we can begin to root
|
||||
cause high level failures from low level failures, without having to derive
|
||||
execution paths from log lines.
|
||||
|
||||
grpc_errors are refcounted objects, which means they need strict ownership
|
||||
semantics. An extra ref on an error can cause a memory leak, and a missing ref
|
||||
can cause a crash.
|
||||
|
||||
This document serves as a detailed overview of grpc_error's ownership rules. It
|
||||
should help people use the errors, as well as help people debug refcount related
|
||||
errors.
|
||||
|
||||
## Clarification of Ownership
|
||||
|
||||
If a particular function is said to "own" an error, that means it has the
|
||||
responsibility of calling unref on the error. A function may have access to an
|
||||
error without ownership of it.
|
||||
|
||||
This means the function may use the error, but must not call unref on it, since
|
||||
that will be done elsewhere in the code. A function that does not own an error
|
||||
may explicitly take ownership of it by manually calling GRPC_ERROR_REF.
|
||||
|
||||
## Ownership Rules
|
||||
|
||||
There are three rules of error ownership, which we will go over in detail.
|
||||
|
||||
* If `grpc_error` is returned by a function, the caller owns a ref to that
|
||||
instance.
|
||||
* If a `grpc_error` is passed to a `grpc_closure` callback function, then that
|
||||
function does not own a ref to the error.
|
||||
* if a `grpc_error` is passed to *any other function*, then that function
|
||||
takes ownership of the error.
|
||||
|
||||
### Rule 1
|
||||
|
||||
> If `grpc_error` is returned by a function, the caller owns a ref to that
|
||||
> instance.*
|
||||
|
||||
For example, in the following code block, error1 and error2 are owned by the
|
||||
current function.
|
||||
|
||||
```C
|
||||
grpc_error_handle error1 = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occurred");
|
||||
grpc_error_handle error2 = some_operation_that_might_fail(...);
|
||||
```
|
||||
|
||||
The current function would have to explicitly call GRPC_ERROR_UNREF on the
|
||||
errors, or pass them along to a function that would take over the ownership.
|
||||
|
||||
### Rule 2
|
||||
|
||||
> If a `grpc_error` is passed to a `grpc_closure` callback function, then that
|
||||
> function does not own a ref to the error.
|
||||
|
||||
A `grpc_closure` callback function is any function that has the signature:
|
||||
|
||||
```C
|
||||
void (*cb)(void *arg, grpc_error_handle error);
|
||||
```
|
||||
|
||||
This means that the error ownership is NOT transferred when a functions calls:
|
||||
|
||||
```C
|
||||
c->cb(c->cb_arg, err);
|
||||
```
|
||||
|
||||
The caller is still responsible for unref-ing the error.
|
||||
|
||||
Note that you'll likely never need to run `c->cb(...)` yourself; the idiomatic
|
||||
way to execute callbacks is via the `Closure::Run` method, which takes ownership
|
||||
of the error variable.
|
||||
|
||||
```C
|
||||
grpc_error_handle error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occurred");
|
||||
grpc_core::Closure::Run(DEBUG_LOCATION, c->cb, error);
|
||||
// current function no longer has ownership of the error
|
||||
```
|
||||
|
||||
If you schedule or run a closure, but still need ownership of the error, then
|
||||
you must explicitly take a reference.
|
||||
|
||||
```C
|
||||
grpc_error_handle error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occurred");
|
||||
grpc_core::Closure::Run(DEBUG_LOCATION, c->cb, GRPC_ERROR_REF(error));
|
||||
// do some other things with the error
|
||||
GRPC_ERROR_UNREF(error);
|
||||
```
|
||||
|
||||
Rule 2 is more important to keep in mind when **implementing** `grpc_closure`
|
||||
callback functions. You must keep in mind that you do not own the error, and
|
||||
must not unref it. More importantly, you cannot pass it to any function that
|
||||
would take ownership of the error, without explicitly taking ownership yourself.
|
||||
For example:
|
||||
|
||||
```C
|
||||
void on_some_action(void *arg, grpc_error_handle error) {
|
||||
// this would cause a crash, because some_function will unref the error,
|
||||
// and the caller of this callback will also unref it.
|
||||
some_function(error);
|
||||
|
||||
// this callback function must take ownership, so it can give that
|
||||
// ownership to the function it is calling.
|
||||
some_function(GRPC_ERROR_REF(error));
|
||||
}
|
||||
```
|
||||
|
||||
### Rule 3
|
||||
|
||||
> if a `grpc_error` is passed to *any other function*, then that function takes
|
||||
> ownership of the error.
|
||||
|
||||
Take the following example:
|
||||
|
||||
```C
|
||||
grpc_error_handle error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error occurred");
|
||||
// do some things
|
||||
some_function(error);
|
||||
// can't use error anymore! might be gone.
|
||||
```
|
||||
|
||||
When some_function is called, it takes over the ownership of the error, and it
|
||||
will eventually unref it. So the caller can no longer safely use the error.
|
||||
|
||||
If the caller needed to keep using the error (or passing it to other functions),
|
||||
if would have to take on a reference to it. This is a common pattern seen.
|
||||
|
||||
```C
|
||||
void func() {
|
||||
grpc_error_handle error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Some error");
|
||||
some_function(GRPC_ERROR_REF(error));
|
||||
// do things
|
||||
some_other_function(GRPC_ERROR_REF(error));
|
||||
// do more things
|
||||
some_last_function(error);
|
||||
}
|
||||
```
|
||||
|
||||
The last call takes ownership and will eventually give the error its final
|
||||
unref.
|
||||
|
||||
When **implementing** a function that takes an error (and is not a
|
||||
`grpc_closure` callback function), you must ensure the error is unref-ed either
|
||||
by doing it explicitly with GRPC_ERROR_UNREF, or by passing the error to a
|
||||
function that takes over the ownership.
|
||||
|
|
@ -24,6 +24,8 @@ There are multiple polling engine implementations depending on the OS and the OS
|
|||
- `poll` (If kernel does not have epoll support)
|
||||
- Mac: **`poll`** (default)
|
||||
- Windows: (no name)
|
||||
- One-off polling engines:
|
||||
- NodeJS : `libuv` polling engine implementation (requires different compile `#define`s)
|
||||
|
||||
## Polling Engine Interface
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ number:
|
|||
- remove `ServerBuilder::SetMaxMessageSize()` method from
|
||||
`include/grpc++/server_builder.h` (commit `6980362`)
|
||||
- remove `ClientContext::set_fail_fast()` method from
|
||||
`include/grpc++/client_context.h` (commit `9477724`)
|
||||
`include/grpc++/impl/codegen/client_context.h` (commit `9477724`)
|
||||
- remove directory `include/grpc++` and all headers in it
|
||||
(commit `eb06572`)
|
||||
- make all `Request` and `Mark` methods in `grpc::Service` take a
|
||||
|
|
|
|||
|
|
@ -0,0 +1,54 @@
|
|||
# gRPC C# Server Reflection
|
||||
|
||||
This document shows how to use gRPC Server Reflection in gRPC C#.
|
||||
Please see [C++ Server Reflection Tutorial](../server_reflection_tutorial.md)
|
||||
for general information and more examples how to use server reflection.
|
||||
|
||||
## Enable server reflection in C# servers
|
||||
|
||||
C# Server Reflection is an add-on library.
|
||||
To use it, first install the [Grpc.Reflection](https://www.nuget.org/packages/Grpc.Reflection/)
|
||||
Nuget package into your project.
|
||||
|
||||
Note that with C# you need to manually register the service
|
||||
descriptors with the reflection service implementation when creating a server
|
||||
(this isn't necessary with e.g. C++ or Java)
|
||||
```csharp
|
||||
// the reflection service will be aware of "Greeter" and "ServerReflection" services.
|
||||
var reflectionServiceImpl = new ReflectionServiceImpl(Greeter.Descriptor, ServerReflection.Descriptor);
|
||||
server = new Server()
|
||||
{
|
||||
Services =
|
||||
{
|
||||
// the server will serve 2 services, the Greeter and the ServerReflection
|
||||
Greeter.BindService(new GreeterImpl()),
|
||||
ServerReflection.BindService(reflectionServiceImpl)
|
||||
},
|
||||
Ports = { { "localhost", 50051, ServerCredentials.Insecure } }
|
||||
};
|
||||
server.Start();
|
||||
```
|
||||
|
||||
After starting the server, you can verify that the server reflection
|
||||
is working properly by using the [`grpc_cli` command line
|
||||
tool](https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md):
|
||||
|
||||
```sh
|
||||
$ grpc_cli ls localhost:50051
|
||||
```
|
||||
|
||||
output:
|
||||
```sh
|
||||
helloworld.Greeter
|
||||
grpc.reflection.v1alpha.ServerReflection
|
||||
```
|
||||
|
||||
For more examples and instructions how to use the `grpc_cli` tool,
|
||||
please refer to the [`grpc_cli` documentation](../command_line_tool.md)
|
||||
and the [C++ Server Reflection Tutorial](../server_reflection_tutorial.md).
|
||||
|
||||
## Additional Resources
|
||||
|
||||
The [Server Reflection Protocol](../server-reflection.md) provides detailed
|
||||
information about how the server reflection works and describes the server reflection
|
||||
protocol in detail.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue