From ad0dcdc212220ac97cdc8a02afaf2adec9b76799 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 13 Jan 2015 07:31:33 -0800 Subject: [PATCH 01/26] Compile fix for mac --- src/core/support/log_posix.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/core/support/log_posix.c b/src/core/support/log_posix.c index 0420570a3ec..83d1c1386ae 100644 --- a/src/core/support/log_posix.c +++ b/src/core/support/log_posix.c @@ -31,21 +31,27 @@ * */ -#define _POSIX_SOURCE + +#ifndef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200112L +#endif + #define _GNU_SOURCE #include #if defined(GPR_POSIX_LOG) +#include #include #include #include #include #include +#include #include #include -static long gettid() { return pthread_self(); } +static long gettid() { return (long)(gpr_intptr)pthread_self(); } void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format, ...) { @@ -55,7 +61,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, int ret; va_list args; va_start(args, format); - ret = vsnprintf(buf, format, args); + ret = vsnprintf(buf, sizeof(buf), format, args); va_end(args); if (ret < 0) { message = NULL; @@ -64,7 +70,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, } else { message = allocated = gpr_malloc(ret + 1); va_start(args, format); - vsnprintf(message, format, args); + vsnprintf(message, ret, format, args); va_end(args); } gpr_log_message(file, line, severity, message); From 03221345064d9237bc047a568f7b2cd782d9a91a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 13 Jan 2015 07:19:35 -0800 Subject: [PATCH 02/26] Make generate_projects work on Mac --- tools/buildgen/generate_projects.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildgen/generate_projects.sh b/tools/buildgen/generate_projects.sh index 8358e3aea67..42b161388a8 100755 --- a/tools/buildgen/generate_projects.sh +++ b/tools/buildgen/generate_projects.sh @@ -11,7 +11,7 @@ cd `dirname $0`/../.. mako_renderer=tools/buildgen/mako_renderer.py gen_build_json=test/core/end2end/gen_build_json.py -end2end_test_build=`mktemp` +end2end_test_build=`mktemp /tmp/genXXXXXX` $gen_build_json > $end2end_test_build global_plugins=`find ./tools/buildgen/plugins -name '*.py' | From cfc18adef72a0849427dec1534fcc6306d1c4257 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 13 Jan 2015 07:20:27 -0800 Subject: [PATCH 03/26] Remove go compiler --- Makefile | 34 +-- build.json | 19 -- src/compiler/go_generator.cc | 520 ----------------------------------- src/compiler/go_generator.h | 51 ---- src/compiler/go_plugin.cc | 83 ------ 5 files changed, 4 insertions(+), 703 deletions(-) delete mode 100644 src/compiler/go_generator.cc delete mode 100644 src/compiler/go_generator.h delete mode 100644 src/compiler/go_plugin.cc diff --git a/Makefile b/Makefile index 35c2d848003..e28e4385ddd 100644 --- a/Makefile +++ b/Makefile @@ -253,7 +253,6 @@ stop: gen_hpack_tables: bins/$(CONFIG)/gen_hpack_tables cpp_plugin: bins/$(CONFIG)/cpp_plugin ruby_plugin: bins/$(CONFIG)/ruby_plugin -go_plugin: bins/$(CONFIG)/go_plugin grpc_byte_buffer_reader_test: bins/$(CONFIG)/grpc_byte_buffer_reader_test gpr_cancellable_test: bins/$(CONFIG)/gpr_cancellable_test gpr_log_test: bins/$(CONFIG)/gpr_log_test @@ -897,7 +896,7 @@ test_cxx: buildtests_cxx tools: privatelibs bins/$(CONFIG)/gen_hpack_tables bins/$(CONFIG)/grpc_fetch_oauth2 -protoc_plugins: bins/$(CONFIG)/cpp_plugin bins/$(CONFIG)/ruby_plugin bins/$(CONFIG)/go_plugin +protoc_plugins: bins/$(CONFIG)/cpp_plugin bins/$(CONFIG)/ruby_plugin buildbenchmarks: privatelibs bins/$(CONFIG)/grpc_completion_queue_benchmark bins/$(CONFIG)/low_level_ping_pong_benchmark @@ -1026,7 +1025,7 @@ bins_dep_c: deps_gen_hpack_tables deps_grpc_byte_buffer_reader_test deps_gpr_can dep_cxx: deps_libgrpc++ deps_libgrpc++_test_util -bins_dep_cxx: deps_cpp_plugin deps_ruby_plugin deps_go_plugin deps_thread_pool_test deps_status_test deps_sync_client_async_server_test deps_qps_client deps_qps_server deps_interop_server deps_interop_client deps_end2end_test deps_channel_arguments_test deps_credentials_test +bins_dep_cxx: deps_cpp_plugin deps_ruby_plugin deps_thread_pool_test deps_status_test deps_sync_client_async_server_test deps_qps_client deps_qps_server deps_interop_server deps_interop_client deps_end2end_test deps_channel_arguments_test deps_credentials_test install: install_c install_cxx @@ -1116,7 +1115,7 @@ ifneq ($(SYSTEM),Darwin) endif endif -clean: clean_libgpr clean_libgrpc clean_libgrpc_unsecure clean_libgpr_test_util clean_libgrpc_test_util clean_libgrpc++ clean_libgrpc++_test_util clean_libend2end_fixture_chttp2_fake_security clean_libend2end_fixture_chttp2_fullstack clean_libend2end_fixture_chttp2_simple_ssl_fullstack clean_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack clean_libend2end_fixture_chttp2_socket_pair clean_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time clean_libend2end_test_cancel_after_accept clean_libend2end_test_cancel_after_accept_and_writes_closed clean_libend2end_test_cancel_after_invoke clean_libend2end_test_cancel_before_invoke clean_libend2end_test_cancel_in_a_vacuum clean_libend2end_test_census_simple_request clean_libend2end_test_disappearing_server clean_libend2end_test_early_server_shutdown_finishes_inflight_calls clean_libend2end_test_early_server_shutdown_finishes_tags clean_libend2end_test_invoke_large_request clean_libend2end_test_max_concurrent_streams clean_libend2end_test_no_op clean_libend2end_test_ping_pong_streaming clean_libend2end_test_request_response_with_binary_metadata_and_payload clean_libend2end_test_request_response_with_metadata_and_payload clean_libend2end_test_request_response_with_payload clean_libend2end_test_request_response_with_trailing_metadata_and_payload clean_libend2end_test_simple_delayed_request clean_libend2end_test_simple_request clean_libend2end_test_thread_stress clean_libend2end_test_writes_done_hangs_with_pending_read clean_libend2end_certs clean_gen_hpack_tables clean_cpp_plugin clean_ruby_plugin clean_go_plugin clean_grpc_byte_buffer_reader_test clean_gpr_cancellable_test clean_gpr_log_test clean_gpr_useful_test clean_gpr_cmdline_test clean_gpr_histogram_test clean_gpr_host_port_test clean_gpr_slice_buffer_test clean_gpr_slice_test clean_gpr_string_test clean_gpr_sync_test clean_gpr_thd_test clean_gpr_time_test clean_murmur_hash_test clean_grpc_stream_op_test clean_alpn_test clean_time_averaged_stats_test clean_chttp2_stream_encoder_test clean_hpack_table_test clean_chttp2_stream_map_test clean_hpack_parser_test clean_transport_metadata_test clean_chttp2_status_conversion_test clean_chttp2_transport_end2end_test clean_tcp_posix_test clean_dualstack_socket_test clean_no_server_test clean_resolve_address_test clean_sockaddr_utils_test clean_tcp_server_posix_test clean_tcp_client_posix_test clean_grpc_channel_stack_test clean_metadata_buffer_test clean_grpc_completion_queue_test clean_grpc_completion_queue_benchmark clean_census_trace_store_test clean_census_stats_store_test clean_census_window_stats_test clean_census_statistics_quick_test clean_census_statistics_small_log_test clean_census_statistics_performance_test clean_census_statistics_multiple_writers_test clean_census_statistics_multiple_writers_circular_buffer_test clean_census_stub_test clean_census_hash_table_test clean_fling_server clean_fling_client clean_fling_test clean_echo_server clean_echo_client clean_echo_test clean_low_level_ping_pong_benchmark clean_message_compress_test clean_bin_encoder_test clean_secure_endpoint_test clean_httpcli_format_request_test clean_httpcli_parser_test clean_httpcli_test clean_grpc_credentials_test clean_grpc_fetch_oauth2 clean_grpc_base64_test clean_grpc_json_token_test clean_timeout_encoding_test clean_fd_posix_test clean_fling_stream_test clean_lame_client_test clean_thread_pool_test clean_status_test clean_sync_client_async_server_test clean_qps_client clean_qps_server clean_interop_server clean_interop_client clean_end2end_test clean_channel_arguments_test clean_credentials_test clean_alarm_test clean_alarm_list_test clean_alarm_heap_test clean_time_test clean_chttp2_fake_security_cancel_after_accept_test clean_chttp2_fake_security_cancel_after_accept_and_writes_closed_test clean_chttp2_fake_security_cancel_after_invoke_test clean_chttp2_fake_security_cancel_before_invoke_test clean_chttp2_fake_security_cancel_in_a_vacuum_test clean_chttp2_fake_security_census_simple_request_test clean_chttp2_fake_security_disappearing_server_test clean_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fake_security_early_server_shutdown_finishes_tags_test clean_chttp2_fake_security_invoke_large_request_test clean_chttp2_fake_security_max_concurrent_streams_test clean_chttp2_fake_security_no_op_test clean_chttp2_fake_security_ping_pong_streaming_test clean_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_payload_test clean_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fake_security_simple_delayed_request_test clean_chttp2_fake_security_simple_request_test clean_chttp2_fake_security_thread_stress_test clean_chttp2_fake_security_writes_done_hangs_with_pending_read_test clean_chttp2_fullstack_cancel_after_accept_test clean_chttp2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_fullstack_cancel_after_invoke_test clean_chttp2_fullstack_cancel_before_invoke_test clean_chttp2_fullstack_cancel_in_a_vacuum_test clean_chttp2_fullstack_census_simple_request_test clean_chttp2_fullstack_disappearing_server_test clean_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_fullstack_invoke_large_request_test clean_chttp2_fullstack_max_concurrent_streams_test clean_chttp2_fullstack_no_op_test clean_chttp2_fullstack_ping_pong_streaming_test clean_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_payload_test clean_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fullstack_simple_delayed_request_test clean_chttp2_fullstack_simple_request_test clean_chttp2_fullstack_thread_stress_test clean_chttp2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_fullstack_census_simple_request_test clean_chttp2_simple_ssl_fullstack_disappearing_server_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_fullstack_no_op_test clean_chttp2_simple_ssl_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_fullstack_simple_request_test clean_chttp2_simple_ssl_fullstack_thread_stress_test clean_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test clean_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test clean_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_cancel_after_accept_test clean_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_cancel_after_invoke_test clean_chttp2_socket_pair_cancel_before_invoke_test clean_chttp2_socket_pair_cancel_in_a_vacuum_test clean_chttp2_socket_pair_census_simple_request_test clean_chttp2_socket_pair_disappearing_server_test clean_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_invoke_large_request_test clean_chttp2_socket_pair_max_concurrent_streams_test clean_chttp2_socket_pair_no_op_test clean_chttp2_socket_pair_ping_pong_streaming_test clean_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_payload_test clean_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_simple_delayed_request_test clean_chttp2_socket_pair_simple_request_test clean_chttp2_socket_pair_thread_stress_test clean_chttp2_socket_pair_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test clean_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test clean_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test clean_chttp2_socket_pair_one_byte_at_a_time_no_op_test clean_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test clean_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test +clean: clean_libgpr clean_libgrpc clean_libgrpc_unsecure clean_libgpr_test_util clean_libgrpc_test_util clean_libgrpc++ clean_libgrpc++_test_util clean_libend2end_fixture_chttp2_fake_security clean_libend2end_fixture_chttp2_fullstack clean_libend2end_fixture_chttp2_simple_ssl_fullstack clean_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack clean_libend2end_fixture_chttp2_socket_pair clean_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time clean_libend2end_test_cancel_after_accept clean_libend2end_test_cancel_after_accept_and_writes_closed clean_libend2end_test_cancel_after_invoke clean_libend2end_test_cancel_before_invoke clean_libend2end_test_cancel_in_a_vacuum clean_libend2end_test_census_simple_request clean_libend2end_test_disappearing_server clean_libend2end_test_early_server_shutdown_finishes_inflight_calls clean_libend2end_test_early_server_shutdown_finishes_tags clean_libend2end_test_invoke_large_request clean_libend2end_test_max_concurrent_streams clean_libend2end_test_no_op clean_libend2end_test_ping_pong_streaming clean_libend2end_test_request_response_with_binary_metadata_and_payload clean_libend2end_test_request_response_with_metadata_and_payload clean_libend2end_test_request_response_with_payload clean_libend2end_test_request_response_with_trailing_metadata_and_payload clean_libend2end_test_simple_delayed_request clean_libend2end_test_simple_request clean_libend2end_test_thread_stress clean_libend2end_test_writes_done_hangs_with_pending_read clean_libend2end_certs clean_gen_hpack_tables clean_cpp_plugin clean_ruby_plugin clean_grpc_byte_buffer_reader_test clean_gpr_cancellable_test clean_gpr_log_test clean_gpr_useful_test clean_gpr_cmdline_test clean_gpr_histogram_test clean_gpr_host_port_test clean_gpr_slice_buffer_test clean_gpr_slice_test clean_gpr_string_test clean_gpr_sync_test clean_gpr_thd_test clean_gpr_time_test clean_murmur_hash_test clean_grpc_stream_op_test clean_alpn_test clean_time_averaged_stats_test clean_chttp2_stream_encoder_test clean_hpack_table_test clean_chttp2_stream_map_test clean_hpack_parser_test clean_transport_metadata_test clean_chttp2_status_conversion_test clean_chttp2_transport_end2end_test clean_tcp_posix_test clean_dualstack_socket_test clean_no_server_test clean_resolve_address_test clean_sockaddr_utils_test clean_tcp_server_posix_test clean_tcp_client_posix_test clean_grpc_channel_stack_test clean_metadata_buffer_test clean_grpc_completion_queue_test clean_grpc_completion_queue_benchmark clean_census_trace_store_test clean_census_stats_store_test clean_census_window_stats_test clean_census_statistics_quick_test clean_census_statistics_small_log_test clean_census_statistics_performance_test clean_census_statistics_multiple_writers_test clean_census_statistics_multiple_writers_circular_buffer_test clean_census_stub_test clean_census_hash_table_test clean_fling_server clean_fling_client clean_fling_test clean_echo_server clean_echo_client clean_echo_test clean_low_level_ping_pong_benchmark clean_message_compress_test clean_bin_encoder_test clean_secure_endpoint_test clean_httpcli_format_request_test clean_httpcli_parser_test clean_httpcli_test clean_grpc_credentials_test clean_grpc_fetch_oauth2 clean_grpc_base64_test clean_grpc_json_token_test clean_timeout_encoding_test clean_fd_posix_test clean_fling_stream_test clean_lame_client_test clean_thread_pool_test clean_status_test clean_sync_client_async_server_test clean_qps_client clean_qps_server clean_interop_server clean_interop_client clean_end2end_test clean_channel_arguments_test clean_credentials_test clean_alarm_test clean_alarm_list_test clean_alarm_heap_test clean_time_test clean_chttp2_fake_security_cancel_after_accept_test clean_chttp2_fake_security_cancel_after_accept_and_writes_closed_test clean_chttp2_fake_security_cancel_after_invoke_test clean_chttp2_fake_security_cancel_before_invoke_test clean_chttp2_fake_security_cancel_in_a_vacuum_test clean_chttp2_fake_security_census_simple_request_test clean_chttp2_fake_security_disappearing_server_test clean_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fake_security_early_server_shutdown_finishes_tags_test clean_chttp2_fake_security_invoke_large_request_test clean_chttp2_fake_security_max_concurrent_streams_test clean_chttp2_fake_security_no_op_test clean_chttp2_fake_security_ping_pong_streaming_test clean_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_payload_test clean_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fake_security_simple_delayed_request_test clean_chttp2_fake_security_simple_request_test clean_chttp2_fake_security_thread_stress_test clean_chttp2_fake_security_writes_done_hangs_with_pending_read_test clean_chttp2_fullstack_cancel_after_accept_test clean_chttp2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_fullstack_cancel_after_invoke_test clean_chttp2_fullstack_cancel_before_invoke_test clean_chttp2_fullstack_cancel_in_a_vacuum_test clean_chttp2_fullstack_census_simple_request_test clean_chttp2_fullstack_disappearing_server_test clean_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_fullstack_invoke_large_request_test clean_chttp2_fullstack_max_concurrent_streams_test clean_chttp2_fullstack_no_op_test clean_chttp2_fullstack_ping_pong_streaming_test clean_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_payload_test clean_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fullstack_simple_delayed_request_test clean_chttp2_fullstack_simple_request_test clean_chttp2_fullstack_thread_stress_test clean_chttp2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_fullstack_census_simple_request_test clean_chttp2_simple_ssl_fullstack_disappearing_server_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_fullstack_no_op_test clean_chttp2_simple_ssl_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_fullstack_simple_request_test clean_chttp2_simple_ssl_fullstack_thread_stress_test clean_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test clean_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test clean_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_cancel_after_accept_test clean_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_cancel_after_invoke_test clean_chttp2_socket_pair_cancel_before_invoke_test clean_chttp2_socket_pair_cancel_in_a_vacuum_test clean_chttp2_socket_pair_census_simple_request_test clean_chttp2_socket_pair_disappearing_server_test clean_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_invoke_large_request_test clean_chttp2_socket_pair_max_concurrent_streams_test clean_chttp2_socket_pair_no_op_test clean_chttp2_socket_pair_ping_pong_streaming_test clean_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_payload_test clean_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_simple_delayed_request_test clean_chttp2_socket_pair_simple_request_test clean_chttp2_socket_pair_thread_stress_test clean_chttp2_socket_pair_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test clean_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test clean_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test clean_chttp2_socket_pair_one_byte_at_a_time_no_op_test clean_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test clean_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test $(Q) $(RM) -r deps objs libs bins gens @@ -2761,31 +2760,6 @@ clean_ruby_plugin: $(Q) $(RM) bins/$(CONFIG)/ruby_plugin -GO_PLUGIN_SRC = \ - src/compiler/go_plugin.cpp \ - src/compiler/go_generator.cpp \ - -GO_PLUGIN_OBJS = $(addprefix objs/$(CONFIG)/, $(addsuffix .o, $(basename $(GO_PLUGIN_SRC)))) -GO_PLUGIN_DEPS = $(addprefix deps/$(CONFIG)/, $(addsuffix .dep, $(basename $(GO_PLUGIN_SRC)))) - -bins/$(CONFIG)/go_plugin: $(GO_PLUGIN_OBJS) - $(E) "[HOSTLD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(HOST_LDXX) $(HOST_LDFLAGS) $(GO_PLUGIN_OBJS) $(HOST_LDLIBSXX) $(HOST_LDLIBS) $(HOST_LDLIBS_PROTOC) -o bins/$(CONFIG)/go_plugin - -deps_go_plugin: $(GO_PLUGIN_DEPS) - -ifneq ($(NO_DEPS),true) --include $(GO_PLUGIN_DEPS) -endif - -clean_go_plugin: - $(E) "[CLEAN] Cleaning go_plugin files" - $(Q) $(RM) $(GO_PLUGIN_OBJS) - $(Q) $(RM) $(GO_PLUGIN_DEPS) - $(Q) $(RM) bins/$(CONFIG)/go_plugin - - GRPC_BYTE_BUFFER_READER_TEST_SRC = \ test/core/surface/byte_buffer_reader_test.c \ @@ -9680,4 +9654,4 @@ clean_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_ -.PHONY: all strip tools dep_error openssl_dep_error openssl_dep_message git_update stop buildtests buildtests_c buildtests_cxx test test_c test_cxx install install_c install_cxx install-headers install-headers_c install-headers_cxx install-shared install-shared_c install-shared_cxx install-static install-static_c install-static_cxx strip strip-shared strip-static strip_c strip-shared_c strip-static_c strip_cxx strip-shared_cxx strip-static_cxx clean dep_c dep_cxx bins_dep_c bins_dep_cxx deps_libgpr clean_libgpr deps_libgrpc clean_libgrpc deps_libgrpc_unsecure clean_libgrpc_unsecure deps_libgpr_test_util clean_libgpr_test_util deps_libgrpc_test_util clean_libgrpc_test_util deps_libgrpc++ clean_libgrpc++ deps_libgrpc++_test_util clean_libgrpc++_test_util deps_libend2end_fixture_chttp2_fake_security clean_libend2end_fixture_chttp2_fake_security deps_libend2end_fixture_chttp2_fullstack clean_libend2end_fixture_chttp2_fullstack deps_libend2end_fixture_chttp2_simple_ssl_fullstack clean_libend2end_fixture_chttp2_simple_ssl_fullstack deps_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack clean_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack deps_libend2end_fixture_chttp2_socket_pair clean_libend2end_fixture_chttp2_socket_pair deps_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time clean_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time deps_libend2end_test_cancel_after_accept clean_libend2end_test_cancel_after_accept deps_libend2end_test_cancel_after_accept_and_writes_closed clean_libend2end_test_cancel_after_accept_and_writes_closed deps_libend2end_test_cancel_after_invoke clean_libend2end_test_cancel_after_invoke deps_libend2end_test_cancel_before_invoke clean_libend2end_test_cancel_before_invoke deps_libend2end_test_cancel_in_a_vacuum clean_libend2end_test_cancel_in_a_vacuum deps_libend2end_test_census_simple_request clean_libend2end_test_census_simple_request deps_libend2end_test_disappearing_server clean_libend2end_test_disappearing_server deps_libend2end_test_early_server_shutdown_finishes_inflight_calls clean_libend2end_test_early_server_shutdown_finishes_inflight_calls deps_libend2end_test_early_server_shutdown_finishes_tags clean_libend2end_test_early_server_shutdown_finishes_tags deps_libend2end_test_invoke_large_request clean_libend2end_test_invoke_large_request deps_libend2end_test_max_concurrent_streams clean_libend2end_test_max_concurrent_streams deps_libend2end_test_no_op clean_libend2end_test_no_op deps_libend2end_test_ping_pong_streaming clean_libend2end_test_ping_pong_streaming deps_libend2end_test_request_response_with_binary_metadata_and_payload clean_libend2end_test_request_response_with_binary_metadata_and_payload deps_libend2end_test_request_response_with_metadata_and_payload clean_libend2end_test_request_response_with_metadata_and_payload deps_libend2end_test_request_response_with_payload clean_libend2end_test_request_response_with_payload deps_libend2end_test_request_response_with_trailing_metadata_and_payload clean_libend2end_test_request_response_with_trailing_metadata_and_payload deps_libend2end_test_simple_delayed_request clean_libend2end_test_simple_delayed_request deps_libend2end_test_simple_request clean_libend2end_test_simple_request deps_libend2end_test_thread_stress clean_libend2end_test_thread_stress deps_libend2end_test_writes_done_hangs_with_pending_read clean_libend2end_test_writes_done_hangs_with_pending_read deps_libend2end_certs clean_libend2end_certs deps_gen_hpack_tables clean_gen_hpack_tables deps_cpp_plugin clean_cpp_plugin deps_ruby_plugin clean_ruby_plugin deps_go_plugin clean_go_plugin deps_grpc_byte_buffer_reader_test clean_grpc_byte_buffer_reader_test deps_gpr_cancellable_test clean_gpr_cancellable_test deps_gpr_log_test clean_gpr_log_test deps_gpr_useful_test clean_gpr_useful_test deps_gpr_cmdline_test clean_gpr_cmdline_test deps_gpr_histogram_test clean_gpr_histogram_test deps_gpr_host_port_test clean_gpr_host_port_test deps_gpr_slice_buffer_test clean_gpr_slice_buffer_test deps_gpr_slice_test clean_gpr_slice_test deps_gpr_string_test clean_gpr_string_test deps_gpr_sync_test clean_gpr_sync_test deps_gpr_thd_test clean_gpr_thd_test deps_gpr_time_test clean_gpr_time_test deps_murmur_hash_test clean_murmur_hash_test deps_grpc_stream_op_test clean_grpc_stream_op_test deps_alpn_test clean_alpn_test deps_time_averaged_stats_test clean_time_averaged_stats_test deps_chttp2_stream_encoder_test clean_chttp2_stream_encoder_test deps_hpack_table_test clean_hpack_table_test deps_chttp2_stream_map_test clean_chttp2_stream_map_test deps_hpack_parser_test clean_hpack_parser_test deps_transport_metadata_test clean_transport_metadata_test deps_chttp2_status_conversion_test clean_chttp2_status_conversion_test deps_chttp2_transport_end2end_test clean_chttp2_transport_end2end_test deps_tcp_posix_test clean_tcp_posix_test deps_dualstack_socket_test clean_dualstack_socket_test deps_no_server_test clean_no_server_test deps_resolve_address_test clean_resolve_address_test deps_sockaddr_utils_test clean_sockaddr_utils_test deps_tcp_server_posix_test clean_tcp_server_posix_test deps_tcp_client_posix_test clean_tcp_client_posix_test deps_grpc_channel_stack_test clean_grpc_channel_stack_test deps_metadata_buffer_test clean_metadata_buffer_test deps_grpc_completion_queue_test clean_grpc_completion_queue_test deps_grpc_completion_queue_benchmark clean_grpc_completion_queue_benchmark deps_census_trace_store_test clean_census_trace_store_test deps_census_stats_store_test clean_census_stats_store_test deps_census_window_stats_test clean_census_window_stats_test deps_census_statistics_quick_test clean_census_statistics_quick_test deps_census_statistics_small_log_test clean_census_statistics_small_log_test deps_census_statistics_performance_test clean_census_statistics_performance_test deps_census_statistics_multiple_writers_test clean_census_statistics_multiple_writers_test deps_census_statistics_multiple_writers_circular_buffer_test clean_census_statistics_multiple_writers_circular_buffer_test deps_census_stub_test clean_census_stub_test deps_census_hash_table_test clean_census_hash_table_test deps_fling_server clean_fling_server deps_fling_client clean_fling_client deps_fling_test clean_fling_test deps_echo_server clean_echo_server deps_echo_client clean_echo_client deps_echo_test clean_echo_test deps_low_level_ping_pong_benchmark clean_low_level_ping_pong_benchmark deps_message_compress_test clean_message_compress_test deps_bin_encoder_test clean_bin_encoder_test deps_secure_endpoint_test clean_secure_endpoint_test deps_httpcli_format_request_test clean_httpcli_format_request_test deps_httpcli_parser_test clean_httpcli_parser_test deps_httpcli_test clean_httpcli_test deps_grpc_credentials_test clean_grpc_credentials_test deps_grpc_fetch_oauth2 clean_grpc_fetch_oauth2 deps_grpc_base64_test clean_grpc_base64_test deps_grpc_json_token_test clean_grpc_json_token_test deps_timeout_encoding_test clean_timeout_encoding_test deps_fd_posix_test clean_fd_posix_test deps_fling_stream_test clean_fling_stream_test deps_lame_client_test clean_lame_client_test deps_thread_pool_test clean_thread_pool_test deps_status_test clean_status_test deps_sync_client_async_server_test clean_sync_client_async_server_test deps_qps_client clean_qps_client deps_qps_server clean_qps_server deps_interop_server clean_interop_server deps_interop_client clean_interop_client deps_end2end_test clean_end2end_test deps_channel_arguments_test clean_channel_arguments_test deps_credentials_test clean_credentials_test deps_alarm_test clean_alarm_test deps_alarm_list_test clean_alarm_list_test deps_alarm_heap_test clean_alarm_heap_test deps_time_test clean_time_test deps_chttp2_fake_security_cancel_after_accept_test clean_chttp2_fake_security_cancel_after_accept_test deps_chttp2_fake_security_cancel_after_accept_and_writes_closed_test clean_chttp2_fake_security_cancel_after_accept_and_writes_closed_test deps_chttp2_fake_security_cancel_after_invoke_test clean_chttp2_fake_security_cancel_after_invoke_test deps_chttp2_fake_security_cancel_before_invoke_test clean_chttp2_fake_security_cancel_before_invoke_test deps_chttp2_fake_security_cancel_in_a_vacuum_test clean_chttp2_fake_security_cancel_in_a_vacuum_test deps_chttp2_fake_security_census_simple_request_test clean_chttp2_fake_security_census_simple_request_test deps_chttp2_fake_security_disappearing_server_test clean_chttp2_fake_security_disappearing_server_test deps_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_fake_security_early_server_shutdown_finishes_tags_test clean_chttp2_fake_security_early_server_shutdown_finishes_tags_test deps_chttp2_fake_security_invoke_large_request_test clean_chttp2_fake_security_invoke_large_request_test deps_chttp2_fake_security_max_concurrent_streams_test clean_chttp2_fake_security_max_concurrent_streams_test deps_chttp2_fake_security_no_op_test clean_chttp2_fake_security_no_op_test deps_chttp2_fake_security_ping_pong_streaming_test clean_chttp2_fake_security_ping_pong_streaming_test deps_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test deps_chttp2_fake_security_request_response_with_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_metadata_and_payload_test deps_chttp2_fake_security_request_response_with_payload_test clean_chttp2_fake_security_request_response_with_payload_test deps_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test deps_chttp2_fake_security_simple_delayed_request_test clean_chttp2_fake_security_simple_delayed_request_test deps_chttp2_fake_security_simple_request_test clean_chttp2_fake_security_simple_request_test deps_chttp2_fake_security_thread_stress_test clean_chttp2_fake_security_thread_stress_test deps_chttp2_fake_security_writes_done_hangs_with_pending_read_test clean_chttp2_fake_security_writes_done_hangs_with_pending_read_test deps_chttp2_fullstack_cancel_after_accept_test clean_chttp2_fullstack_cancel_after_accept_test deps_chttp2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_fullstack_cancel_after_invoke_test clean_chttp2_fullstack_cancel_after_invoke_test deps_chttp2_fullstack_cancel_before_invoke_test clean_chttp2_fullstack_cancel_before_invoke_test deps_chttp2_fullstack_cancel_in_a_vacuum_test clean_chttp2_fullstack_cancel_in_a_vacuum_test deps_chttp2_fullstack_census_simple_request_test clean_chttp2_fullstack_census_simple_request_test deps_chttp2_fullstack_disappearing_server_test clean_chttp2_fullstack_disappearing_server_test deps_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_fullstack_invoke_large_request_test clean_chttp2_fullstack_invoke_large_request_test deps_chttp2_fullstack_max_concurrent_streams_test clean_chttp2_fullstack_max_concurrent_streams_test deps_chttp2_fullstack_no_op_test clean_chttp2_fullstack_no_op_test deps_chttp2_fullstack_ping_pong_streaming_test clean_chttp2_fullstack_ping_pong_streaming_test deps_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_fullstack_request_response_with_payload_test clean_chttp2_fullstack_request_response_with_payload_test deps_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_fullstack_simple_delayed_request_test clean_chttp2_fullstack_simple_delayed_request_test deps_chttp2_fullstack_simple_request_test clean_chttp2_fullstack_simple_request_test deps_chttp2_fullstack_thread_stress_test clean_chttp2_fullstack_thread_stress_test deps_chttp2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_simple_ssl_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_test deps_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_simple_ssl_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_after_invoke_test deps_chttp2_simple_ssl_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_before_invoke_test deps_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test deps_chttp2_simple_ssl_fullstack_census_simple_request_test clean_chttp2_simple_ssl_fullstack_census_simple_request_test deps_chttp2_simple_ssl_fullstack_disappearing_server_test clean_chttp2_simple_ssl_fullstack_disappearing_server_test deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_simple_ssl_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_fullstack_invoke_large_request_test deps_chttp2_simple_ssl_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_fullstack_max_concurrent_streams_test deps_chttp2_simple_ssl_fullstack_no_op_test clean_chttp2_simple_ssl_fullstack_no_op_test deps_chttp2_simple_ssl_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_fullstack_ping_pong_streaming_test deps_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_fullstack_simple_delayed_request_test deps_chttp2_simple_ssl_fullstack_simple_request_test clean_chttp2_simple_ssl_fullstack_simple_request_test deps_chttp2_simple_ssl_fullstack_thread_stress_test clean_chttp2_simple_ssl_fullstack_thread_stress_test deps_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test deps_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test clean_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test deps_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test clean_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test deps_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test clean_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test deps_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_socket_pair_cancel_after_accept_test clean_chttp2_socket_pair_cancel_after_accept_test deps_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test deps_chttp2_socket_pair_cancel_after_invoke_test clean_chttp2_socket_pair_cancel_after_invoke_test deps_chttp2_socket_pair_cancel_before_invoke_test clean_chttp2_socket_pair_cancel_before_invoke_test deps_chttp2_socket_pair_cancel_in_a_vacuum_test clean_chttp2_socket_pair_cancel_in_a_vacuum_test deps_chttp2_socket_pair_census_simple_request_test clean_chttp2_socket_pair_census_simple_request_test deps_chttp2_socket_pair_disappearing_server_test clean_chttp2_socket_pair_disappearing_server_test deps_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_socket_pair_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_early_server_shutdown_finishes_tags_test deps_chttp2_socket_pair_invoke_large_request_test clean_chttp2_socket_pair_invoke_large_request_test deps_chttp2_socket_pair_max_concurrent_streams_test clean_chttp2_socket_pair_max_concurrent_streams_test deps_chttp2_socket_pair_no_op_test clean_chttp2_socket_pair_no_op_test deps_chttp2_socket_pair_ping_pong_streaming_test clean_chttp2_socket_pair_ping_pong_streaming_test deps_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test deps_chttp2_socket_pair_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_metadata_and_payload_test deps_chttp2_socket_pair_request_response_with_payload_test clean_chttp2_socket_pair_request_response_with_payload_test deps_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test deps_chttp2_socket_pair_simple_delayed_request_test clean_chttp2_socket_pair_simple_delayed_request_test deps_chttp2_socket_pair_simple_request_test clean_chttp2_socket_pair_simple_request_test deps_chttp2_socket_pair_thread_stress_test clean_chttp2_socket_pair_thread_stress_test deps_chttp2_socket_pair_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_writes_done_hangs_with_pending_read_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test deps_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test deps_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test clean_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test deps_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test clean_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test deps_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test clean_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test deps_chttp2_socket_pair_one_byte_at_a_time_no_op_test clean_chttp2_socket_pair_one_byte_at_a_time_no_op_test deps_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test clean_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test deps_chttp2_socket_pair_one_byte_at_a_time_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_request_test deps_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test clean_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test deps_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test +.PHONY: all strip tools dep_error openssl_dep_error openssl_dep_message git_update stop buildtests buildtests_c buildtests_cxx test test_c test_cxx install install_c install_cxx install-headers install-headers_c install-headers_cxx install-shared install-shared_c install-shared_cxx install-static install-static_c install-static_cxx strip strip-shared strip-static strip_c strip-shared_c strip-static_c strip_cxx strip-shared_cxx strip-static_cxx clean dep_c dep_cxx bins_dep_c bins_dep_cxx deps_libgpr clean_libgpr deps_libgrpc clean_libgrpc deps_libgrpc_unsecure clean_libgrpc_unsecure deps_libgpr_test_util clean_libgpr_test_util deps_libgrpc_test_util clean_libgrpc_test_util deps_libgrpc++ clean_libgrpc++ deps_libgrpc++_test_util clean_libgrpc++_test_util deps_libend2end_fixture_chttp2_fake_security clean_libend2end_fixture_chttp2_fake_security deps_libend2end_fixture_chttp2_fullstack clean_libend2end_fixture_chttp2_fullstack deps_libend2end_fixture_chttp2_simple_ssl_fullstack clean_libend2end_fixture_chttp2_simple_ssl_fullstack deps_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack clean_libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack deps_libend2end_fixture_chttp2_socket_pair clean_libend2end_fixture_chttp2_socket_pair deps_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time clean_libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time deps_libend2end_test_cancel_after_accept clean_libend2end_test_cancel_after_accept deps_libend2end_test_cancel_after_accept_and_writes_closed clean_libend2end_test_cancel_after_accept_and_writes_closed deps_libend2end_test_cancel_after_invoke clean_libend2end_test_cancel_after_invoke deps_libend2end_test_cancel_before_invoke clean_libend2end_test_cancel_before_invoke deps_libend2end_test_cancel_in_a_vacuum clean_libend2end_test_cancel_in_a_vacuum deps_libend2end_test_census_simple_request clean_libend2end_test_census_simple_request deps_libend2end_test_disappearing_server clean_libend2end_test_disappearing_server deps_libend2end_test_early_server_shutdown_finishes_inflight_calls clean_libend2end_test_early_server_shutdown_finishes_inflight_calls deps_libend2end_test_early_server_shutdown_finishes_tags clean_libend2end_test_early_server_shutdown_finishes_tags deps_libend2end_test_invoke_large_request clean_libend2end_test_invoke_large_request deps_libend2end_test_max_concurrent_streams clean_libend2end_test_max_concurrent_streams deps_libend2end_test_no_op clean_libend2end_test_no_op deps_libend2end_test_ping_pong_streaming clean_libend2end_test_ping_pong_streaming deps_libend2end_test_request_response_with_binary_metadata_and_payload clean_libend2end_test_request_response_with_binary_metadata_and_payload deps_libend2end_test_request_response_with_metadata_and_payload clean_libend2end_test_request_response_with_metadata_and_payload deps_libend2end_test_request_response_with_payload clean_libend2end_test_request_response_with_payload deps_libend2end_test_request_response_with_trailing_metadata_and_payload clean_libend2end_test_request_response_with_trailing_metadata_and_payload deps_libend2end_test_simple_delayed_request clean_libend2end_test_simple_delayed_request deps_libend2end_test_simple_request clean_libend2end_test_simple_request deps_libend2end_test_thread_stress clean_libend2end_test_thread_stress deps_libend2end_test_writes_done_hangs_with_pending_read clean_libend2end_test_writes_done_hangs_with_pending_read deps_libend2end_certs clean_libend2end_certs deps_gen_hpack_tables clean_gen_hpack_tables deps_cpp_plugin clean_cpp_plugin deps_ruby_plugin clean_ruby_plugin deps_grpc_byte_buffer_reader_test clean_grpc_byte_buffer_reader_test deps_gpr_cancellable_test clean_gpr_cancellable_test deps_gpr_log_test clean_gpr_log_test deps_gpr_useful_test clean_gpr_useful_test deps_gpr_cmdline_test clean_gpr_cmdline_test deps_gpr_histogram_test clean_gpr_histogram_test deps_gpr_host_port_test clean_gpr_host_port_test deps_gpr_slice_buffer_test clean_gpr_slice_buffer_test deps_gpr_slice_test clean_gpr_slice_test deps_gpr_string_test clean_gpr_string_test deps_gpr_sync_test clean_gpr_sync_test deps_gpr_thd_test clean_gpr_thd_test deps_gpr_time_test clean_gpr_time_test deps_murmur_hash_test clean_murmur_hash_test deps_grpc_stream_op_test clean_grpc_stream_op_test deps_alpn_test clean_alpn_test deps_time_averaged_stats_test clean_time_averaged_stats_test deps_chttp2_stream_encoder_test clean_chttp2_stream_encoder_test deps_hpack_table_test clean_hpack_table_test deps_chttp2_stream_map_test clean_chttp2_stream_map_test deps_hpack_parser_test clean_hpack_parser_test deps_transport_metadata_test clean_transport_metadata_test deps_chttp2_status_conversion_test clean_chttp2_status_conversion_test deps_chttp2_transport_end2end_test clean_chttp2_transport_end2end_test deps_tcp_posix_test clean_tcp_posix_test deps_dualstack_socket_test clean_dualstack_socket_test deps_no_server_test clean_no_server_test deps_resolve_address_test clean_resolve_address_test deps_sockaddr_utils_test clean_sockaddr_utils_test deps_tcp_server_posix_test clean_tcp_server_posix_test deps_tcp_client_posix_test clean_tcp_client_posix_test deps_grpc_channel_stack_test clean_grpc_channel_stack_test deps_metadata_buffer_test clean_metadata_buffer_test deps_grpc_completion_queue_test clean_grpc_completion_queue_test deps_grpc_completion_queue_benchmark clean_grpc_completion_queue_benchmark deps_census_trace_store_test clean_census_trace_store_test deps_census_stats_store_test clean_census_stats_store_test deps_census_window_stats_test clean_census_window_stats_test deps_census_statistics_quick_test clean_census_statistics_quick_test deps_census_statistics_small_log_test clean_census_statistics_small_log_test deps_census_statistics_performance_test clean_census_statistics_performance_test deps_census_statistics_multiple_writers_test clean_census_statistics_multiple_writers_test deps_census_statistics_multiple_writers_circular_buffer_test clean_census_statistics_multiple_writers_circular_buffer_test deps_census_stub_test clean_census_stub_test deps_census_hash_table_test clean_census_hash_table_test deps_fling_server clean_fling_server deps_fling_client clean_fling_client deps_fling_test clean_fling_test deps_echo_server clean_echo_server deps_echo_client clean_echo_client deps_echo_test clean_echo_test deps_low_level_ping_pong_benchmark clean_low_level_ping_pong_benchmark deps_message_compress_test clean_message_compress_test deps_bin_encoder_test clean_bin_encoder_test deps_secure_endpoint_test clean_secure_endpoint_test deps_httpcli_format_request_test clean_httpcli_format_request_test deps_httpcli_parser_test clean_httpcli_parser_test deps_httpcli_test clean_httpcli_test deps_grpc_credentials_test clean_grpc_credentials_test deps_grpc_fetch_oauth2 clean_grpc_fetch_oauth2 deps_grpc_base64_test clean_grpc_base64_test deps_grpc_json_token_test clean_grpc_json_token_test deps_timeout_encoding_test clean_timeout_encoding_test deps_fd_posix_test clean_fd_posix_test deps_fling_stream_test clean_fling_stream_test deps_lame_client_test clean_lame_client_test deps_thread_pool_test clean_thread_pool_test deps_status_test clean_status_test deps_sync_client_async_server_test clean_sync_client_async_server_test deps_qps_client clean_qps_client deps_qps_server clean_qps_server deps_interop_server clean_interop_server deps_interop_client clean_interop_client deps_end2end_test clean_end2end_test deps_channel_arguments_test clean_channel_arguments_test deps_credentials_test clean_credentials_test deps_alarm_test clean_alarm_test deps_alarm_list_test clean_alarm_list_test deps_alarm_heap_test clean_alarm_heap_test deps_time_test clean_time_test deps_chttp2_fake_security_cancel_after_accept_test clean_chttp2_fake_security_cancel_after_accept_test deps_chttp2_fake_security_cancel_after_accept_and_writes_closed_test clean_chttp2_fake_security_cancel_after_accept_and_writes_closed_test deps_chttp2_fake_security_cancel_after_invoke_test clean_chttp2_fake_security_cancel_after_invoke_test deps_chttp2_fake_security_cancel_before_invoke_test clean_chttp2_fake_security_cancel_before_invoke_test deps_chttp2_fake_security_cancel_in_a_vacuum_test clean_chttp2_fake_security_cancel_in_a_vacuum_test deps_chttp2_fake_security_census_simple_request_test clean_chttp2_fake_security_census_simple_request_test deps_chttp2_fake_security_disappearing_server_test clean_chttp2_fake_security_disappearing_server_test deps_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fake_security_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_fake_security_early_server_shutdown_finishes_tags_test clean_chttp2_fake_security_early_server_shutdown_finishes_tags_test deps_chttp2_fake_security_invoke_large_request_test clean_chttp2_fake_security_invoke_large_request_test deps_chttp2_fake_security_max_concurrent_streams_test clean_chttp2_fake_security_max_concurrent_streams_test deps_chttp2_fake_security_no_op_test clean_chttp2_fake_security_no_op_test deps_chttp2_fake_security_ping_pong_streaming_test clean_chttp2_fake_security_ping_pong_streaming_test deps_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_binary_metadata_and_payload_test deps_chttp2_fake_security_request_response_with_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_metadata_and_payload_test deps_chttp2_fake_security_request_response_with_payload_test clean_chttp2_fake_security_request_response_with_payload_test deps_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fake_security_request_response_with_trailing_metadata_and_payload_test deps_chttp2_fake_security_simple_delayed_request_test clean_chttp2_fake_security_simple_delayed_request_test deps_chttp2_fake_security_simple_request_test clean_chttp2_fake_security_simple_request_test deps_chttp2_fake_security_thread_stress_test clean_chttp2_fake_security_thread_stress_test deps_chttp2_fake_security_writes_done_hangs_with_pending_read_test clean_chttp2_fake_security_writes_done_hangs_with_pending_read_test deps_chttp2_fullstack_cancel_after_accept_test clean_chttp2_fullstack_cancel_after_accept_test deps_chttp2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_fullstack_cancel_after_invoke_test clean_chttp2_fullstack_cancel_after_invoke_test deps_chttp2_fullstack_cancel_before_invoke_test clean_chttp2_fullstack_cancel_before_invoke_test deps_chttp2_fullstack_cancel_in_a_vacuum_test clean_chttp2_fullstack_cancel_in_a_vacuum_test deps_chttp2_fullstack_census_simple_request_test clean_chttp2_fullstack_census_simple_request_test deps_chttp2_fullstack_disappearing_server_test clean_chttp2_fullstack_disappearing_server_test deps_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_fullstack_invoke_large_request_test clean_chttp2_fullstack_invoke_large_request_test deps_chttp2_fullstack_max_concurrent_streams_test clean_chttp2_fullstack_max_concurrent_streams_test deps_chttp2_fullstack_no_op_test clean_chttp2_fullstack_no_op_test deps_chttp2_fullstack_ping_pong_streaming_test clean_chttp2_fullstack_ping_pong_streaming_test deps_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_fullstack_request_response_with_payload_test clean_chttp2_fullstack_request_response_with_payload_test deps_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_fullstack_simple_delayed_request_test clean_chttp2_fullstack_simple_delayed_request_test deps_chttp2_fullstack_simple_request_test clean_chttp2_fullstack_simple_request_test deps_chttp2_fullstack_thread_stress_test clean_chttp2_fullstack_thread_stress_test deps_chttp2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_simple_ssl_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_test deps_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_simple_ssl_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_after_invoke_test deps_chttp2_simple_ssl_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_fullstack_cancel_before_invoke_test deps_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_fullstack_cancel_in_a_vacuum_test deps_chttp2_simple_ssl_fullstack_census_simple_request_test clean_chttp2_simple_ssl_fullstack_census_simple_request_test deps_chttp2_simple_ssl_fullstack_disappearing_server_test clean_chttp2_simple_ssl_fullstack_disappearing_server_test deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_simple_ssl_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_fullstack_invoke_large_request_test deps_chttp2_simple_ssl_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_fullstack_max_concurrent_streams_test deps_chttp2_simple_ssl_fullstack_no_op_test clean_chttp2_simple_ssl_fullstack_no_op_test deps_chttp2_simple_ssl_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_fullstack_ping_pong_streaming_test deps_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_payload_test deps_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_simple_ssl_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_fullstack_simple_delayed_request_test deps_chttp2_simple_ssl_fullstack_simple_request_test clean_chttp2_simple_ssl_fullstack_simple_request_test deps_chttp2_simple_ssl_fullstack_thread_stress_test clean_chttp2_simple_ssl_fullstack_thread_stress_test deps_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_and_writes_closed_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_invoke_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_before_invoke_test deps_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test clean_chttp2_simple_ssl_with_oauth2_fullstack_cancel_in_a_vacuum_test deps_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_census_simple_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test clean_chttp2_simple_ssl_with_oauth2_fullstack_disappearing_server_test deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test clean_chttp2_simple_ssl_with_oauth2_fullstack_early_server_shutdown_finishes_tags_test deps_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test clean_chttp2_simple_ssl_with_oauth2_fullstack_max_concurrent_streams_test deps_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test clean_chttp2_simple_ssl_with_oauth2_fullstack_no_op_test deps_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test clean_chttp2_simple_ssl_with_oauth2_fullstack_ping_pong_streaming_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_binary_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test clean_chttp2_simple_ssl_with_oauth2_fullstack_request_response_with_trailing_metadata_and_payload_test deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_delayed_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test clean_chttp2_simple_ssl_with_oauth2_fullstack_simple_request_test deps_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test clean_chttp2_simple_ssl_with_oauth2_fullstack_thread_stress_test deps_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test clean_chttp2_simple_ssl_with_oauth2_fullstack_writes_done_hangs_with_pending_read_test deps_chttp2_socket_pair_cancel_after_accept_test clean_chttp2_socket_pair_cancel_after_accept_test deps_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_cancel_after_accept_and_writes_closed_test deps_chttp2_socket_pair_cancel_after_invoke_test clean_chttp2_socket_pair_cancel_after_invoke_test deps_chttp2_socket_pair_cancel_before_invoke_test clean_chttp2_socket_pair_cancel_before_invoke_test deps_chttp2_socket_pair_cancel_in_a_vacuum_test clean_chttp2_socket_pair_cancel_in_a_vacuum_test deps_chttp2_socket_pair_census_simple_request_test clean_chttp2_socket_pair_census_simple_request_test deps_chttp2_socket_pair_disappearing_server_test clean_chttp2_socket_pair_disappearing_server_test deps_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_socket_pair_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_early_server_shutdown_finishes_tags_test deps_chttp2_socket_pair_invoke_large_request_test clean_chttp2_socket_pair_invoke_large_request_test deps_chttp2_socket_pair_max_concurrent_streams_test clean_chttp2_socket_pair_max_concurrent_streams_test deps_chttp2_socket_pair_no_op_test clean_chttp2_socket_pair_no_op_test deps_chttp2_socket_pair_ping_pong_streaming_test clean_chttp2_socket_pair_ping_pong_streaming_test deps_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_binary_metadata_and_payload_test deps_chttp2_socket_pair_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_metadata_and_payload_test deps_chttp2_socket_pair_request_response_with_payload_test clean_chttp2_socket_pair_request_response_with_payload_test deps_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_request_response_with_trailing_metadata_and_payload_test deps_chttp2_socket_pair_simple_delayed_request_test clean_chttp2_socket_pair_simple_delayed_request_test deps_chttp2_socket_pair_simple_request_test clean_chttp2_socket_pair_simple_request_test deps_chttp2_socket_pair_thread_stress_test clean_chttp2_socket_pair_thread_stress_test deps_chttp2_socket_pair_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_writes_done_hangs_with_pending_read_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_and_writes_closed_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_after_invoke_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_before_invoke_test deps_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test clean_chttp2_socket_pair_one_byte_at_a_time_cancel_in_a_vacuum_test deps_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_census_simple_request_test deps_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test clean_chttp2_socket_pair_one_byte_at_a_time_disappearing_server_test deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_inflight_calls_test deps_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test clean_chttp2_socket_pair_one_byte_at_a_time_early_server_shutdown_finishes_tags_test deps_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test clean_chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test deps_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test clean_chttp2_socket_pair_one_byte_at_a_time_max_concurrent_streams_test deps_chttp2_socket_pair_one_byte_at_a_time_no_op_test clean_chttp2_socket_pair_one_byte_at_a_time_no_op_test deps_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test clean_chttp2_socket_pair_one_byte_at_a_time_ping_pong_streaming_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_binary_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test clean_chttp2_socket_pair_one_byte_at_a_time_request_response_with_trailing_metadata_and_payload_test deps_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_delayed_request_test deps_chttp2_socket_pair_one_byte_at_a_time_simple_request_test clean_chttp2_socket_pair_one_byte_at_a_time_simple_request_test deps_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test clean_chttp2_socket_pair_one_byte_at_a_time_thread_stress_test deps_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test clean_chttp2_socket_pair_one_byte_at_a_time_writes_done_hangs_with_pending_read_test diff --git a/build.json b/build.json index 385e2c9675e..d38b70ad15f 100644 --- a/build.json +++ b/build.json @@ -448,25 +448,6 @@ ], "deps": [] }, - - { - "name": "go_plugin", - "build": "protoc", - "c++": true, - "secure": false, - "src": [ - "src/compiler/go_plugin.cpp", - "src/compiler/go_generator.cpp" - ], - "headers": [ - "src/compiler/go_generator.h", - "src/compiler/go_generator_helpers-inl.h", - "src/compiler/go_generator_map-inl.h", - "src/compiler/go_generator_string-inl.h" - ], - "deps": [] - }, - { "name": "grpc_byte_buffer_reader_test", "build": "test", diff --git a/src/compiler/go_generator.cc b/src/compiler/go_generator.cc deleted file mode 100644 index 8beae8dcccf..00000000000 --- a/src/compiler/go_generator.cc +++ /dev/null @@ -1,520 +0,0 @@ -/* - * - * Copyright 2014, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -using namespace std; - -#include "src/compiler/go_generator.h" - -#include - -#include -#include -#include -#include - -namespace grpc_go_generator { - -bool NoStreaming(const google::protobuf::MethodDescriptor* method) { - return !method->client_streaming() && - !method->server_streaming(); -} - -bool ClientOnlyStreaming(const google::protobuf::MethodDescriptor* method) { - return method->client_streaming() && - !method->server_streaming(); -} - -bool ServerOnlyStreaming(const google::protobuf::MethodDescriptor* method) { - return !method->client_streaming() && - method->server_streaming(); -} - -bool BidiStreaming(const google::protobuf::MethodDescriptor* method) { - return method->client_streaming() && - method->server_streaming(); -} - -bool HasClientOnlyStreaming(const google::protobuf::FileDescriptor* file) { - for (int i = 0; i < file->service_count(); i++) { - for (int j = 0; j < file->service(i)->method_count(); j++) { - if (ClientOnlyStreaming(file->service(i)->method(j))) { - return true; - } - } - } - return false; -} - -string LowerCaseService(const string& service) { - string ret = service; - if (!ret.empty() && ret[0] >= 'A' && ret[0] <= 'Z') { - ret[0] = ret[0] - 'A' + 'a'; - } - return ret; -} - -void PrintClientMethodDef(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - (*vars)["Request"] = method->input_type()->name(); - (*vars)["Response"] = method->output_type()->name(); - if (NoStreaming(method)) { - printer->Print(*vars, - "\t$Method$(ctx context.Context, in *$Request$, opts ...rpc.CallOption) " - "(*$Response$, error)\n"); - } else if (BidiStreaming(method)) { - printer->Print(*vars, - "\t$Method$(ctx context.Context, opts ...rpc.CallOption) " - "($Service$_$Method$Client, error)\n"); - } else if (ServerOnlyStreaming(method)) { - printer->Print(*vars, - "\t$Method$(ctx context.Context, m *$Request$, opts ...rpc.CallOption) " - "($Service$_$Method$Client, error)\n"); - } else if (ClientOnlyStreaming(method)) { - printer->Print(*vars, - "\t$Method$(ctx context.Context, opts ...rpc.CallOption) " - "($Service$_$Method$Client, error)\n"); - } -} - -void PrintClientMethodImpl(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - (*vars)["Request"] = method->input_type()->name(); - (*vars)["Response"] = method->output_type()->name(); - - if (NoStreaming(method)) { - printer->Print(*vars, - "func (c *$ServiceStruct$Client) $Method$(ctx context.Context, " - "in *$Request$, opts ...rpc.CallOption) (*$Response$, error) {\n"); - printer->Print(*vars, - "\tout := new($Response$)\n"); - printer->Print(*vars, - "\terr := rpc.Invoke(ctx, \"/$Package$$Service$/$Method$\", " - "in, out, c.cc, opts...)\n"); - printer->Print("\tif err != nil {\n"); - printer->Print("\t\treturn nil, err\n"); - printer->Print("\t}\n"); - printer->Print("\treturn out, nil\n"); - printer->Print("}\n\n"); - } else if (BidiStreaming(method)) { - printer->Print( - *vars, - "func (c *$ServiceStruct$Client) $Method$(ctx context.Context, opts " - "...rpc.CallOption) ($Service$_$Method$Client, error) {\n" - "\tstream, err := rpc.NewClientStream(ctx, c.cc, " - "\"/$Package$$Service$/$Method$\", opts...)\n" - "\tif err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn &$ServiceStruct$$Method$Client{stream}, nil\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Client interface {\n" - "\tSend(*$Request$) error\n" - "\tRecv() (*$Response$, error)\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Client struct {\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Client) Send(m *$Request$) error {\n" - "\treturn x.ClientStream.SendProto(m)\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Client) Recv() (*$Response$, error) " - "{\n" - "\tm := new($Response$)\n" - "\tif err := x.ClientStream.RecvProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn m, nil\n" - "}\n\n"); - } else if (ServerOnlyStreaming(method)) { - printer->Print( - *vars, - "func (c *$ServiceStruct$Client) $Method$(ctx context.Context, m " - "*$Request$, " - "opts ...rpc.CallOption) ($Service$_$Method$Client, error) {\n" - "\tstream, err := rpc.NewClientStream(ctx, c.cc, " - "\"/$Package$$Service$/$Method$\", opts...)\n" - "\tif err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\tx := &$ServiceStruct$$Method$Client{stream}\n" - "\tif err := x.ClientStream.SendProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\tif err := x.ClientStream.CloseSend(); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn x, nil\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Client interface {\n" - "\tRecv() (*$Response$, error)\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Client struct {\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Client) Recv() (*$Response$, error) " - "{\n" - "\tm := new($Response$)\n" - "\tif err := x.ClientStream.RecvProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn m, nil\n" - "}\n\n"); - } else if (ClientOnlyStreaming(method)) { - printer->Print( - *vars, - "func (c *$ServiceStruct$Client) $Method$(ctx context.Context, opts " - "...rpc.CallOption) ($Service$_$Method$Client, error) {\n" - "\tstream, err := rpc.NewClientStream(ctx, c.cc, " - "\"/$Package$$Service$/$Method$\", opts...)\n" - "\tif err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn &$ServiceStruct$$Method$Client{stream}, nil\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Client interface {\n" - "\tSend(*$Request$) error\n" - "\tCloseAndRecv() (*$Response$, error)\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Client struct {\n" - "\trpc.ClientStream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Client) Send(m *$Request$) error {\n" - "\treturn x.ClientStream.SendProto(m)\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Client) CloseAndRecv() (*$Response$, " - "error) {\n" - "\tif err := x.ClientStream.CloseSend(); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\tm := new($Response$)\n" - "\tif err := x.ClientStream.RecvProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\t// Read EOF.\n" - "\tif err := x.ClientStream.RecvProto(m); err == io.EOF {\n" - "\t\treturn m, io.EOF\n" - "\t}\n" - "\t// gRPC protocol violation.\n" - "\treturn m, fmt.Errorf(\"Violate gRPC client streaming protocol: no " - "EOF after the response.\")\n" - "}\n\n"); - } -} - -void PrintClient(google::protobuf::io::Printer* printer, - const google::protobuf::ServiceDescriptor* service, - map* vars) { - (*vars)["Service"] = service->name(); - (*vars)["ServiceStruct"] = LowerCaseService(service->name()); - printer->Print(*vars, "type $Service$Client interface {\n"); - for (int i = 0; i < service->method_count(); ++i) { - PrintClientMethodDef(printer, service->method(i), vars); - } - printer->Print("}\n\n"); - - printer->Print(*vars, - "type $ServiceStruct$Client struct {\n" - "\tcc *rpc.ClientConn\n" - "}\n\n"); - printer->Print(*vars, - "func New$Service$Client(cc *rpc.ClientConn) $Service$Client {\n" - "\treturn &$ServiceStruct$Client{cc}\n" - "}\n\n"); - for (int i = 0; i < service->method_count(); ++i) { - PrintClientMethodImpl(printer, service->method(i), vars); - } -} - -void PrintServerMethodDef(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - (*vars)["Request"] = method->input_type()->name(); - (*vars)["Response"] = method->output_type()->name(); - if (NoStreaming(method)) { - printer->Print(*vars, - "\t$Method$(context.Context, *$Request$) (*$Response$, error)\n"); - } else if (BidiStreaming(method)) { - printer->Print(*vars, - "\t$Method$($Service$_$Method$Server) error\n"); - } else if (ServerOnlyStreaming(method)) { - printer->Print(*vars, - "\t$Method$(*$Request$, $Service$_$Method$Server) error\n"); - } else if (ClientOnlyStreaming(method)) { - printer->Print(*vars, - "\t$Method$($Service$_$Method$Server) error\n"); - } -} - -void PrintServerHandler(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - (*vars)["Request"] = method->input_type()->name(); - (*vars)["Response"] = method->output_type()->name(); - if (NoStreaming(method)) { - printer->Print(*vars, - "func _$Service$_$Method$_Handler(srv interface{}, ctx context.Context," - " buf []byte) (proto.Message, error) {\n"); - printer->Print(*vars, - "\tin := new($Request$)\n"); - printer->Print("\tif err := proto.Unmarshal(buf, in); err != nil {\n"); - printer->Print("\t\treturn nil, err\n"); - printer->Print("\t}\n"); - printer->Print(*vars, - "\tout, err := srv.($Service$Server).$Method$(ctx, in)\n"); - printer->Print("\tif err != nil {\n"); - printer->Print("\t\treturn nil, err\n"); - printer->Print("\t}\n"); - printer->Print("\treturn out, nil\n"); - printer->Print("}\n\n"); - } else if (BidiStreaming(method)) { - printer->Print(*vars, - "func _$Service$_$Method$_Handler(srv interface{}, stream rpc.Stream) " - "error {\n" - "\treturn srv.($Service$Server).$Method$(&$ServiceStruct$$Method$Server" - "{stream})\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Server interface {\n" - "\tSend(*$Response$) error\n" - "\tRecv() (*$Request$, error)\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Server struct {\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Server) Send(m *$Response$) error {\n" - "\treturn x.Stream.SendProto(m)\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Server) Recv() (*$Request$, error) " - "{\n" - "\tm := new($Request$)\n" - "\tif err := x.Stream.RecvProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn m, nil\n" - "}\n\n"); - } else if (ServerOnlyStreaming(method)) { - printer->Print(*vars, - "func _$Service$_$Method$_Handler(srv interface{}, stream rpc.Stream) " - "error {\n" - "\tm := new($Request$)\n" - "\tif err := stream.RecvProto(m); err != nil {\n" - "\t\treturn err\n" - "\t}\n" - "\treturn srv.($Service$Server).$Method$(m, " - "&$ServiceStruct$$Method$Server{stream})\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Server interface {\n" - "\tSend(*$Response$) error\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Server struct {\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Server) Send(m *$Response$) error {\n" - "\treturn x.Stream.SendProto(m)\n" - "}\n\n"); - } else if (ClientOnlyStreaming(method)) { - printer->Print(*vars, - "func _$Service$_$Method$_Handler(srv interface{}, stream rpc.Stream) " - "error {\n" - "\treturn srv.($Service$Server).$Method$(&$ServiceStruct$$Method$Server" - "{stream})\n" - "}\n\n"); - printer->Print(*vars, - "type $Service$_$Method$Server interface {\n" - "\tSendAndClose(*$Response$) error\n" - "\tRecv() (*$Request$, error)\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "type $ServiceStruct$$Method$Server struct {\n" - "\trpc.Stream\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Server) SendAndClose(m *$Response$) " - "error {\n" - "\tif err := x.Stream.SendProto(m); err != nil {\n" - "\t\treturn err\n" - "\t}\n" - "\treturn nil\n" - "}\n\n"); - printer->Print(*vars, - "func (x *$ServiceStruct$$Method$Server) Recv() (*$Request$, error) {\n" - "\tm := new($Request$)\n" - "\tif err := x.Stream.RecvProto(m); err != nil {\n" - "\t\treturn nil, err\n" - "\t}\n" - "\treturn m, nil\n" - "}\n\n"); - } -} - -void PrintServerMethodDesc(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - printer->Print("\t\t{\n"); - printer->Print(*vars, - "\t\t\tMethodName:\t\"$Method$\",\n"); - printer->Print(*vars, - "\t\t\tHandler:\t_$Service$_$Method$_Handler,\n"); - printer->Print("\t\t},\n"); -} - -void PrintServerStreamingMethodDesc(google::protobuf::io::Printer* printer, - const google::protobuf::MethodDescriptor* method, - map* vars) { - (*vars)["Method"] = method->name(); - printer->Print("\t\t{\n"); - printer->Print(*vars, - "\t\t\tStreamName:\t\"$Method$\",\n"); - printer->Print(*vars, - "\t\t\tHandler:\t_$Service$_$Method$_Handler,\n"); - printer->Print("\t\t},\n"); -} - -void PrintServer(google::protobuf::io::Printer* printer, - const google::protobuf::ServiceDescriptor* service, - map* vars) { - (*vars)["Service"] = service->name(); - printer->Print(*vars, "type $Service$Server interface {\n"); - for (int i = 0; i < service->method_count(); ++i) { - PrintServerMethodDef(printer, service->method(i), vars); - } - printer->Print("}\n\n"); - - printer->Print(*vars, - "func RegisterService(s *rpc.Server, srv $Service$Server) {\n" - "\ts.RegisterService(&_$Service$_serviceDesc, srv)\n" - "}\n\n"); - - for (int i = 0; i < service->method_count(); ++i) { - PrintServerHandler(printer, service->method(i), vars); - } - - printer->Print(*vars, - "var _$Service$_serviceDesc = rpc.ServiceDesc{\n" - "\tServiceName: \"$Package$$Service$\",\n" - "\tHandlerType: (*$Service$Server)(nil),\n" - "\tMethods: []rpc.MethodDesc{\n"); - for (int i = 0; i < service->method_count(); ++i) { - if (NoStreaming(service->method(i))) { - PrintServerMethodDesc(printer, service->method(i), vars); - } - } - printer->Print("\t},\n"); - - printer->Print("\tStreams: []rpc.StreamDesc{\n"); - for (int i = 0; i < service->method_count(); ++i) { - if (!NoStreaming(service->method(i))) { - PrintServerStreamingMethodDesc(printer, service->method(i), vars); - } - } - printer->Print("\t},\n" - "}\n\n"); -} - -std::string BadToUnderscore(std::string str) { - for (unsigned i = 0; i < str.size(); ++i) { - if (!std::isalnum(str[i])) { - str[i] = '_'; - } - } - return str; -} - -string GetServices(const google::protobuf::FileDescriptor* file) { - string output; - google::protobuf::io::StringOutputStream output_stream(&output); - google::protobuf::io::Printer printer(&output_stream, '$'); - map vars; - - string package_name = !file->options().go_package().empty() - ? file->options().go_package() - : file->package(); - vars["PackageName"] = BadToUnderscore(package_name); - printer.Print(vars, "package $PackageName$\n\n"); - printer.Print("import (\n"); - if (HasClientOnlyStreaming(file)) { - printer.Print("\t\"fmt\"\n" - "\t\"io\"\n"); - } - printer.Print( - "\t\"google/net/grpc/go/rpc\"\n" - "\tcontext \"google/third_party/golang/go_net/context/context\"\n" - "\tproto \"google/net/proto2/go/proto\"\n" - ")\n\n"); - - // $Package$ is used to fully qualify method names. - vars["Package"] = file->package(); - if (!file->package().empty()) { - vars["Package"].append("."); - } - - for (int i = 0; i < file->service_count(); ++i) { - PrintClient(&printer, file->service(0), &vars); - printer.Print("\n"); - PrintServer(&printer, file->service(0), &vars); - printer.Print("\n"); - } - return output; -} - -} // namespace grpc_go_generator diff --git a/src/compiler/go_generator.h b/src/compiler/go_generator.h deleted file mode 100644 index fd5a05e5374..00000000000 --- a/src/compiler/go_generator.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright 2014, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef NET_GRPC_COMPILER_GO_GENERATOR_H_ -#define NET_GRPC_COMPILER_GO_GENERATOR_H_ - -#include - -namespace google { -namespace protobuf { -class FileDescriptor; -} // namespace protobuf -} // namespace google - -namespace grpc_go_generator { - -string GetServices(const google::protobuf::FileDescriptor* file); - -} // namespace grpc_go_generator - -#endif // NET_GRPC_COMPILER_GO_GENERATOR_H_ diff --git a/src/compiler/go_plugin.cc b/src/compiler/go_plugin.cc deleted file mode 100644 index f941840815e..00000000000 --- a/src/compiler/go_plugin.cc +++ /dev/null @@ -1,83 +0,0 @@ -/* - * - * Copyright 2014, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -// Generates go gRPC service interface out of Protobuf IDL. -// -// This is a Proto2 compiler plugin. See net/proto2/compiler/proto/plugin.proto -// and net/proto2/compiler/public/plugin.h for more information on plugins. - -#include -#include - -using namespace std; - -#include "src/compiler/go_generator.h" -#include -#include -#include -#include -#include - -class GoGrpcGenerator : public google::protobuf::compiler::CodeGenerator { - public: - GoGrpcGenerator() {} - virtual ~GoGrpcGenerator() {} - - virtual bool Generate(const google::protobuf::FileDescriptor* file, - const string& parameter, - google::protobuf::compiler::GeneratorContext* context, - string* error) const { - // Get output file name. - string file_name; - if (file->name().size() > 6 && - file->name().find_last_of(".proto") == file->name().size() - 1) { - file_name = file->name().substr(0, file->name().size() - 6) + - "_grpc.pb.go"; - } else { - *error = "Invalid proto file name. Proto file must end with .proto"; - return false; - } - - std::unique_ptr output( - context->Open(file_name)); - google::protobuf::io::CodedOutputStream coded_out(output.get()); - string code = grpc_go_generator::GetServices(file); - coded_out.WriteRaw(code.data(), code.size()); - return true; - } -}; - -int main(int argc, char* argv[]) { - GoGrpcGenerator generator; - return google::protobuf::compiler::PluginMain(argc, argv, &generator); -} From a1e8693578c5ce9e91a2daed033255ec8d16c742 Mon Sep 17 00:00:00 2001 From: David Klempner Date: Tue, 13 Jan 2015 18:13:59 -0800 Subject: [PATCH 04/26] Send a scheme of http or https as appropriate, rather than grpc. This requires additional logic to determine whether to send http or https. This change assumes a default of http, and plumbs down https through a synthesized channel arg when using the ssl transport. --- src/core/channel/http_client_filter.c | 17 ++++++++++++++++- src/core/security/security_context.c | 10 +++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/core/channel/http_client_filter.c b/src/core/channel/http_client_filter.c index 98e26aa563e..96fa3ecdf81 100644 --- a/src/core/channel/http_client_filter.c +++ b/src/core/channel/http_client_filter.c @@ -32,6 +32,7 @@ */ #include "src/core/channel/http_client_filter.h" +#include #include typedef struct call_data { int sent_headers; } call_data; @@ -130,6 +131,19 @@ static void destroy_call_elem(grpc_call_element *elem) { ignore_unused(channeld); } +static char *scheme_from_args(const grpc_channel_args *args) { + int i; + if (args != NULL) { + for (i = 0; i < args->num_args; ++i) { + if (args->args[i].type == GRPC_ARG_STRING && + strcmp(args->args[i].key, "grpc.scheme") == 0) { + return args->args[i].value.string; + } + } + } + return "http"; +} + /* Constructor for channel_data */ static void init_channel_elem(grpc_channel_element *elem, const grpc_channel_args *args, grpc_mdctx *mdctx, @@ -146,7 +160,8 @@ static void init_channel_elem(grpc_channel_element *elem, /* initialize members */ channeld->te_trailers = grpc_mdelem_from_strings(mdctx, "te", "trailers"); channeld->method = grpc_mdelem_from_strings(mdctx, ":method", "POST"); - channeld->scheme = grpc_mdelem_from_strings(mdctx, ":scheme", "grpc"); + channeld->scheme = + grpc_mdelem_from_strings(mdctx, ":scheme", scheme_from_args(args)); channeld->content_type = grpc_mdelem_from_strings(mdctx, "content-type", "application/grpc"); } diff --git a/src/core/security/security_context.c b/src/core/security/security_context.c index d519ecab87a..eeaf4947ed2 100644 --- a/src/core/security/security_context.c +++ b/src/core/security/security_context.c @@ -35,6 +35,7 @@ #include +#include "src/core/channel/channel_args.h" #include "src/core/security/credentials.h" #include "src/core/security/secure_endpoint.h" #include "src/core/surface/lame_client.h" @@ -444,6 +445,8 @@ grpc_channel *grpc_ssl_channel_create(grpc_credentials *ssl_creds, grpc_security_status status = GRPC_SECURITY_OK; size_t i = 0; const char *secure_peer_name = target; + grpc_arg arg; + grpc_channel_args *new_args; for (i = 0; args && i < args->num_args; i++) { grpc_arg *arg = &args->args[i]; @@ -459,8 +462,13 @@ grpc_channel *grpc_ssl_channel_create(grpc_credentials *ssl_creds, if (status != GRPC_SECURITY_OK) { return grpc_lame_client_channel_create(); } - channel = grpc_secure_channel_create_internal(target, args, ctx); + arg.type = GRPC_ARG_STRING; + arg.key = "grpc.scheme"; + arg.value.string = "https"; + new_args = grpc_channel_args_copy_and_add(args, &arg); + channel = grpc_secure_channel_create_internal(target, new_args, ctx); grpc_security_context_unref(&ctx->base); + grpc_channel_args_destroy(new_args); return channel; } From 6ba50fde9cafa22640ecac28c91d241a55c6dce9 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 13 Jan 2015 19:25:37 -0800 Subject: [PATCH 05/26] Fixing time.c for win32 - MIN_INT can't work with 0x80000000 under win32. --- src/core/support/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/support/time.c b/src/core/support/time.c index 0e88c65be0c..97243318fda 100644 --- a/src/core/support/time.c +++ b/src/core/support/time.c @@ -259,7 +259,7 @@ gpr_int32 gpr_time_to_millis(gpr_timespec t) { } else if (t.tv_sec <= -2147483) { /* TODO(ctiller): correct handling here (it's so far in the past do we care?) */ - return -2147483648; + return -2147483647; } else { return t.tv_sec * GPR_MS_PER_SEC + t.tv_nsec / GPR_NS_PER_MS; } From 848e74441e1cdfe027290e1daf286e243f4b22c1 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 13 Jan 2015 19:27:02 -0800 Subject: [PATCH 06/26] Fixing log_win32.c --- src/core/support/log_win32.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/support/log_win32.c b/src/core/support/log_win32.c index ae5f23a90dc..dc8c1d0785a 100644 --- a/src/core/support/log_win32.c +++ b/src/core/support/log_win32.c @@ -36,12 +36,13 @@ #ifdef GPR_WIN32 #include +#include #include #include void gpr_log(const char *file, int line, gpr_log_severity severity, - const char *message) { - const char *message = NULL; + const char *format, ...) { + char *message = NULL; va_list args; int ret; @@ -53,7 +54,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, message = NULL; } else { /* Allocate a new buffer, with space for the NUL terminator. */ - strp_buflen = (size_t)ret + 1; + size_t strp_buflen = (size_t)ret + 1; message = gpr_malloc(strp_buflen); /* Print to the buffer. */ @@ -73,7 +74,7 @@ void gpr_log(const char *file, int line, gpr_log_severity severity, /* Simple starter implementation */ void gpr_default_log(gpr_log_func_args *args) { - fprintf(stderr, "%s %s:%d: %s\n", gpr_log_severity_string(severity), + fprintf(stderr, "%s %s:%d: %s\n", gpr_log_severity_string(args->severity), args->file, args->line, args->message); } From 27be1a2d3ce0c7a955f494d08b0fd46f1cda303d Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 14 Jan 2015 04:48:42 +0100 Subject: [PATCH 07/26] Removing a few more traces of libevent. --- include/grpc/support/port_platform.h | 3 --- test/build/event2.c | 8 -------- tools/dockerfile/grpc_base/Dockerfile | 1 - 3 files changed, 12 deletions(-) delete mode 100644 test/build/event2.c diff --git a/include/grpc/support/port_platform.h b/include/grpc/support/port_platform.h index 9c999b9c811..2b99e630dd0 100644 --- a/include/grpc/support/port_platform.h +++ b/include/grpc/support/port_platform.h @@ -53,7 +53,6 @@ #define GPR_ARCH_32 1 #define GPR_CPU_LINUX 1 #define GPR_GCC_SYNC 1 -#define GPR_LIBEVENT 1 #define GPR_POSIX_MULTIPOLL_WITH_POLL 1 #define GPR_POSIX_SOCKET 1 #define GPR_POSIX_SOCKETADDR 1 @@ -64,7 +63,6 @@ #elif defined(__linux__) #define GPR_CPU_LINUX 1 #define GPR_GCC_ATOMIC 1 -#define GPR_LIBEVENT 1 #define GPR_LINUX 1 #define GPR_POSIX_MULTIPOLL_WITH_POLL 1 #define GPR_POSIX_SOCKET 1 @@ -80,7 +78,6 @@ #elif defined(__APPLE__) #define GPR_CPU_POSIX 1 #define GPR_GCC_ATOMIC 1 -#define GPR_LIBEVENT 1 #define GPR_POSIX_LOG 1 #define GPR_POSIX_MULTIPOLL_WITH_POLL 1 #define GPR_POSIX_SOCKET 1 diff --git a/test/build/event2.c b/test/build/event2.c deleted file mode 100644 index f632b1e43e6..00000000000 --- a/test/build/event2.c +++ /dev/null @@ -1,8 +0,0 @@ -/* This is only a compilation test, to see if we have libevent installed. */ - -#include - -int main() { - event_base_new(); - return 0; -} diff --git a/tools/dockerfile/grpc_base/Dockerfile b/tools/dockerfile/grpc_base/Dockerfile index 76e585a7d0d..45be1725935 100644 --- a/tools/dockerfile/grpc_base/Dockerfile +++ b/tools/dockerfile/grpc_base/Dockerfile @@ -13,7 +13,6 @@ RUN apt-get update && apt-get install -y \ libc6 \ libc6-dbg \ libc6-dev \ - libevent-dev \ libtool \ make \ strace \ From 80d68c09c4ca7769c6c667eefa22769f37fac76d Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 13 Jan 2015 20:14:43 -0800 Subject: [PATCH 08/26] Fixing test_config.c Now all the gpr tests build and run under win32. --- include/grpc/support/port_platform.h | 5 +++++ .../vs2013/build_and_run_tests.bat.template | 2 +- test/core/util/test_config.c | 16 +++++++++++++++- vsprojects/vs2013/build_and_run_tests.bat | 2 +- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/include/grpc/support/port_platform.h b/include/grpc/support/port_platform.h index 9c999b9c811..9100f6e513c 100644 --- a/include/grpc/support/port_platform.h +++ b/include/grpc/support/port_platform.h @@ -45,9 +45,11 @@ #if defined(_WIN64) || defined(WIN64) #define GPR_WIN32 1 #define GPR_ARCH_64 1 +#define GPR_GETPID_IN_PROCESS_H 1 #elif defined(_WIN32) || defined(WIN32) #define GPR_ARCH_32 1 #define GPR_WIN32 1 +#define GPR_GETPID_IN_PROCESS_H 1 #elif defined(ANDROID) || defined(__ANDROID__) #define GPR_ANDROID 1 #define GPR_ARCH_32 1 @@ -61,6 +63,7 @@ #define GPR_POSIX_STRING 1 #define GPR_POSIX_SYNC 1 #define GPR_POSIX_TIME 1 +#define GPR_GETPID_IN_UNISTD_H 1 #elif defined(__linux__) #define GPR_CPU_LINUX 1 #define GPR_GCC_ATOMIC 1 @@ -72,6 +75,7 @@ #define GPR_POSIX_STRING 1 #define GPR_POSIX_SYNC 1 #define GPR_POSIX_TIME 1 +#define GPR_GETPID_IN_UNISTD_H 1 #ifdef _LP64 #define GPR_ARCH_64 1 #else /* _LP64 */ @@ -89,6 +93,7 @@ #define GPR_POSIX_STRING 1 #define GPR_POSIX_SYNC 1 #define GPR_POSIX_TIME 1 +#define GPR_GETPID_IN_UNISTD_H 1 #ifdef _LP64 #define GPR_ARCH_64 1 #else /* _LP64 */ diff --git a/templates/vsprojects/vs2013/build_and_run_tests.bat.template b/templates/vsprojects/vs2013/build_and_run_tests.bat.template index 8679bee3fc3..4a15e01c522 100644 --- a/templates/vsprojects/vs2013/build_and_run_tests.bat.template +++ b/templates/vsprojects/vs2013/build_and_run_tests.bat.template @@ -13,7 +13,7 @@ @rem Build the library dependencies first MSBuild.exe gpr.vcxproj /p:Configuration=Debug -MSBuild.exe grpc_test_util.vcxproj /p:Configuration=Debug +MSBuild.exe gpr_test_util.vcxproj /p:Configuration=Debug mkdir ${test_bin_dir} diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index fc5de9bbefb..ab2c0d80a99 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -33,11 +33,25 @@ #include "test/core/util/test_config.h" +#include #include + +#if GPR_GETPID_IN_UNISTD_H #include +static int seed() { + return getpid(); +} +#endif + +#if GPR_GETPID_IN_PROCESS_H +#include +static int seed(void) { + return _getpid(); +} +#endif void grpc_test_init(int argc, char **argv) { /* seed rng with pid, so we don't end up with the same random numbers as a concurrently running test binary */ - srand(getpid()); + srand(seed()); } diff --git a/vsprojects/vs2013/build_and_run_tests.bat b/vsprojects/vs2013/build_and_run_tests.bat index 06e9776d862..3e36dcf6002 100644 --- a/vsprojects/vs2013/build_and_run_tests.bat +++ b/vsprojects/vs2013/build_and_run_tests.bat @@ -5,7 +5,7 @@ @rem Build the library dependencies first MSBuild.exe gpr.vcxproj /p:Configuration=Debug -MSBuild.exe grpc_test_util.vcxproj /p:Configuration=Debug +MSBuild.exe gpr_test_util.vcxproj /p:Configuration=Debug mkdir test_bin From 2d8f790ebccf50e05b2988a2c2113b4701a5e902 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 13 Jan 2015 21:35:30 -0800 Subject: [PATCH 09/26] Format change --- src/core/support/log_posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/support/log_posix.c b/src/core/support/log_posix.c index 83d1c1386ae..55a38b136d0 100644 --- a/src/core/support/log_posix.c +++ b/src/core/support/log_posix.c @@ -51,7 +51,7 @@ #include #include -static long gettid() { return (long)(gpr_intptr)pthread_self(); } +static gpr_intptr gettid() { return (gpr_intptr)pthread_self(); } void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format, ...) { @@ -97,7 +97,7 @@ void gpr_default_log(gpr_log_func_args *args) { strcpy(time_buffer, "error:strftime"); } - fprintf(stderr, "%s%s.%09d %7ld %s:%d] %s\n", + fprintf(stderr, "%s%s.%09d %7tu %s:%d] %s\n", gpr_log_severity_string(args->severity), time_buffer, (int)(now.tv_nsec), gettid(), display_file, args->line, args->message); From 944596771c293db7152a1c633fd20fe1393cacea Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Wed, 14 Jan 2015 10:14:56 -0800 Subject: [PATCH 10/26] Adds the service client code generated from the pubsub proto --- src/ruby/bin/google/pubsub/v2/pubsub.rb | 144 ++++++++++++++++++ .../bin/google/pubsub/v2/pubsub_services.rb | 73 +++++++++ 2 files changed, 217 insertions(+) create mode 100644 src/ruby/bin/google/pubsub/v2/pubsub.rb create mode 100644 src/ruby/bin/google/pubsub/v2/pubsub_services.rb diff --git a/src/ruby/bin/google/pubsub/v2/pubsub.rb b/src/ruby/bin/google/pubsub/v2/pubsub.rb new file mode 100644 index 00000000000..28b7143b662 --- /dev/null +++ b/src/ruby/bin/google/pubsub/v2/pubsub.rb @@ -0,0 +1,144 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/pubsub/v2/pubsub.proto + +require 'google/protobuf' + +require 'google/protobuf/empty' +Google::Protobuf::DescriptorPool.generated_pool.build do + add_message "google.pubsub.v2.Topic" do + optional :name, :string, 1 + optional :garbage_collect_seconds, :int64, 2 + end + add_message "google.pubsub.v2.PubsubMessage" do + optional :data, :string, 1 + repeated :labels, :message, 2, "google.pubsub.v2.PubsubMessage.LabelsEntry" + optional :message_id, :string, 3 + optional :data_truncated, :bool, 4 + end + add_message "google.pubsub.v2.PubsubMessage.LabelsEntry" do + optional :key, :string, 1 + optional :value, :string, 2 + end + add_message "google.pubsub.v2.GetTopicRequest" do + optional :topic, :string, 1 + end + add_message "google.pubsub.v2.PublishRequest" do + optional :topic, :string, 1 + repeated :messages, :message, 2, "google.pubsub.v2.PubsubMessage" + end + add_message "google.pubsub.v2.PublishResponse" do + repeated :message_ids, :string, 1 + end + add_message "google.pubsub.v2.ListTopicsRequest" do + optional :query, :string, 1 + optional :max_results, :int32, 2 + optional :page_token, :string, 3 + end + add_message "google.pubsub.v2.ListTopicsResponse" do + repeated :topics, :message, 1, "google.pubsub.v2.Topic" + optional :next_page_token, :string, 2 + end + add_message "google.pubsub.v2.DeleteTopicRequest" do + optional :topic, :string, 1 + end + add_message "google.pubsub.v2.Subscription" do + optional :name, :string, 1 + optional :topic, :string, 2 + optional :query, :string, 3 + optional :truncation_policy, :message, 4, "google.pubsub.v2.Subscription.TruncationPolicy" + optional :push_config, :message, 5, "google.pubsub.v2.PushConfig" + optional :ack_deadline_seconds, :int32, 6 + optional :garbage_collect_seconds, :int64, 7 + end + add_message "google.pubsub.v2.Subscription.TruncationPolicy" do + optional :max_bytes, :int64, 1 + optional :max_age_seconds, :int64, 2 + end + add_message "google.pubsub.v2.PushConfig" do + optional :push_endpoint, :string, 1 + end + add_message "google.pubsub.v2.PubsubEvent" do + optional :subscription, :string, 1 + optional :ack_id, :string, 5 + optional :message, :message, 2, "google.pubsub.v2.PubsubMessage" + optional :truncated, :bool, 3 + optional :end_of_stream, :bool, 4 + end + add_message "google.pubsub.v2.GetSubscriptionRequest" do + optional :subscription, :string, 1 + end + add_message "google.pubsub.v2.ListSubscriptionsRequest" do + optional :query, :string, 1 + optional :max_results, :int32, 3 + optional :page_token, :string, 4 + end + add_message "google.pubsub.v2.ListSubscriptionsResponse" do + repeated :subscriptions, :message, 1, "google.pubsub.v2.Subscription" + optional :next_page_token, :string, 2 + end + add_message "google.pubsub.v2.TruncateSubscriptionRequest" do + optional :subscription, :string, 1 + end + add_message "google.pubsub.v2.DetachSubscriptionRequest" do + optional :subscription, :string, 1 + end + add_message "google.pubsub.v2.DeleteSubscriptionRequest" do + optional :subscription, :string, 1 + end + add_message "google.pubsub.v2.ModifyPushConfigRequest" do + optional :subscription, :string, 1 + optional :push_config, :message, 2, "google.pubsub.v2.PushConfig" + end + add_message "google.pubsub.v2.PullRequest" do + optional :subscription, :string, 1 + optional :return_immediately, :bool, 2 + optional :max_events, :int32, 3 + end + add_message "google.pubsub.v2.PullResponse" do + repeated :pubsub_events, :message, 1, "google.pubsub.v2.PubsubEvent" + end + add_message "google.pubsub.v2.ModifyAckDeadlineRequest" do + optional :subscription, :string, 1 + optional :ack_id, :string, 2 + optional :ack_deadline_seconds, :int32, 3 + end + add_message "google.pubsub.v2.AcknowledgeRequest" do + optional :subscription, :string, 1 + repeated :ack_ids, :string, 2 + end + add_message "google.pubsub.v2.HandlePubsubEventResponse" do + optional :acknowledge_explicitly, :bool, 1 + end +end + +module Google + module Pubsub + module V2 + Topic = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.Topic").msgclass + PubsubMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PubsubMessage").msgclass + PubsubMessage::LabelsEntry = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PubsubMessage.LabelsEntry").msgclass + GetTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.GetTopicRequest").msgclass + PublishRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PublishRequest").msgclass + PublishResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PublishResponse").msgclass + ListTopicsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ListTopicsRequest").msgclass + ListTopicsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ListTopicsResponse").msgclass + DeleteTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.DeleteTopicRequest").msgclass + Subscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.Subscription").msgclass + Subscription::TruncationPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.Subscription.TruncationPolicy").msgclass + PushConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PushConfig").msgclass + PubsubEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PubsubEvent").msgclass + GetSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.GetSubscriptionRequest").msgclass + ListSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ListSubscriptionsRequest").msgclass + ListSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ListSubscriptionsResponse").msgclass + TruncateSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.TruncateSubscriptionRequest").msgclass + DetachSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.DetachSubscriptionRequest").msgclass + DeleteSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.DeleteSubscriptionRequest").msgclass + ModifyPushConfigRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ModifyPushConfigRequest").msgclass + PullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PullRequest").msgclass + PullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PullResponse").msgclass + ModifyAckDeadlineRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ModifyAckDeadlineRequest").msgclass + AcknowledgeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.AcknowledgeRequest").msgclass + HandlePubsubEventResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.HandlePubsubEventResponse").msgclass + end + end +end diff --git a/src/ruby/bin/google/pubsub/v2/pubsub_services.rb b/src/ruby/bin/google/pubsub/v2/pubsub_services.rb new file mode 100644 index 00000000000..475332a04b2 --- /dev/null +++ b/src/ruby/bin/google/pubsub/v2/pubsub_services.rb @@ -0,0 +1,73 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/pubsub/v2/pubsub.proto for package 'google.pubsub.v2' + +require 'grpc' +require 'google/pubsub/v2/pubsub' + +module Google + module Pubsub + module V2 + module PublisherService + + # TODO: add proto service documentation here + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.pubsub.v2.PublisherService' + + rpc :CreateTopic, Topic, Topic + rpc :Publish, PublishRequest, PublishResponse + rpc :GetTopic, GetTopicRequest, Topic + rpc :ListTopics, ListTopicsRequest, ListTopicsResponse + rpc :DeleteTopic, DeleteTopicRequest, Empty + end + + Stub = Service.rpc_stub_class + end + module SubscriberService + + # TODO: add proto service documentation here + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.pubsub.v2.SubscriberService' + + rpc :CreateSubscription, Subscription, Subscription + rpc :GetSubscription, GetSubscriptionRequest, Subscription + rpc :ListSubscriptions, ListSubscriptionsRequest, ListSubscriptionsResponse + rpc :DeleteSubscription, DeleteSubscriptionRequest, Empty + rpc :TruncateSubscription, TruncateSubscriptionRequest, Empty + rpc :DetachSubscription, DetachSubscriptionRequest, Empty + rpc :ModifyAckDeadline, ModifyAckDeadlineRequest, Empty + rpc :Acknowledge, AcknowledgeRequest, Empty + rpc :Pull, PullRequest, PullResponse + rpc :ModifyPushConfig, ModifyPushConfigRequest, Empty + end + + Stub = Service.rpc_stub_class + end + module PushEndpointService + + # TODO: add proto service documentation here + class Service + + include GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.pubsub.v2.PushEndpointService' + + rpc :HandlePubsubEvent, PubsubEvent, HandlePubsubEventResponse + end + + Stub = Service.rpc_stub_class + end + end + end +end From e1e2475b6938eca4378d2bc6632db31c7dfa2b02 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 13 Jan 2015 17:26:27 -0800 Subject: [PATCH 11/26] Unify signal handling in C --- test/core/iomgr/tcp_posix_test.c | 3 --- test/core/transport/chttp2_transport_end2end_test.c | 3 --- test/core/util/test_config.c | 3 +++ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 7fd2567cec5..6af3ded98b0 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -491,8 +490,6 @@ static grpc_endpoint_test_config configs[] = { int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_iomgr_init(); - /* disable SIGPIPE */ - signal(SIGPIPE, SIG_IGN); run_tests(); grpc_endpoint_tests(configs[0]); grpc_iomgr_shutdown(); diff --git a/test/core/transport/chttp2_transport_end2end_test.c b/test/core/transport/chttp2_transport_end2end_test.c index 30d2a174401..8b0f9aa25b5 100644 --- a/test/core/transport/chttp2_transport_end2end_test.c +++ b/test/core/transport/chttp2_transport_end2end_test.c @@ -107,9 +107,6 @@ grpc_transport_test_config fixture_configs[] = { int main(int argc, char **argv) { size_t i; - /* disable SIGPIPE */ - signal(SIGPIPE, SIG_IGN); - grpc_test_init(argc, argv); grpc_iomgr_init(); diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index ab2c0d80a99..94245d85bcc 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -35,6 +35,7 @@ #include #include +#include #if GPR_GETPID_IN_UNISTD_H #include @@ -51,6 +52,8 @@ static int seed(void) { #endif void grpc_test_init(int argc, char **argv) { + /* disable SIGPIPE */ + signal(SIGPIPE, SIG_IGN); /* seed rng with pid, so we don't end up with the same random numbers as a concurrently running test binary */ srand(seed()); From 14e60e9f8b147d873b6320e24c100a8dbb087418 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 13 Jan 2015 17:26:46 -0800 Subject: [PATCH 12/26] Use C signal handling in C++ end2end --- test/cpp/end2end/end2end_test.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index e01a6efe82a..3a1da68e47f 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -34,6 +34,7 @@ #include #include +#include "test/core/util/test_config.h" #include "test/cpp/util/echo_duplicate.pb.h" #include "test/cpp/util/echo.pb.h" #include "src/cpp/util/time.h" @@ -435,6 +436,7 @@ TEST_F(End2endTest, BadCredentials) { } // namespace grpc int main(int argc, char** argv) { + grpc_test_init(argc, argv); grpc_init(); ::testing::InitGoogleTest(&argc, argv); int result = RUN_ALL_TESTS(); From be56a9684e3f192b4386d471655b157ea462ae64 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 14 Jan 2015 11:33:03 -0800 Subject: [PATCH 13/26] Build all targets for a config at once --- tools/run_tests/run_tests.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index bb25b38e570..84193a1337c 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -75,10 +75,8 @@ def _build_and_run(check_cancelled): if not jobset.run( (['make', '-j', '%d' % (multiprocessing.cpu_count() + 1), - target, - 'CONFIG=%s' % cfg] - for cfg in build_configs - for target in _MAKE_TEST_TARGETS), + 'CONFIG=%s' % cfg] + _MAKE_TEST_TARGETS + for cfg in build_configs), check_cancelled, maxjobs=1): sys.exit(1) From 1ff11f6d044bdaf46f822ce3ad8fee2980496b70 Mon Sep 17 00:00:00 2001 From: Yang Gao Date: Wed, 14 Jan 2015 11:45:32 -0800 Subject: [PATCH 14/26] Add a space in front of template argument list. Changing possible <:: to < :: --- src/compiler/cpp_generator.cc | 56 +++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index 11160498068..41adb81c6b7 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -143,16 +143,16 @@ void PrintHeaderClientMethod(google::protobuf::io::Printer* printer, } else if (ClientOnlyStreaming(method)) { printer->Print( *vars, - "::grpc::ClientWriter<$Request$>* $Method$(" + "::grpc::ClientWriter< $Request$>* $Method$(" "::grpc::ClientContext* context, $Response$* response);\n\n"); } else if (ServerOnlyStreaming(method)) { printer->Print( *vars, - "::grpc::ClientReader<$Response$>* $Method$(" + "::grpc::ClientReader< $Response$>* $Method$(" "::grpc::ClientContext* context, const $Request$* request);\n\n"); } else if (BidiStreaming(method)) { printer->Print(*vars, - "::grpc::ClientReaderWriter<$Request$, $Response$>* " + "::grpc::ClientReaderWriter< $Request$, $Response$>* " "$Method$(::grpc::ClientContext* context);\n\n"); } } @@ -174,18 +174,18 @@ void PrintHeaderServerMethod(google::protobuf::io::Printer* printer, printer->Print(*vars, "virtual ::grpc::Status $Method$(" "::grpc::ServerContext* context, " - "::grpc::ServerReader<$Request$>* reader, " + "::grpc::ServerReader< $Request$>* reader, " "$Response$* response);\n"); } else if (ServerOnlyStreaming(method)) { printer->Print(*vars, "virtual ::grpc::Status $Method$(" "::grpc::ServerContext* context, const $Request$* request, " - "::grpc::ServerWriter<$Response$>* writer);\n"); + "::grpc::ServerWriter< $Response$>* writer);\n"); } else if (BidiStreaming(method)) { printer->Print(*vars, "virtual ::grpc::Status $Method$(" "::grpc::ServerContext* context, " - "::grpc::ServerReaderWriter<$Response$, $Request$>* stream);" + "::grpc::ServerReaderWriter< $Response$, $Request$>* stream);" "\n"); } } @@ -211,7 +211,7 @@ void PrintHeaderService(google::protobuf::io::Printer* printer, printer->Outdent(); printer->Print("};\n"); printer->Print( - "static Stub* NewStub(const std::shared_ptr<::grpc::ChannelInterface>& " + "static Stub* NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& " "channel);\n"); printer->Print("\n"); @@ -270,10 +270,10 @@ void PrintSourceClientMethod(google::protobuf::io::Printer* printer, "}\n\n"); } else if (ClientOnlyStreaming(method)) { printer->Print(*vars, - "::grpc::ClientWriter<$Request$>* $Service$::Stub::$Method$(" + "::grpc::ClientWriter< $Request$>* $Service$::Stub::$Method$(" "::grpc::ClientContext* context, $Response$* response) {\n"); printer->Print(*vars, - " return new ::grpc::ClientWriter<$Request$>(" + " return new ::grpc::ClientWriter< $Request$>(" "channel()->CreateStream(" "::grpc::RpcMethod(\"/$Package$$Service$/$Method$\", " "::grpc::RpcMethod::RpcType::CLIENT_STREAMING), " @@ -282,10 +282,10 @@ void PrintSourceClientMethod(google::protobuf::io::Printer* printer, } else if (ServerOnlyStreaming(method)) { printer->Print( *vars, - "::grpc::ClientReader<$Response$>* $Service$::Stub::$Method$(" + "::grpc::ClientReader< $Response$>* $Service$::Stub::$Method$(" "::grpc::ClientContext* context, const $Request$* request) {\n"); printer->Print(*vars, - " return new ::grpc::ClientReader<$Response$>(" + " return new ::grpc::ClientReader< $Response$>(" "channel()->CreateStream(" "::grpc::RpcMethod(\"/$Package$$Service$/$Method$\", " "::grpc::RpcMethod::RpcType::SERVER_STREAMING), " @@ -294,11 +294,11 @@ void PrintSourceClientMethod(google::protobuf::io::Printer* printer, } else if (BidiStreaming(method)) { printer->Print( *vars, - "::grpc::ClientReaderWriter<$Request$, $Response$>* " + "::grpc::ClientReaderWriter< $Request$, $Response$>* " "$Service$::Stub::$Method$(::grpc::ClientContext* context) {\n"); printer->Print( *vars, - " return new ::grpc::ClientReaderWriter<$Request$, $Response$>(" + " return new ::grpc::ClientReaderWriter< $Request$, $Response$>(" "channel()->CreateStream(" "::grpc::RpcMethod(\"/$Package$$Service$/$Method$\", " "::grpc::RpcMethod::RpcType::BIDI_STREAMING), " @@ -328,7 +328,7 @@ void PrintSourceServerMethod(google::protobuf::io::Printer* printer, printer->Print(*vars, "::grpc::Status $Service$::Service::$Method$(" "::grpc::ServerContext* context, " - "::grpc::ServerReader<$Request$>* reader, " + "::grpc::ServerReader< $Request$>* reader, " "$Response$* response) {\n"); printer->Print( " return ::grpc::Status(" @@ -339,7 +339,7 @@ void PrintSourceServerMethod(google::protobuf::io::Printer* printer, "::grpc::Status $Service$::Service::$Method$(" "::grpc::ServerContext* context, " "const $Request$* request, " - "::grpc::ServerWriter<$Response$>* writer) {\n"); + "::grpc::ServerWriter< $Response$>* writer) {\n"); printer->Print( " return ::grpc::Status(" "::grpc::StatusCode::UNIMPLEMENTED);\n"); @@ -348,7 +348,7 @@ void PrintSourceServerMethod(google::protobuf::io::Printer* printer, printer->Print(*vars, "::grpc::Status $Service$::Service::$Method$(" "::grpc::ServerContext* context, " - "::grpc::ServerReaderWriter<$Response$, $Request$>* " + "::grpc::ServerReaderWriter< $Response$, $Request$>* " "stream) {\n"); printer->Print( " return ::grpc::Status(" @@ -363,7 +363,7 @@ void PrintSourceService(google::protobuf::io::Printer* printer, (*vars)["Service"] = service->name(); printer->Print(*vars, "$Service$::Stub* $Service$::NewStub(" - "const std::shared_ptr<::grpc::ChannelInterface>& channel) {\n" + "const std::shared_ptr< ::grpc::ChannelInterface>& channel) {\n" " $Service$::Stub* stub = new $Service$::Stub();\n" " stub->set_channel(channel);\n" " return stub;\n" @@ -400,9 +400,9 @@ void PrintSourceService(google::protobuf::io::Printer* printer, "service_->AddMethod(new ::grpc::RpcServiceMethod(\n" " \"/$Package$$Service$/$Method$\",\n" " ::grpc::RpcMethod::NORMAL_RPC,\n" - " new ::grpc::RpcMethodHandler<$Service$::Service, $Request$, " + " new ::grpc::RpcMethodHandler< $Service$::Service, $Request$, " "$Response$>(\n" - " std::function<::grpc::Status($Service$::Service*, " + " std::function< ::grpc::Status($Service$::Service*, " "::grpc::ServerContext*, const $Request$*, $Response$*)>(" "&$Service$::Service::$Method$), this),\n" " new $Request$, new $Response$));\n"); @@ -412,11 +412,11 @@ void PrintSourceService(google::protobuf::io::Printer* printer, "service_->AddMethod(new ::grpc::RpcServiceMethod(\n" " \"/$Package$$Service$/$Method$\",\n" " ::grpc::RpcMethod::CLIENT_STREAMING,\n" - " new ::grpc::ClientStreamingHandler<" + " new ::grpc::ClientStreamingHandler< " "$Service$::Service, $Request$, $Response$>(\n" - " std::function<::grpc::Status($Service$::Service*, " + " std::function< ::grpc::Status($Service$::Service*, " "::grpc::ServerContext*, " - "::grpc::ServerReader<$Request$>*, $Response$*)>(" + "::grpc::ServerReader< $Request$>*, $Response$*)>(" "&$Service$::Service::$Method$), this),\n" " new $Request$, new $Response$));\n"); } else if (ServerOnlyStreaming(method)) { @@ -425,11 +425,11 @@ void PrintSourceService(google::protobuf::io::Printer* printer, "service_->AddMethod(new ::grpc::RpcServiceMethod(\n" " \"/$Package$$Service$/$Method$\",\n" " ::grpc::RpcMethod::SERVER_STREAMING,\n" - " new ::grpc::ServerStreamingHandler<" + " new ::grpc::ServerStreamingHandler< " "$Service$::Service, $Request$, $Response$>(\n" - " std::function<::grpc::Status($Service$::Service*, " + " std::function< ::grpc::Status($Service$::Service*, " "::grpc::ServerContext*, " - "const $Request$*, ::grpc::ServerWriter<$Response$>*)>(" + "const $Request$*, ::grpc::ServerWriter< $Response$>*)>(" "&$Service$::Service::$Method$), this),\n" " new $Request$, new $Response$));\n"); } else if (BidiStreaming(method)) { @@ -438,11 +438,11 @@ void PrintSourceService(google::protobuf::io::Printer* printer, "service_->AddMethod(new ::grpc::RpcServiceMethod(\n" " \"/$Package$$Service$/$Method$\",\n" " ::grpc::RpcMethod::BIDI_STREAMING,\n" - " new ::grpc::BidiStreamingHandler<" + " new ::grpc::BidiStreamingHandler< " "$Service$::Service, $Request$, $Response$>(\n" - " std::function<::grpc::Status($Service$::Service*, " + " std::function< ::grpc::Status($Service$::Service*, " "::grpc::ServerContext*, " - "::grpc::ServerReaderWriter<$Response$, $Request$>*)>(" + "::grpc::ServerReaderWriter< $Response$, $Request$>*)>(" "&$Service$::Service::$Method$), this),\n" " new $Request$, new $Response$));\n"); } From 5680ff4687deaafc84a96d8f7c50f503c2581e71 Mon Sep 17 00:00:00 2001 From: Yang Gao Date: Wed, 14 Jan 2015 12:14:21 -0800 Subject: [PATCH 15/26] Run clang-format-all.sh --- src/compiler/cpp_generator.cc | 33 ++++++++++++++++++--------------- src/core/support/log_posix.c | 1 - test/core/util/test_config.c | 8 ++------ 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index 41adb81c6b7..94e56d73a6e 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -182,11 +182,12 @@ void PrintHeaderServerMethod(google::protobuf::io::Printer* printer, "::grpc::ServerContext* context, const $Request$* request, " "::grpc::ServerWriter< $Response$>* writer);\n"); } else if (BidiStreaming(method)) { - printer->Print(*vars, - "virtual ::grpc::Status $Method$(" - "::grpc::ServerContext* context, " - "::grpc::ServerReaderWriter< $Response$, $Request$>* stream);" - "\n"); + printer->Print( + *vars, + "virtual ::grpc::Status $Method$(" + "::grpc::ServerContext* context, " + "::grpc::ServerReaderWriter< $Response$, $Request$>* stream);" + "\n"); } } @@ -269,9 +270,10 @@ void PrintSourceClientMethod(google::protobuf::io::Printer* printer, "context, request, response);\n" "}\n\n"); } else if (ClientOnlyStreaming(method)) { - printer->Print(*vars, - "::grpc::ClientWriter< $Request$>* $Service$::Stub::$Method$(" - "::grpc::ClientContext* context, $Response$* response) {\n"); + printer->Print( + *vars, + "::grpc::ClientWriter< $Request$>* $Service$::Stub::$Method$(" + "::grpc::ClientContext* context, $Response$* response) {\n"); printer->Print(*vars, " return new ::grpc::ClientWriter< $Request$>(" "channel()->CreateStream(" @@ -361,13 +363,14 @@ void PrintSourceService(google::protobuf::io::Printer* printer, const google::protobuf::ServiceDescriptor* service, map* vars) { (*vars)["Service"] = service->name(); - printer->Print(*vars, - "$Service$::Stub* $Service$::NewStub(" - "const std::shared_ptr< ::grpc::ChannelInterface>& channel) {\n" - " $Service$::Stub* stub = new $Service$::Stub();\n" - " stub->set_channel(channel);\n" - " return stub;\n" - "};\n\n"); + printer->Print( + *vars, + "$Service$::Stub* $Service$::NewStub(" + "const std::shared_ptr< ::grpc::ChannelInterface>& channel) {\n" + " $Service$::Stub* stub = new $Service$::Stub();\n" + " stub->set_channel(channel);\n" + " return stub;\n" + "};\n\n"); for (int i = 0; i < service->method_count(); ++i) { PrintSourceClientMethod(printer, service->method(i), vars); } diff --git a/src/core/support/log_posix.c b/src/core/support/log_posix.c index 55a38b136d0..ee2705a2c20 100644 --- a/src/core/support/log_posix.c +++ b/src/core/support/log_posix.c @@ -31,7 +31,6 @@ * */ - #ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112L #endif diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 94245d85bcc..44ab35fc5e4 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -39,16 +39,12 @@ #if GPR_GETPID_IN_UNISTD_H #include -static int seed() { - return getpid(); -} +static int seed() { return getpid(); } #endif #if GPR_GETPID_IN_PROCESS_H #include -static int seed(void) { - return _getpid(); -} +static int seed(void) { return _getpid(); } #endif void grpc_test_init(int argc, char **argv) { From d86a394ce26407be1f20e467e746348e955e9de4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 14 Jan 2015 12:48:54 -0800 Subject: [PATCH 16/26] Fix return behavior of run_tools.py If not running in forever mode, and a test fails, fail run_tests.py also. If running in forever mode and make fails, wait for the next run. --- tools/run_tests/run_tests.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index bb25b38e570..b4d426f8dee 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -80,17 +80,20 @@ def _build_and_run(check_cancelled): for cfg in build_configs for target in _MAKE_TEST_TARGETS), check_cancelled, maxjobs=1): - sys.exit(1) + return 1 # run all the tests - jobset.run(( + if not jobset.run(( config.run_command(x) for config in run_configs for filt in filters for x in itertools.chain.from_iterable(itertools.repeat( glob.glob('bins/%s/%s_test' % ( config.build_config, filt)), - runs_per_test))), check_cancelled) + runs_per_test))), check_cancelled): + return 2 + + return 0 if forever: @@ -102,5 +105,5 @@ if forever: while not have_files_changed(): time.sleep(1) else: - _build_and_run(lambda: False) + sys.exit(_build_and_run(lambda: False)) From 4de9b7d4a3d1a497c521d47ecb0d05542ec97457 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 13 Jan 2015 17:45:03 -0800 Subject: [PATCH 17/26] Use the first received status as authoritative. So that later cancellations do not clobber status. --- src/core/surface/call.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 4ea8378d969..44ccfd11a76 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -178,6 +178,7 @@ struct grpc_call { gpr_uint8 received_metadata; gpr_uint8 have_read; gpr_uint8 have_alarm; + gpr_uint8 got_status_code; /* The current outstanding read message tag (only valid if have_read == 1) */ void *read_tag; void *metadata_tag; @@ -225,6 +226,7 @@ grpc_call *grpc_call_create(grpc_channel *channel, call->have_write = 0; call->have_alarm = 0; call->received_metadata = 0; + call->got_status_code = 0; call->status_code = server_transport_data != NULL ? GRPC_STATUS_OK : GRPC_STATUS_UNKNOWN; call->status_details = NULL; @@ -799,15 +801,18 @@ void grpc_call_recv_metadata(grpc_call_element *elem, grpc_call_op *op) { grpc_call *call = CALL_FROM_TOP_ELEM(elem); grpc_mdelem *md = op->data.metadata; grpc_mdstr *key = md->key; + gpr_log(GPR_DEBUG, "call %p got metadata %s %s", call, grpc_mdstr_as_c_string(md->key), grpc_mdstr_as_c_string(md->value)); if (key == grpc_channel_get_status_string(call->channel)) { - call->status_code = decode_status(md); + if (!call->got_status_code) { + call->status_code = decode_status(md); + call->got_status_code = 1; + } grpc_mdelem_unref(md); op->done_cb(op->user_data, GRPC_OP_OK); } else if (key == grpc_channel_get_message_string(call->channel)) { - if (call->status_details) { - grpc_mdstr_unref(call->status_details); + if (!call->status_details) { + call->status_details = grpc_mdstr_ref(md->value); } - call->status_details = grpc_mdstr_ref(md->value); grpc_mdelem_unref(md); op->done_cb(op->user_data, GRPC_OP_OK); } else { From d248c245463b7b2de1a4007b8029b076f05fe88c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 14 Jan 2015 11:49:12 -0800 Subject: [PATCH 18/26] Update C++ code to set status via the C api. This prevents mismatches from breaking tests. --- include/grpc++/stream.h | 6 ++-- include/grpc++/stream_context_interface.h | 2 +- include/grpc/grpc.h | 8 +++++ src/core/surface/call.c | 33 +++++++++++++++----- src/cpp/stream/stream_context.cc | 38 ++++++++--------------- src/cpp/stream/stream_context.h | 4 +-- third_party/libevent | 1 + 7 files changed, 54 insertions(+), 38 deletions(-) create mode 160000 third_party/libevent diff --git a/include/grpc++/stream.h b/include/grpc++/stream.h index 49f88a6f135..b8982f4d93d 100644 --- a/include/grpc++/stream.h +++ b/include/grpc++/stream.h @@ -96,7 +96,7 @@ class ClientReader : public ClientStreamingInterface, virtual bool Read(R* msg) { return context_->Read(msg); } - virtual void Cancel() { context_->FinishStream(Status::Cancelled, true); } + virtual void Cancel() { context_->Cancel(); } virtual const Status& Wait() { return context_->Wait(); } @@ -122,7 +122,7 @@ class ClientWriter : public ClientStreamingInterface, virtual void WritesDone() { context_->Write(nullptr, true); } - virtual void Cancel() { context_->FinishStream(Status::Cancelled, true); } + virtual void Cancel() { context_->Cancel(); } // Read the final response and wait for the final status. virtual const Status& Wait() { @@ -165,7 +165,7 @@ class ClientReaderWriter : public ClientStreamingInterface, virtual void WritesDone() { context_->Write(nullptr, true); } - virtual void Cancel() { context_->FinishStream(Status::Cancelled, true); } + virtual void Cancel() { context_->Cancel(); } virtual const Status& Wait() { return context_->Wait(); } diff --git a/include/grpc++/stream_context_interface.h b/include/grpc++/stream_context_interface.h index 535c0048e65..a84119800b7 100644 --- a/include/grpc++/stream_context_interface.h +++ b/include/grpc++/stream_context_interface.h @@ -53,7 +53,7 @@ class StreamContextInterface { virtual bool Read(google::protobuf::Message* msg) = 0; virtual bool Write(const google::protobuf::Message* msg, bool is_last) = 0; virtual const Status& Wait() = 0; - virtual void FinishStream(const Status& status, bool send) = 0; + virtual void Cancel() = 0; virtual google::protobuf::Message* request() = 0; virtual google::protobuf::Message* response() = 0; diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index d8fd03b8999..f9d8cce8475 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -365,6 +365,14 @@ grpc_call_error grpc_call_server_end_initial_metadata(grpc_call *call, Can be called multiple times, from any thread. */ grpc_call_error grpc_call_cancel(grpc_call *call); +/* Called by clients to cancel an RPC on the server. + Can be called multiple times, from any thread. + If a status has not been received for the call, set it to the status code + and description passed in. + Importantly, this function does not send status nor description to the + remote endpoint. */ +grpc_call_error grpc_call_cancel_with_status(grpc_call *call, grpc_status_code status, const char *description); + /* Queue a byte buffer for writing. flags is a bit-field combination of the write flags defined above. A write with byte_buffer null is allowed, and will not send any bytes on the diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 44ccfd11a76..4ce958171b5 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -270,6 +270,19 @@ void grpc_call_destroy(grpc_call *c) { grpc_call_internal_unref(c); } +static void maybe_set_status_code(grpc_call *call, gpr_uint32 status) { + if (!call->got_status_code) { + call->status_code = status; + call->got_status_code = 1; + } +} + +static void maybe_set_status_details(grpc_call *call, grpc_mdstr *status) { + if (!call->status_details) { + call->status_details = grpc_mdstr_ref(status); + } +} + grpc_call_error grpc_call_cancel(grpc_call *c) { grpc_call_element *elem; grpc_call_op op; @@ -286,6 +299,17 @@ grpc_call_error grpc_call_cancel(grpc_call *c) { return GRPC_CALL_OK; } +grpc_call_error grpc_call_cancel_with_status(grpc_call *c, grpc_status_code status, const char *description) { + grpc_mdstr *details = description? grpc_mdstr_from_string(c->metadata_context, description) : NULL; + gpr_mu_lock(&c->read_mu); + maybe_set_status_code(c, status); + if (details) { + maybe_set_status_details(c, details); + } + gpr_mu_unlock(&c->read_mu); + return grpc_call_cancel(c); +} + void grpc_call_execute_op(grpc_call *call, grpc_call_op *op) { grpc_call_element *elem; GPR_ASSERT(op->dir == GRPC_CALL_DOWN); @@ -803,16 +827,11 @@ void grpc_call_recv_metadata(grpc_call_element *elem, grpc_call_op *op) { grpc_mdstr *key = md->key; gpr_log(GPR_DEBUG, "call %p got metadata %s %s", call, grpc_mdstr_as_c_string(md->key), grpc_mdstr_as_c_string(md->value)); if (key == grpc_channel_get_status_string(call->channel)) { - if (!call->got_status_code) { - call->status_code = decode_status(md); - call->got_status_code = 1; - } + maybe_set_status_code(call, decode_status(md)); grpc_mdelem_unref(md); op->done_cb(op->user_data, GRPC_OP_OK); } else if (key == grpc_channel_get_message_string(call->channel)) { - if (!call->status_details) { - call->status_details = grpc_mdstr_ref(md->value); - } + maybe_set_status_details(call, md->value); grpc_mdelem_unref(md); op->done_cb(op->user_data, GRPC_OP_OK); } else { diff --git a/src/cpp/stream/stream_context.cc b/src/cpp/stream/stream_context.cc index 7936a30dfd7..d46ba6e56ae 100644 --- a/src/cpp/stream/stream_context.cc +++ b/src/cpp/stream/stream_context.cc @@ -112,9 +112,7 @@ bool StreamContext::Read(google::protobuf::Message* msg) { if (read_ev->data.read) { if (!DeserializeProto(read_ev->data.read, msg)) { ret = false; - FinishStream( - Status(StatusCode::DATA_LOSS, "Failed to parse incoming proto"), - true); + grpc_call_cancel_with_status(call(), GRPC_STATUS_DATA_LOSS, "Failed to parse incoming proto"); } } else { ret = false; @@ -132,9 +130,7 @@ bool StreamContext::Write(const google::protobuf::Message* msg, bool is_last) { if (msg) { grpc_byte_buffer* out_buf = nullptr; if (!SerializeProto(*msg, &out_buf)) { - FinishStream(Status(StatusCode::INVALID_ARGUMENT, - "Failed to serialize outgoing proto"), - true); + grpc_call_cancel_with_status(call(), GRPC_STATUS_INVALID_ARGUMENT, "Failed to serialize outgoing proto"); return false; } int flag = is_last ? GRPC_WRITE_BUFFER_HINT : 0; @@ -172,29 +168,21 @@ const Status& StreamContext::Wait() { grpc_event_finish(metadata_ev); // TODO(yangg) protect states by a mutex, including other places. if (!self_halfclosed_ || !peer_halfclosed_) { - FinishStream(Status::Cancelled, true); - } else { - grpc_event* finish_ev = - grpc_completion_queue_pluck(cq(), finished_tag(), gpr_inf_future); - GPR_ASSERT(finish_ev->type == GRPC_FINISHED); - final_status_ = Status( - static_cast(finish_ev->data.finished.status), - finish_ev->data.finished.details ? finish_ev->data.finished.details - : ""); - grpc_event_finish(finish_ev); - } - return final_status_; -} - -void StreamContext::FinishStream(const Status& status, bool send) { - if (send) { - grpc_call_cancel(call()); - } + Cancel(); + } grpc_event* finish_ev = grpc_completion_queue_pluck(cq(), finished_tag(), gpr_inf_future); GPR_ASSERT(finish_ev->type == GRPC_FINISHED); + final_status_ = Status( + static_cast(finish_ev->data.finished.status), + finish_ev->data.finished.details ? finish_ev->data.finished.details + : ""); grpc_event_finish(finish_ev); - final_status_ = status; + return final_status_; +} + +void StreamContext::Cancel() { + grpc_call_cancel(call()); } } // namespace grpc diff --git a/src/cpp/stream/stream_context.h b/src/cpp/stream/stream_context.h index f70fe6daa34..4781f27a77f 100644 --- a/src/cpp/stream/stream_context.h +++ b/src/cpp/stream/stream_context.h @@ -48,7 +48,7 @@ namespace grpc { class ClientContext; class RpcMethod; -class StreamContext : public StreamContextInterface { +class StreamContext final : public StreamContextInterface { public: StreamContext(const RpcMethod& method, ClientContext* context, const google::protobuf::Message* request, @@ -63,7 +63,7 @@ class StreamContext : public StreamContextInterface { bool Read(google::protobuf::Message* msg) override; bool Write(const google::protobuf::Message* msg, bool is_last) override; const Status& Wait() override; - void FinishStream(const Status& status, bool send) override; + void Cancel() override; google::protobuf::Message* request() override { return request_; } google::protobuf::Message* response() override { return result_; } diff --git a/third_party/libevent b/third_party/libevent new file mode 160000 index 00000000000..f7d92c63928 --- /dev/null +++ b/third_party/libevent @@ -0,0 +1 @@ +Subproject commit f7d92c63928a1460f3d99b9bc418bd3b686a0dca From 7d4c64ae7d0abf1455ee20f042a2b0d2badce45e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 14 Jan 2015 12:54:04 -0800 Subject: [PATCH 19/26] libevent snuck in --- third_party/libevent | 1 - 1 file changed, 1 deletion(-) delete mode 160000 third_party/libevent diff --git a/third_party/libevent b/third_party/libevent deleted file mode 160000 index f7d92c63928..00000000000 --- a/third_party/libevent +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f7d92c63928a1460f3d99b9bc418bd3b686a0dca From 6046dc35efe8263f59e405ae679059a6c65111f7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 14 Jan 2015 12:55:45 -0800 Subject: [PATCH 20/26] clang-format --- include/grpc/grpc.h | 8 +++++--- src/core/support/log_posix.c | 1 - src/core/surface/call.c | 17 +++++++++++------ src/cpp/stream/stream_context.cc | 15 +++++++-------- test/core/util/test_config.c | 8 ++------ 5 files changed, 25 insertions(+), 24 deletions(-) diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index f9d8cce8475..45915cbfadf 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -366,12 +366,14 @@ grpc_call_error grpc_call_server_end_initial_metadata(grpc_call *call, grpc_call_error grpc_call_cancel(grpc_call *call); /* Called by clients to cancel an RPC on the server. - Can be called multiple times, from any thread. + Can be called multiple times, from any thread. If a status has not been received for the call, set it to the status code - and description passed in. + and description passed in. Importantly, this function does not send status nor description to the remote endpoint. */ -grpc_call_error grpc_call_cancel_with_status(grpc_call *call, grpc_status_code status, const char *description); +grpc_call_error grpc_call_cancel_with_status(grpc_call *call, + grpc_status_code status, + const char *description); /* Queue a byte buffer for writing. flags is a bit-field combination of the write flags defined above. diff --git a/src/core/support/log_posix.c b/src/core/support/log_posix.c index 55a38b136d0..ee2705a2c20 100644 --- a/src/core/support/log_posix.c +++ b/src/core/support/log_posix.c @@ -31,7 +31,6 @@ * */ - #ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112L #endif diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 4ce958171b5..3579a5bb9fa 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -278,9 +278,9 @@ static void maybe_set_status_code(grpc_call *call, gpr_uint32 status) { } static void maybe_set_status_details(grpc_call *call, grpc_mdstr *status) { - if (!call->status_details) { - call->status_details = grpc_mdstr_ref(status); - } + if (!call->status_details) { + call->status_details = grpc_mdstr_ref(status); + } } grpc_call_error grpc_call_cancel(grpc_call *c) { @@ -299,8 +299,12 @@ grpc_call_error grpc_call_cancel(grpc_call *c) { return GRPC_CALL_OK; } -grpc_call_error grpc_call_cancel_with_status(grpc_call *c, grpc_status_code status, const char *description) { - grpc_mdstr *details = description? grpc_mdstr_from_string(c->metadata_context, description) : NULL; +grpc_call_error grpc_call_cancel_with_status(grpc_call *c, + grpc_status_code status, + const char *description) { + grpc_mdstr *details = + description ? grpc_mdstr_from_string(c->metadata_context, description) + : NULL; gpr_mu_lock(&c->read_mu); maybe_set_status_code(c, status); if (details) { @@ -825,7 +829,8 @@ void grpc_call_recv_metadata(grpc_call_element *elem, grpc_call_op *op) { grpc_call *call = CALL_FROM_TOP_ELEM(elem); grpc_mdelem *md = op->data.metadata; grpc_mdstr *key = md->key; - gpr_log(GPR_DEBUG, "call %p got metadata %s %s", call, grpc_mdstr_as_c_string(md->key), grpc_mdstr_as_c_string(md->value)); + gpr_log(GPR_DEBUG, "call %p got metadata %s %s", call, + grpc_mdstr_as_c_string(md->key), grpc_mdstr_as_c_string(md->value)); if (key == grpc_channel_get_status_string(call->channel)) { maybe_set_status_code(call, decode_status(md)); grpc_mdelem_unref(md); diff --git a/src/cpp/stream/stream_context.cc b/src/cpp/stream/stream_context.cc index d46ba6e56ae..5ccf8c96828 100644 --- a/src/cpp/stream/stream_context.cc +++ b/src/cpp/stream/stream_context.cc @@ -112,7 +112,8 @@ bool StreamContext::Read(google::protobuf::Message* msg) { if (read_ev->data.read) { if (!DeserializeProto(read_ev->data.read, msg)) { ret = false; - grpc_call_cancel_with_status(call(), GRPC_STATUS_DATA_LOSS, "Failed to parse incoming proto"); + grpc_call_cancel_with_status(call(), GRPC_STATUS_DATA_LOSS, + "Failed to parse incoming proto"); } } else { ret = false; @@ -130,7 +131,8 @@ bool StreamContext::Write(const google::protobuf::Message* msg, bool is_last) { if (msg) { grpc_byte_buffer* out_buf = nullptr; if (!SerializeProto(*msg, &out_buf)) { - grpc_call_cancel_with_status(call(), GRPC_STATUS_INVALID_ARGUMENT, "Failed to serialize outgoing proto"); + grpc_call_cancel_with_status(call(), GRPC_STATUS_INVALID_ARGUMENT, + "Failed to serialize outgoing proto"); return false; } int flag = is_last ? GRPC_WRITE_BUFFER_HINT : 0; @@ -169,20 +171,17 @@ const Status& StreamContext::Wait() { // TODO(yangg) protect states by a mutex, including other places. if (!self_halfclosed_ || !peer_halfclosed_) { Cancel(); - } + } grpc_event* finish_ev = grpc_completion_queue_pluck(cq(), finished_tag(), gpr_inf_future); GPR_ASSERT(finish_ev->type == GRPC_FINISHED); final_status_ = Status( static_cast(finish_ev->data.finished.status), - finish_ev->data.finished.details ? finish_ev->data.finished.details - : ""); + finish_ev->data.finished.details ? finish_ev->data.finished.details : ""); grpc_event_finish(finish_ev); return final_status_; } -void StreamContext::Cancel() { - grpc_call_cancel(call()); -} +void StreamContext::Cancel() { grpc_call_cancel(call()); } } // namespace grpc diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index ab2c0d80a99..a9a687835e7 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -38,16 +38,12 @@ #if GPR_GETPID_IN_UNISTD_H #include -static int seed() { - return getpid(); -} +static int seed() { return getpid(); } #endif #if GPR_GETPID_IN_PROCESS_H #include -static int seed(void) { - return _getpid(); -} +static int seed(void) { return _getpid(); } #endif void grpc_test_init(int argc, char **argv) { From 7ae39506756d2865173bb074d9e8c7a9b00a4f54 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Wed, 14 Jan 2015 13:38:44 -0800 Subject: [PATCH 21/26] Fix the transport name used to start the grpc java docker server --- tools/dockerfile/grpc_java/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dockerfile/grpc_java/Dockerfile b/tools/dockerfile/grpc_java/Dockerfile index f7156c7f382..78659dedeb2 100644 --- a/tools/dockerfile/grpc_java/Dockerfile +++ b/tools/dockerfile/grpc_java/Dockerfile @@ -13,4 +13,4 @@ RUN cd /var/local/git/grpc-java && \ mvn install # Specify the default command such that the interop server runs on its known testing port -CMD ["/var/local/git/grpc-java/run-test-server.sh", "--transport=NETTY_TLS", "--grpc_version=2", "--port=8030"] +CMD ["/var/local/git/grpc-java/run-test-server.sh", "--transport=HTTP2_NETTY_TLS", "--grpc_version=2", "--port=8030"] From 8a7a15291958792cc56a9d7f4de6017012671f3d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 14 Jan 2015 14:12:17 -0800 Subject: [PATCH 22/26] Remove unused private field --- test/cpp/qps/server.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/cpp/qps/server.cc b/test/cpp/qps/server.cc index b2a4cde59fa..eb810b8d559 100644 --- a/test/cpp/qps/server.cc +++ b/test/cpp/qps/server.cc @@ -80,9 +80,6 @@ bool SetPayload(PayloadType type, int size, Payload* payload) { } class TestServiceImpl : public TestService::Service { - private: - int num_rpcs; - public: Status CollectServerStats(ServerContext* context, const StatsRequest*, ServerStats* response) { From ed0cbc8b0ca43e247fd3404390b37754ee2c90f2 Mon Sep 17 00:00:00 2001 From: David Klempner Date: Wed, 14 Jan 2015 14:46:10 -0800 Subject: [PATCH 23/26] Review changes for :scheme conversion to http[s] 1. scheme_from_args should return const char* 2. Rename grpc.scheme arg to grpc.http2_scheme, and define a macro for it. --- src/core/channel/http_client_filter.c | 4 ++-- src/core/channel/http_client_filter.h | 2 ++ src/core/security/security_context.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/channel/http_client_filter.c b/src/core/channel/http_client_filter.c index 96fa3ecdf81..ab9d3aff16b 100644 --- a/src/core/channel/http_client_filter.c +++ b/src/core/channel/http_client_filter.c @@ -131,12 +131,12 @@ static void destroy_call_elem(grpc_call_element *elem) { ignore_unused(channeld); } -static char *scheme_from_args(const grpc_channel_args *args) { +static const char *scheme_from_args(const grpc_channel_args *args) { int i; if (args != NULL) { for (i = 0; i < args->num_args; ++i) { if (args->args[i].type == GRPC_ARG_STRING && - strcmp(args->args[i].key, "grpc.scheme") == 0) { + strcmp(args->args[i].key, GRPC_ARG_HTTP2_SCHEME) == 0) { return args->args[i].value.string; } } diff --git a/src/core/channel/http_client_filter.h b/src/core/channel/http_client_filter.h index f939cbd351f..21cde4877ba 100644 --- a/src/core/channel/http_client_filter.h +++ b/src/core/channel/http_client_filter.h @@ -39,4 +39,6 @@ /* Processes metadata on the client side for HTTP2 transports */ extern const grpc_channel_filter grpc_http_client_filter; +#define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme" + #endif /* __GRPC_INTERNAL_CHANNEL_HTTP_CLIENT_FILTER_H__ */ diff --git a/src/core/security/security_context.c b/src/core/security/security_context.c index eeaf4947ed2..fc722f2d829 100644 --- a/src/core/security/security_context.c +++ b/src/core/security/security_context.c @@ -36,6 +36,7 @@ #include #include "src/core/channel/channel_args.h" +#include "src/core/channel/http_client_filter.h" #include "src/core/security/credentials.h" #include "src/core/security/secure_endpoint.h" #include "src/core/surface/lame_client.h" @@ -463,7 +464,7 @@ grpc_channel *grpc_ssl_channel_create(grpc_credentials *ssl_creds, return grpc_lame_client_channel_create(); } arg.type = GRPC_ARG_STRING; - arg.key = "grpc.scheme"; + arg.key = GRPC_ARG_HTTP2_SCHEME; arg.value.string = "https"; new_args = grpc_channel_args_copy_and_add(args, &arg); channel = grpc_secure_channel_create_internal(target, new_args, ctx); From baa26f845ee4c47c794b4dcc001025a267d2ffb1 Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Wed, 14 Jan 2015 15:39:07 -0800 Subject: [PATCH 24/26] Updates the JDK to JDK8 - necessary to allow seamless interop testing, as discussed earlier this week. --- tools/dockerfile/grpc_java_base/Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/dockerfile/grpc_java_base/Dockerfile b/tools/dockerfile/grpc_java_base/Dockerfile index fe8edeb6980..44fa52c0e8b 100644 --- a/tools/dockerfile/grpc_java_base/Dockerfile +++ b/tools/dockerfile/grpc_java_base/Dockerfile @@ -1,13 +1,21 @@ # Base Dockerfile for the gRPC Java dev image FROM grpc/base -RUN apt-get update && apt-get -y install java7-jdk +# Install JDK 8 +# +# TODO(temiola): simplify this if/when a simpler process is available. +# +RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections +RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list +RUN echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 +RUN apt-get update && apt-get -y install oracle-java8-installer # Install maven RUN wget http://mirror.olnevhost.net/pub/apache/maven/binaries/apache-maven-3.2.1-bin.tar.gz && \ tar xvf apache-maven-3.2.1-bin.tar.gz -C /var/local -ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-amd64 +ENV JAVA_HOME /usr/lib/jvm/java-8-oracle ENV M2_HOME /var/local/apache-maven-3.2.1 ENV PATH $PATH:$JAVA_HOME/bin:$M2_HOME/bin ENV LD_LIBRARY_PATH /usr/local/lib From ba51bead55a2f53667690749638bb69a88102ff5 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Wed, 14 Jan 2015 15:56:00 -0800 Subject: [PATCH 25/26] Muting an extremely chatty log line. --- src/core/surface/call.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 3579a5bb9fa..0d72bf42fb8 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -829,8 +829,6 @@ void grpc_call_recv_metadata(grpc_call_element *elem, grpc_call_op *op) { grpc_call *call = CALL_FROM_TOP_ELEM(elem); grpc_mdelem *md = op->data.metadata; grpc_mdstr *key = md->key; - gpr_log(GPR_DEBUG, "call %p got metadata %s %s", call, - grpc_mdstr_as_c_string(md->key), grpc_mdstr_as_c_string(md->value)); if (key == grpc_channel_get_status_string(call->channel)) { maybe_set_status_code(call, decode_status(md)); grpc_mdelem_unref(md); From b891807429ba10ad9c4d7441757fac04fc9a68df Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Wed, 14 Jan 2015 16:59:34 -0800 Subject: [PATCH 26/26] rolled back generated proto changes --- src/ruby/bin/google/pubsub/v2/pubsub.rb | 144 ------------------ .../bin/google/pubsub/v2/pubsub_services.rb | 73 --------- 2 files changed, 217 deletions(-) delete mode 100644 src/ruby/bin/google/pubsub/v2/pubsub.rb delete mode 100644 src/ruby/bin/google/pubsub/v2/pubsub_services.rb diff --git a/src/ruby/bin/google/pubsub/v2/pubsub.rb b/src/ruby/bin/google/pubsub/v2/pubsub.rb deleted file mode 100644 index 28b7143b662..00000000000 --- a/src/ruby/bin/google/pubsub/v2/pubsub.rb +++ /dev/null @@ -1,144 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/pubsub/v2/pubsub.proto - -require 'google/protobuf' - -require 'google/protobuf/empty' -Google::Protobuf::DescriptorPool.generated_pool.build do - add_message "google.pubsub.v2.Topic" do - optional :name, :string, 1 - optional :garbage_collect_seconds, :int64, 2 - end - add_message "google.pubsub.v2.PubsubMessage" do - optional :data, :string, 1 - repeated :labels, :message, 2, "google.pubsub.v2.PubsubMessage.LabelsEntry" - optional :message_id, :string, 3 - optional :data_truncated, :bool, 4 - end - add_message "google.pubsub.v2.PubsubMessage.LabelsEntry" do - optional :key, :string, 1 - optional :value, :string, 2 - end - add_message "google.pubsub.v2.GetTopicRequest" do - optional :topic, :string, 1 - end - add_message "google.pubsub.v2.PublishRequest" do - optional :topic, :string, 1 - repeated :messages, :message, 2, "google.pubsub.v2.PubsubMessage" - end - add_message "google.pubsub.v2.PublishResponse" do - repeated :message_ids, :string, 1 - end - add_message "google.pubsub.v2.ListTopicsRequest" do - optional :query, :string, 1 - optional :max_results, :int32, 2 - optional :page_token, :string, 3 - end - add_message "google.pubsub.v2.ListTopicsResponse" do - repeated :topics, :message, 1, "google.pubsub.v2.Topic" - optional :next_page_token, :string, 2 - end - add_message "google.pubsub.v2.DeleteTopicRequest" do - optional :topic, :string, 1 - end - add_message "google.pubsub.v2.Subscription" do - optional :name, :string, 1 - optional :topic, :string, 2 - optional :query, :string, 3 - optional :truncation_policy, :message, 4, "google.pubsub.v2.Subscription.TruncationPolicy" - optional :push_config, :message, 5, "google.pubsub.v2.PushConfig" - optional :ack_deadline_seconds, :int32, 6 - optional :garbage_collect_seconds, :int64, 7 - end - add_message "google.pubsub.v2.Subscription.TruncationPolicy" do - optional :max_bytes, :int64, 1 - optional :max_age_seconds, :int64, 2 - end - add_message "google.pubsub.v2.PushConfig" do - optional :push_endpoint, :string, 1 - end - add_message "google.pubsub.v2.PubsubEvent" do - optional :subscription, :string, 1 - optional :ack_id, :string, 5 - optional :message, :message, 2, "google.pubsub.v2.PubsubMessage" - optional :truncated, :bool, 3 - optional :end_of_stream, :bool, 4 - end - add_message "google.pubsub.v2.GetSubscriptionRequest" do - optional :subscription, :string, 1 - end - add_message "google.pubsub.v2.ListSubscriptionsRequest" do - optional :query, :string, 1 - optional :max_results, :int32, 3 - optional :page_token, :string, 4 - end - add_message "google.pubsub.v2.ListSubscriptionsResponse" do - repeated :subscriptions, :message, 1, "google.pubsub.v2.Subscription" - optional :next_page_token, :string, 2 - end - add_message "google.pubsub.v2.TruncateSubscriptionRequest" do - optional :subscription, :string, 1 - end - add_message "google.pubsub.v2.DetachSubscriptionRequest" do - optional :subscription, :string, 1 - end - add_message "google.pubsub.v2.DeleteSubscriptionRequest" do - optional :subscription, :string, 1 - end - add_message "google.pubsub.v2.ModifyPushConfigRequest" do - optional :subscription, :string, 1 - optional :push_config, :message, 2, "google.pubsub.v2.PushConfig" - end - add_message "google.pubsub.v2.PullRequest" do - optional :subscription, :string, 1 - optional :return_immediately, :bool, 2 - optional :max_events, :int32, 3 - end - add_message "google.pubsub.v2.PullResponse" do - repeated :pubsub_events, :message, 1, "google.pubsub.v2.PubsubEvent" - end - add_message "google.pubsub.v2.ModifyAckDeadlineRequest" do - optional :subscription, :string, 1 - optional :ack_id, :string, 2 - optional :ack_deadline_seconds, :int32, 3 - end - add_message "google.pubsub.v2.AcknowledgeRequest" do - optional :subscription, :string, 1 - repeated :ack_ids, :string, 2 - end - add_message "google.pubsub.v2.HandlePubsubEventResponse" do - optional :acknowledge_explicitly, :bool, 1 - end -end - -module Google - module Pubsub - module V2 - Topic = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.Topic").msgclass - PubsubMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PubsubMessage").msgclass - PubsubMessage::LabelsEntry = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PubsubMessage.LabelsEntry").msgclass - GetTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.GetTopicRequest").msgclass - PublishRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PublishRequest").msgclass - PublishResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PublishResponse").msgclass - ListTopicsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ListTopicsRequest").msgclass - ListTopicsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ListTopicsResponse").msgclass - DeleteTopicRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.DeleteTopicRequest").msgclass - Subscription = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.Subscription").msgclass - Subscription::TruncationPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.Subscription.TruncationPolicy").msgclass - PushConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PushConfig").msgclass - PubsubEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PubsubEvent").msgclass - GetSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.GetSubscriptionRequest").msgclass - ListSubscriptionsRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ListSubscriptionsRequest").msgclass - ListSubscriptionsResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ListSubscriptionsResponse").msgclass - TruncateSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.TruncateSubscriptionRequest").msgclass - DetachSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.DetachSubscriptionRequest").msgclass - DeleteSubscriptionRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.DeleteSubscriptionRequest").msgclass - ModifyPushConfigRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ModifyPushConfigRequest").msgclass - PullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PullRequest").msgclass - PullResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.PullResponse").msgclass - ModifyAckDeadlineRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.ModifyAckDeadlineRequest").msgclass - AcknowledgeRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.AcknowledgeRequest").msgclass - HandlePubsubEventResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.pubsub.v2.HandlePubsubEventResponse").msgclass - end - end -end diff --git a/src/ruby/bin/google/pubsub/v2/pubsub_services.rb b/src/ruby/bin/google/pubsub/v2/pubsub_services.rb deleted file mode 100644 index 475332a04b2..00000000000 --- a/src/ruby/bin/google/pubsub/v2/pubsub_services.rb +++ /dev/null @@ -1,73 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/pubsub/v2/pubsub.proto for package 'google.pubsub.v2' - -require 'grpc' -require 'google/pubsub/v2/pubsub' - -module Google - module Pubsub - module V2 - module PublisherService - - # TODO: add proto service documentation here - class Service - - include GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.pubsub.v2.PublisherService' - - rpc :CreateTopic, Topic, Topic - rpc :Publish, PublishRequest, PublishResponse - rpc :GetTopic, GetTopicRequest, Topic - rpc :ListTopics, ListTopicsRequest, ListTopicsResponse - rpc :DeleteTopic, DeleteTopicRequest, Empty - end - - Stub = Service.rpc_stub_class - end - module SubscriberService - - # TODO: add proto service documentation here - class Service - - include GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.pubsub.v2.SubscriberService' - - rpc :CreateSubscription, Subscription, Subscription - rpc :GetSubscription, GetSubscriptionRequest, Subscription - rpc :ListSubscriptions, ListSubscriptionsRequest, ListSubscriptionsResponse - rpc :DeleteSubscription, DeleteSubscriptionRequest, Empty - rpc :TruncateSubscription, TruncateSubscriptionRequest, Empty - rpc :DetachSubscription, DetachSubscriptionRequest, Empty - rpc :ModifyAckDeadline, ModifyAckDeadlineRequest, Empty - rpc :Acknowledge, AcknowledgeRequest, Empty - rpc :Pull, PullRequest, PullResponse - rpc :ModifyPushConfig, ModifyPushConfigRequest, Empty - end - - Stub = Service.rpc_stub_class - end - module PushEndpointService - - # TODO: add proto service documentation here - class Service - - include GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.pubsub.v2.PushEndpointService' - - rpc :HandlePubsubEvent, PubsubEvent, HandlePubsubEventResponse - end - - Stub = Service.rpc_stub_class - end - end - end -end