From bbdee16b992c7777476ffaba5a9df3f8c0e9f60c Mon Sep 17 00:00:00 2001 From: Jozef Izso Date: Thu, 26 Apr 2018 17:39:17 +0200 Subject: [PATCH 1/5] Allow conditional builds of grpc_csharp_ext for vcpkg manager --- templates/CMakeLists.txt.template | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index a7f59e15a7b..de13d02e2a3 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -87,6 +87,7 @@ # Options option(gRPC_BUILD_TESTS "Build tests" OFF) option(gRPC_BUILD_CODEGEN "Build codegen" ON) + option(gRPC_BUILD_CSHARP_EXT "Build C# extensions" ON) set(gRPC_INSTALL_default ON) if (NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) @@ -298,6 +299,11 @@ if (gRPC_BUILD_TESTS) ${cc_library(lib)} endif (gRPC_BUILD_TESTS) + % elif lib.name in ['grpc_csharp_ext']: + if (gRPC_BUILD_CSHARP_EXT) + ${cc_library(lib)} + ${cc_install(lib)} + endif (gRPC_BUILD_CSHARP_EXT) % else: ${cc_library(lib)} % if not lib.build in ["tool"]: From ec4779416a1f93f52df85b417b778cf5e24a6882 Mon Sep 17 00:00:00 2001 From: Jozef Izso Date: Tue, 19 Jun 2018 17:33:48 +0200 Subject: [PATCH 2/5] Regenerate CMakeLists.txt from generate_projects.sh --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d92d7c0558c..d6b2adc1b45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,7 @@ set(gRPC_INSTALL_SHAREDIR "share/grpc" CACHE STRING "Installation directory for # Options option(gRPC_BUILD_TESTS "Build tests" OFF) option(gRPC_BUILD_CODEGEN "Build codegen" ON) +option(gRPC_BUILD_CSHARP_EXT "Build C# extensions" ON) set(gRPC_INSTALL_default ON) if (NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) @@ -5167,6 +5168,7 @@ target_link_libraries(qps endif (gRPC_BUILD_CODEGEN) endif (gRPC_BUILD_TESTS) +if (gRPC_BUILD_CSHARP_EXT) add_library(grpc_csharp_ext SHARED src/csharp/ext/grpc_csharp_ext.c @@ -5213,6 +5215,7 @@ if (gRPC_INSTALL) ) endif() +endif (gRPC_BUILD_CSHARP_EXT) if (gRPC_BUILD_TESTS) add_library(bad_client_test From c0d251a10ed82144958a34b04fd7ed832764a052 Mon Sep 17 00:00:00 2001 From: Vizerai Date: Tue, 19 Jun 2018 16:21:26 -0700 Subject: [PATCH 3/5] Fixing trailing metadata ops. --- src/cpp/ext/filters/census/client_filter.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cpp/ext/filters/census/client_filter.cc b/src/cpp/ext/filters/census/client_filter.cc index 293f4b1c253..940d42d1000 100644 --- a/src/cpp/ext/filters/census/client_filter.cc +++ b/src/cpp/ext/filters/census/client_filter.cc @@ -119,8 +119,10 @@ void CensusClientCallData::StartTransportStreamOpBatch( } if (op->recv_trailing_metadata() != nullptr) { recv_trailing_metadata_ = op->recv_trailing_metadata()->batch(); - initial_on_done_recv_trailing_metadata_ = op->on_complete(); - op->set_on_complete(&on_done_recv_trailing_metadata_); + initial_on_done_recv_trailing_metadata_ = + op->op()->payload->recv_trailing_metadata.recv_trailing_metadata_ready; + op->op()->payload->recv_trailing_metadata.recv_trailing_metadata_ready = + &on_done_recv_trailing_metadata_; } // Call next op. grpc_call_next_op(elem, op->op()); From 76283c4e572cf39fe9ce7f38495f831133720365 Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Tue, 19 Jun 2018 16:43:18 -0700 Subject: [PATCH 4/5] Fix sanitY --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6371521f6a5..ab7ae5b4003 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7511,6 +7511,7 @@ target_include_directories(handshake_verify_peer_options PRIVATE ${_gRPC_CARES_INCLUDE_DIR} PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR} ) target_link_libraries(handshake_verify_peer_options From 97c6648a49a618e6fee79b9d5f6e5f3af393cbec Mon Sep 17 00:00:00 2001 From: Vizerai Date: Tue, 19 Jun 2018 17:59:36 -0700 Subject: [PATCH 5/5] update --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6371521f6a5..ab7ae5b4003 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7511,6 +7511,7 @@ target_include_directories(handshake_verify_peer_options PRIVATE ${_gRPC_CARES_INCLUDE_DIR} PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR} PRIVATE ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + PRIVATE ${_gRPC_NANOPB_INCLUDE_DIR} ) target_link_libraries(handshake_verify_peer_options