Skip to content

Commit 83f982d

Browse files
committed
Eliminate conflicting generating rules
1 parent 78cb92f commit 83f982d

File tree

4 files changed

+27
-34
lines changed

4 files changed

+27
-34
lines changed

bzl/cpp/class.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ CLASS = struct(
55
name = "cpp",
66
short_name = "cpp",
77
# cc_*.pb.* outputs need to output to genfiles (not binfiles)
8-
# for some reason.
8+
# for some reason. Mentioned in
9+
# http://bazel.io/docs/skylark/lib/globals.html#rule.output_to_genfiles.
910
output_to_genfiles = True,
1011

1112
protobuf = struct(

examples/helloworld/cpp/BUILD

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ load("//bzl:cpp/class.bzl", CPP = "CLASS")
66
cc_test(
77
name = "test",
88
size = "small",
9+
tags = ["exclusive"],
910
srcs = ["greeter_client_test.cc"],
1011
copts = ["-Iexternal/gtest/include"],
1112
deps = [
@@ -31,22 +32,13 @@ cc_binary(
3132
name = "server",
3233
srcs = ["greeter_server.cc",],
3334
deps = ["//examples/helloworld/proto:cpp"],
34-
35-
# If this variant is used, the protos in proto:srcs will be copied
36-
# to the same namespace as the calling build rule (in this case
37-
# examples/helloworld/cpp) before protoc'ing, affecting the name
38-
# of the compiled protobuf sources. In this case the header
39-
# include statements need to be changed to
40-
# "examples/helloworld/cpp/helloworld.pb.h"...
41-
#
42-
#deps = [":protolib"],
4335
)
4436

45-
cc_proto_library(
46-
name = 'protolib',
47-
protos = [
48-
'//examples/helloworld/proto:srcs',
49-
],
50-
with_grpc = True,
51-
verbose = 0,
52-
)
37+
# cc_proto_library(
38+
# name = 'protolib',
39+
# protos = [
40+
# '//examples/helloworld/proto:srcs',
41+
# ],
42+
# with_grpc = True,
43+
# verbose = 0,
44+
# )

examples/helloworld/go/client/BUILD

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ go_binary(
1212
] + GO.grpc.compile_deps,
1313
)
1414

15-
# if you depend on this rule, the proto sources get copied to the
16-
# namespace of the calling BUILD file (examples/helloworld/go/client),
17-
# affecting the go "import" naming.
18-
go_proto_library(
19-
name = 'protolib',
20-
protos = [
21-
'//examples/helloworld/proto:srcs',
22-
],
23-
with_grpc = True,
24-
verbose = 0,
25-
)
15+
# # if you depend on this rule, the proto sources get copied to the
16+
# # namespace of the calling BUILD file (examples/helloworld/go/client),
17+
# # affecting the go "import" naming.
18+
# go_proto_library(
19+
# name = 'protolib',
20+
# protos = [
21+
# '//examples/helloworld/proto:srcs',
22+
# ],
23+
# with_grpc = True,
24+
# verbose = 0,
25+
# )

examples/helloworld/proto/BUILD

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ cc_proto_library(
4848
with_grpc = True,
4949
)
5050

51-
grpc_gateway_proto_library(
52-
name = "gw",
53-
protos = ["helloworld_gateway.proto"],
54-
verbose = 0,
55-
)
51+
# grpc_gateway_proto_library(
52+
# name = "gw",
53+
# protos = ["helloworld_gateway.proto"],
54+
# verbose = 0,
55+
# )
5656

5757
# py_proto_library(
5858
# name = "pylib",

0 commit comments

Comments
 (0)