Skip to content

Commit f722ee2

Browse files
committed
Do not use https://github.com/pubref/rules_protobuf, but use https://github.com/google/protobuf/ as external dependency for protobuf
1 parent 9b94773 commit f722ee2

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
- repo: https://github.com/reyoung/mirrors-yapf.git
77
sha: v0.13.2
88
hooks:
9-
- id: yapf
9+
- id: yapf
10+
files: (.*\.(py|bzl)|BUILD|.*\.BUILD)$ # Bazel BUILD files follow Python syntax.
1011
- repo: https://github.com/pre-commit/pre-commit-hooks
1112
sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469
1213
hooks:

WORKSPACE

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# External dependency to grpc-enabled Google-styleprotobuf bulding
2-
# rules. This method comes from
3-
# https://github.com/pubref/rules_protobuf#usage.
4-
git_repository(
5-
name = "org_pubref_rules_protobuf",
6-
remote = "https://github.com/pubref/rules_protobuf",
7-
tag = "v0.7.1",
1+
# External dependency to Google protobuf.
2+
http_archive(
3+
name = "protobuf",
4+
url = "http://github.com/google/protobuf/archive/v3.1.0.tar.gz",
5+
sha256 = "0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7",
6+
strip_prefix = "protobuf-3.1.0",
87
)
98

109
# External dependency to gtest 1.7.0. This method comes from
@@ -16,7 +15,3 @@ new_http_archive(
1615
build_file = "third_party/gtest.BUILD",
1716
strip_prefix = "googletest-release-1.7.0",
1817
)
19-
20-
21-
load("@org_pubref_rules_protobuf//cpp:rules.bzl", "cpp_proto_repositories")
22-
cpp_proto_repositories()

third_party/protobuf_test/BUILD

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
licenses(["notice"]) # Apache 2.0
22

3-
load("@org_pubref_rules_protobuf//cpp:rules.bzl", "cpp_proto_library")
3+
load("@protobuf//:protobuf.bzl", "cc_proto_library")
44

5-
cpp_proto_library(
5+
cc_proto_library(
66
name = "example_proto",
7-
protos = [
8-
"example.proto"
9-
],
10-
with_grpc = True,
7+
srcs = ["example.proto"],
8+
protoc = "@protobuf//:protoc",
9+
default_runtime = "@protobuf//:protobuf",
1110
)
1211

1312
cc_library(

0 commit comments

Comments
 (0)