From f722ee21acdc190f456a64173647c38bffabbdb8 Mon Sep 17 00:00:00 2001 From: Yi Wang Date: Mon, 12 Dec 2016 04:19:34 +0000 Subject: [PATCH] Do not use https://github.com/pubref/rules_protobuf, but use https://github.com/google/protobuf/ as external dependency for protobuf --- .pre-commit-config.yaml | 3 ++- WORKSPACE | 17 ++++++----------- third_party/protobuf_test/BUILD | 11 +++++------ 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 942669c41ff..641ac583b53 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,8 @@ - repo: https://github.com/reyoung/mirrors-yapf.git sha: v0.13.2 hooks: - - id: yapf + - id: yapf + files: (.*\.(py|bzl)|BUILD|.*\.BUILD)$ # Bazel BUILD files follow Python syntax. - repo: https://github.com/pre-commit/pre-commit-hooks sha: 7539d8bd1a00a3c1bfd34cdb606d3a6372e83469 hooks: diff --git a/WORKSPACE b/WORKSPACE index 38e1628d11c..d6ae2af8eb6 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,10 +1,9 @@ -# External dependency to grpc-enabled Google-styleprotobuf bulding -# rules. This method comes from -# https://github.com/pubref/rules_protobuf#usage. -git_repository( - name = "org_pubref_rules_protobuf", - remote = "https://github.com/pubref/rules_protobuf", - tag = "v0.7.1", +# External dependency to Google protobuf. +http_archive( + name = "protobuf", + url = "http://github.com/google/protobuf/archive/v3.1.0.tar.gz", + sha256 = "0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7", + strip_prefix = "protobuf-3.1.0", ) # External dependency to gtest 1.7.0. This method comes from @@ -16,7 +15,3 @@ new_http_archive( build_file = "third_party/gtest.BUILD", strip_prefix = "googletest-release-1.7.0", ) - - -load("@org_pubref_rules_protobuf//cpp:rules.bzl", "cpp_proto_repositories") -cpp_proto_repositories() diff --git a/third_party/protobuf_test/BUILD b/third_party/protobuf_test/BUILD index 6208b870829..46f769da5f5 100644 --- a/third_party/protobuf_test/BUILD +++ b/third_party/protobuf_test/BUILD @@ -1,13 +1,12 @@ licenses(["notice"]) # Apache 2.0 -load("@org_pubref_rules_protobuf//cpp:rules.bzl", "cpp_proto_library") +load("@protobuf//:protobuf.bzl", "cc_proto_library") -cpp_proto_library( +cc_proto_library( name = "example_proto", - protos = [ - "example.proto" - ], - with_grpc = True, + srcs = ["example.proto"], + protoc = "@protobuf//:protoc", + default_runtime = "@protobuf//:protobuf", ) cc_library( -- GitLab