diff options
-rw-r--r-- | BUILD | 12 | ||||
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | bazel/generate_cc.bzl | 16 | ||||
-rw-r--r-- | build.yaml | 8 | ||||
-rw-r--r-- | examples/BUILD (renamed from examples/protos/BUILD) | 22 | ||||
-rw-r--r-- | examples/cpp/helloworld/BUILD | 42 | ||||
-rw-r--r-- | test/core/slice/slice_buffer_test.c | 4 | ||||
-rw-r--r-- | test/cpp/thread_manager/thread_manager_test.cc | 2 | ||||
-rwxr-xr-x | tools/jenkins/run_bazel_basic_in_docker.sh | 2 | ||||
-rw-r--r-- | tools/run_tests/generated/sources_and_headers.json | 21 | ||||
-rwxr-xr-x | tools/run_tests/sanity/check_submodules.sh | 1 | ||||
-rw-r--r-- | vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj | 2 | ||||
-rw-r--r-- | vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters | 6 |
14 files changed, 31 insertions, 111 deletions
@@ -1409,18 +1409,6 @@ grpc_cc_library( ) grpc_cc_library( - name = "thrift_util", - language = "c++", - public_hdrs = [ - "include/grpc++/impl/codegen/thrift_serializer.h", - "include/grpc++/impl/codegen/thrift_utils.h", - ], - deps = [ - "grpc++_codegen_base", - ], -) - -grpc_cc_library( name = "grpc++_reflection", srcs = [ "src/cpp/ext/proto_server_reflection.cc", diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aaf71a236..2528d7bf05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3295,8 +3295,6 @@ foreach(_hdr include/grpc/impl/codegen/sync_windows.h include/grpc++/impl/codegen/proto_utils.h include/grpc++/impl/codegen/config_protobuf.h - include/grpc++/impl/codegen/thrift_serializer.h - include/grpc++/impl/codegen/thrift_utils.h ) string(REPLACE "include/" "" _path ${_hdr}) get_filename_component(_path ${_path} PATH) @@ -5176,8 +5176,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/sync_windows.h \ include/grpc++/impl/codegen/proto_utils.h \ include/grpc++/impl/codegen/config_protobuf.h \ - include/grpc++/impl/codegen/thrift_serializer.h \ - include/grpc++/impl/codegen/thrift_utils.h \ LIBGRPC++_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_TEST_UTIL_SRC)))) diff --git a/bazel/generate_cc.bzl b/bazel/generate_cc.bzl index 8f0f94f563..d05509fc15 100644 --- a/bazel/generate_cc.bzl +++ b/bazel/generate_cc.bzl @@ -9,18 +9,18 @@ def generate_cc_impl(ctx): protos = [f for src in ctx.attr.srcs for f in src.proto.direct_sources] includes = [f for src in ctx.attr.srcs for f in src.proto.transitive_imports] outs = [] + # label_len is length of the path from WORKSPACE root to the location of this build file + label_len = len(ctx.label.package) + 1 if ctx.executable.plugin: - outs += [proto.basename[:-len(".proto")] + ".grpc.pb.h" for proto in protos] - outs += [proto.basename[:-len(".proto")] + ".grpc.pb.cc" for proto in protos] + outs += [proto.path[label_len:-len(".proto")] + ".grpc.pb.h" for proto in protos] + outs += [proto.path[label_len:-len(".proto")] + ".grpc.pb.cc" for proto in protos] if ctx.attr.generate_mock: - outs += [proto.basename[:-len(".proto")] + "_mock.grpc.pb.h" for proto in protos] + outs += [proto.path[label_len:-len(".proto")] + "_mock.grpc.pb.h" for proto in protos] else: - outs += [proto.basename[:-len(".proto")] + ".pb.h" for proto in protos] - outs += [proto.basename[:-len(".proto")] + ".pb.cc" for proto in protos] + outs += [proto.path[label_len:-len(".proto")] + ".pb.h" for proto in protos] + outs += [proto.path[label_len:-len(".proto")] + ".pb.cc" for proto in protos] out_files = [ctx.new_file(out) for out in outs] - # The following should be replaced with ctx.configuration.buildout - # whenever this is added to Skylark. - dir_out = out_files[0].dirname[:-len(protos[0].dirname)] + dir_out = str(ctx.genfiles_dir.path) arguments = [] if ctx.executable.plugin: diff --git a/build.yaml b/build.yaml index e54850e1a1..ad2a4f71a4 100644 --- a/build.yaml +++ b/build.yaml @@ -986,13 +986,6 @@ filegroups: - include/grpc++/test/server_context_test_spouse.h deps: - grpc++ -- name: thrift_util - language: c++ - public_headers: - - include/grpc++/impl/codegen/thrift_serializer.h - - include/grpc++/impl/codegen/thrift_utils.h - uses: - - grpc++_codegen_base libs: - name: gpr build: all @@ -1290,7 +1283,6 @@ libs: - grpc++_codegen_base_src - grpc++_codegen_proto - grpc++_config_proto - - thrift_util - name: grpc++_unsecure build: all language: c++ diff --git a/examples/protos/BUILD b/examples/BUILD index 2ffdf64f9a..382713e5e4 100644 --- a/examples/protos/BUILD +++ b/examples/BUILD @@ -33,20 +33,34 @@ load("//bazel:grpc_build_system.bzl", "grpc_proto_library") grpc_proto_library( name = "auth_sample", - srcs = ["auth_sample.proto"], + srcs = ["protos/auth_sample.proto"], ) grpc_proto_library( name = "hellostreamingworld", - srcs = ["hellostreamingworld.proto"], + srcs = ["protos/hellostreamingworld.proto"], ) grpc_proto_library( name = "helloworld", - srcs = ["helloworld.proto"], + srcs = ["protos/helloworld.proto"], ) grpc_proto_library( name = "route_guide", - srcs = ["route_guide.proto"], + srcs = ["protos/route_guide.proto"], +) + +cc_binary( + name = "greeter_client", + srcs = ["cpp/helloworld/greeter_client.cc"], + deps = ["helloworld"], + defines = ["BAZEL_BUILD"], +) + +cc_binary( + name = "greeter_server", + srcs = ["cpp/helloworld/greeter_server.cc"], + deps = ["helloworld"], + defines = ["BAZEL_BUILD"], ) diff --git a/examples/cpp/helloworld/BUILD b/examples/cpp/helloworld/BUILD deleted file mode 100644 index b9c3f5dfbe..0000000000 --- a/examples/cpp/helloworld/BUILD +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2017, 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. - -cc_binary( - name = "greeter_client", - srcs = ["greeter_client.cc"], - deps = ["//examples/protos:helloworld"], - defines = ["BAZEL_BUILD"], -) - -cc_binary( - name = "greeter_server", - srcs = ["greeter_server.cc"], - deps = ["//examples/protos:helloworld"], - defines = ["BAZEL_BUILD"], -) diff --git a/test/core/slice/slice_buffer_test.c b/test/core/slice/slice_buffer_test.c index 51cab2a87f..41cff3d4d2 100644 --- a/test/core/slice/slice_buffer_test.c +++ b/test/core/slice/slice_buffer_test.c @@ -115,8 +115,8 @@ void test_slice_buffer_move_first() { grpc_slice_buffer_move_first(&src, 2, &dst); src_len -= 2; dst_len += 2; - GPR_ASSERT(src_len == src.length); - GPR_ASSERT(dst_len == dst.length); + GPR_ASSERT(src.length == src_len); + GPR_ASSERT(dst.length == dst_len); } int main(int argc, char **argv) { diff --git a/test/cpp/thread_manager/thread_manager_test.cc b/test/cpp/thread_manager/thread_manager_test.cc index 35c8d5d088..e1a03666f0 100644 --- a/test/cpp/thread_manager/thread_manager_test.cc +++ b/test/cpp/thread_manager/thread_manager_test.cc @@ -118,7 +118,7 @@ void ThreadManagerTest::PerformTest() { // The number of times DoWork() was called is equal to the number of times // WORK_FOUND was returned - gpr_log(GPR_DEBUG, "DoWork() called %ld times", + gpr_log(GPR_DEBUG, "DoWork() called %" PRIdPTR " times", gpr_atm_no_barrier_load(&num_do_work_)); GPR_ASSERT(gpr_atm_no_barrier_load(&num_do_work_) == gpr_atm_no_barrier_load(&num_work_found_)); diff --git a/tools/jenkins/run_bazel_basic_in_docker.sh b/tools/jenkins/run_bazel_basic_in_docker.sh index b1d498a07d..5013f80b1d 100755 --- a/tools/jenkins/run_bazel_basic_in_docker.sh +++ b/tools/jenkins/run_bazel_basic_in_docker.sh @@ -39,4 +39,4 @@ git clone /var/local/jenkins/grpc /var/local/git/grpc && git submodule update --init --reference /var/local/jenkins/grpc/${name} \ ${name}') cd /var/local/git/grpc -bazel build --spawn_strategy=standalone --genrule_strategy=standalone :all test/... examples/cpp/... +bazel build --spawn_strategy=standalone --genrule_strategy=standalone :all test/... examples/... diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 18b42fdfb4..cd9c5de84e 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -6041,8 +6041,7 @@ "grpc++_codegen_base_src", "grpc++_codegen_proto", "grpc++_config_proto", - "grpc_test_util", - "thrift_util" + "grpc_test_util" ], "headers": [ "src/proto/grpc/health/v1/health.grpc.pb.h", @@ -9155,23 +9154,5 @@ ], "third_party": false, "type": "filegroup" - }, - { - "deps": [ - "grpc++_codegen_base" - ], - "headers": [ - "include/grpc++/impl/codegen/thrift_serializer.h", - "include/grpc++/impl/codegen/thrift_utils.h" - ], - "is_filegroup": true, - "language": "c++", - "name": "thrift_util", - "src": [ - "include/grpc++/impl/codegen/thrift_serializer.h", - "include/grpc++/impl/codegen/thrift_utils.h" - ], - "third_party": false, - "type": "filegroup" } ] diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index 0a9c1cc046..6be7a39d07 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -47,7 +47,6 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules 30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e third_party/gflags (v2.2.0) ec44c6c1675c25b9827aacd08c02433cccde7780 third_party/googletest (release-1.8.0) 593e917c176b5bc5aafa57bf9f6030d749d91cd5 third_party/protobuf (v3.1.0-alpha-1-326-g593e917) - bcad91771b7f0bff28a1cac1981d7ef2b9bcef3c third_party/thrift (bcad917) cacf7f1d4e3d44d871b605da3b647f07d718623f third_party/zlib (v1.2.11) 7691f773af79bf75a62d1863fd0f13ebf9dc51b1 third_party/cares/cares (1.12.0) EOF diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj index 165ebe64f5..4958218821 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj @@ -197,8 +197,6 @@ <ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_windows.h" /> <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_utils.h" /> <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h" /> - <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\thrift_serializer.h" /> - <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\thrift_utils.h" /> </ItemGroup> <ItemGroup> <ClInclude Include="$(SolutionDir)\..\test\cpp\end2end\test_service_impl.h" /> diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters index d9aa1e3cc9..1e2a2eb97c 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters @@ -186,12 +186,6 @@ <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h"> <Filter>include\grpc++\impl\codegen</Filter> </ClInclude> - <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\thrift_serializer.h"> - <Filter>include\grpc++\impl\codegen</Filter> - </ClInclude> - <ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\thrift_utils.h"> - <Filter>include\grpc++\impl\codegen</Filter> - </ClInclude> </ItemGroup> <ItemGroup> <ClInclude Include="$(SolutionDir)\..\test\cpp\end2end\test_service_impl.h"> |