Skip to content

Commit b127294

Browse files
committed
update bazel stuff
1 parent 2f4ad9a commit b127294

6 files changed

+25
-27
lines changed

repositories.bzl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def protobuf_repositories(bind=True):
109109
)
110110

111111
http_archive(
112-
name = "protobuf_git",
112+
name = "com_google_protobuf",
113113
strip_prefix = "protobuf-" + PROTOBUF_COMMIT,
114114
url = "https://github.com/google/protobuf/archive/v" + PROTOBUF_COMMIT + ".tar.gz",
115115
sha256 = PROTOBUF_SHA256,
@@ -118,32 +118,32 @@ def protobuf_repositories(bind=True):
118118
if bind:
119119
native.bind(
120120
name = "protoc",
121-
actual = "@protobuf_git//:protoc",
121+
actual = "@com_google_protobuf//:protoc",
122122
)
123123

124124
native.bind(
125125
name = "protobuf",
126-
actual = "@protobuf_git//:protobuf",
126+
actual = "@com_google_protobuf//:protobuf",
127127
)
128128

129129
native.bind(
130130
name = "cc_wkt_protos",
131-
actual = "@protobuf_git//:cc_wkt_protos",
131+
actual = "@com_google_protobuf//:cc_wkt_protos",
132132
)
133133

134134
native.bind(
135135
name = "cc_wkt_protos_genproto",
136-
actual = "@protobuf_git//:cc_wkt_protos_genproto",
136+
actual = "@com_google_protobuf//:cc_wkt_protos_genproto",
137137
)
138138

139139
native.bind(
140140
name = "protobuf_compiler",
141-
actual = "@protobuf_git//:protoc_lib",
141+
actual = "@com_google_protobuf//:protoc_lib",
142142
)
143143

144144
native.bind(
145145
name = "protobuf_clib",
146-
actual = "@protobuf_git//:protoc_lib",
146+
actual = "@com_google_protobuf//:protoc_lib",
147147
)
148148

149149
GOOGLETEST_COMMIT = "43863938377a9ea1399c0596269e0890b5c5515a"
@@ -238,7 +238,7 @@ cc_library(
238238
GOOGLEAPIS_COMMIT = "32a10f69e2c9ce15bba13ab1ff928bacebb25160" # May 20, 2019
239239
GOOGLEAPIS_SHA256 = "6861efa8619579e06e70dd4765cdf6cef1ecad6a1a2026ad750541e99552bf71"
240240

241-
def googleapis_repositories(protobuf_repo="@protobuf_git//", bind=True):
241+
def googleapis_repositories(protobuf_repo="@com_google_protobuf//", bind=True):
242242
BUILD = """
243243
# Copyright 2016 Google Inc. All Rights Reserved.
244244
#

test/BUILD

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#
1717
package(default_visibility = ["//visibility:public"])
1818

19-
load("@protobuf_git//:protobuf.bzl", "cc_proto_library")
20-
2119
cc_test(
2220
name = "http_template_test",
2321
size = "small",
@@ -82,16 +80,16 @@ cc_test(
8280
],
8381
)
8482

85-
cc_proto_library(
86-
name = "bookstore_test_proto",
83+
proto_library(
84+
name = "bookstore_proto",
8785
testonly = 1,
8886
srcs = ["bookstore.proto"],
89-
include = ".",
90-
default_runtime = "//external:protobuf",
91-
protoc = "//external:protoc",
92-
deps = [
93-
"//external:cc_wkt_protos",
94-
],
87+
)
88+
89+
cc_proto_library(
90+
name = "bookstore_cc_proto",
91+
testonly = 1,
92+
deps = [":bookstore_proto"],
9593
)
9694

9795
cc_test(
@@ -136,7 +134,7 @@ cc_library(
136134
"request_translator_test_base.h",
137135
],
138136
deps = [
139-
":bookstore_test_proto",
137+
":bookstore_cc_proto",
140138
":test_common",
141139
"//external:googletest",
142140
"//external:protobuf",
@@ -156,7 +154,7 @@ cc_test(
156154
"testdata/bookstore_service.pb.txt",
157155
],
158156
deps = [
159-
":bookstore_test_proto",
157+
":bookstore_cc_proto",
160158
":request_translator_test_base",
161159
":test_common",
162160
"//external:googletest_main",
@@ -174,7 +172,7 @@ cc_test(
174172
"testdata/bookstore_service.pb.txt",
175173
],
176174
deps = [
177-
":bookstore_test_proto",
175+
":bookstore_cc_proto",
178176
":request_translator_test_base",
179177
"//external:googletest_main",
180178
"//src:request_stream_translator",
@@ -191,7 +189,7 @@ cc_test(
191189
"testdata/bookstore_service.pb.txt",
192190
],
193191
deps = [
194-
":bookstore_test_proto",
192+
":bookstore_cc_proto",
195193
":request_translator_test_base",
196194
":test_common",
197195
"//external:googletest_main",
@@ -222,7 +220,7 @@ cc_test(
222220
"testdata/bookstore_service.pb.txt",
223221
],
224222
deps = [
225-
":bookstore_test_proto",
223+
":bookstore_cc_proto",
226224
":test_common",
227225
"//external:googletest_main",
228226
"//src:message_reader",

test/json_request_translator_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <string>
2121
#include <vector>
2222

23-
#include "bookstore.pb.h"
23+
#include "test/bookstore.pb.h"
2424
#include "google/protobuf/io/zero_copy_stream.h"
2525
#include "gtest/gtest.h"
2626
#include "proto_stream_tester.h"

test/request_message_translator_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <memory>
2020
#include <string>
2121

22-
#include "bookstore.pb.h"
22+
#include "test/bookstore.pb.h"
2323
#include "google/protobuf/struct.pb.h"
2424
#include "google/protobuf/type.pb.h"
2525
#include "gtest/gtest.h"

test/request_stream_translator_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <memory>
2020
#include <string>
2121

22-
#include "bookstore.pb.h"
22+
#include "test/bookstore.pb.h"
2323
#include "google/protobuf/type.pb.h"
2424
#include "gtest/gtest.h"
2525
#include "request_translator_test_base.h"

test/response_to_json_translator_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <string>
2222
#include <vector>
2323

24-
#include "bookstore.pb.h"
24+
#include "test/bookstore.pb.h"
2525
#include "google/protobuf/io/zero_copy_stream.h"
2626
#include "google/protobuf/text_format.h"
2727
#include "grpc_transcoding/type_helper.h"

0 commit comments

Comments
 (0)