diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 942669c41ff154c91e88c937739b0f604f21d545..641ac583b53413909899772b04bdd92b273671cb 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 38e1628d11c20b5b09bf4e68ad89dad8aa71bdc0..d6ae2af8eb678a2e399220abefe825ab3975ff69 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 6208b870829db4470c4b247836de22c1a5e56a2d..46f769da5f5004ef2c5f6ecee43bc8965c1d811d 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(