From 950f5e42054bdc7a5beeeabf6e839aa4296786ce Mon Sep 17 00:00:00 2001 From: James O'Kane Date: Thu, 8 Mar 2018 22:30:44 -0800 Subject: Replace //:protoc and similar default macro arguments with @com_google_protobuf prefixed versions. This allows them to work in 3rd party repositories. Fix a bad visibility rule. :hidden does not exist, but :private does. --- BUILD | 2 +- protobuf.bzl | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/BUILD b/BUILD index ee81c759..069b28e4 100644 --- a/BUILD +++ b/BUILD @@ -254,7 +254,7 @@ internal_copied_filegroup( srcs = WELL_KNOWN_PROTOS, dest = "", strip_prefix = "src", - visibility = ["//visibility:hidden"], + visibility = ["//visibility:private"], ) [proto_library( diff --git a/protobuf.bzl b/protobuf.bzl index 6aed44a4..1c2d63c6 100644 --- a/protobuf.bzl +++ b/protobuf.bzl @@ -171,10 +171,10 @@ def cc_proto_library( deps=[], cc_libs=[], include=None, - protoc="//:protoc", + protoc="@com_google_protobuf//:protoc", internal_bootstrap_hack=False, use_grpc_plugin=False, - default_runtime="//:protobuf", + default_runtime="@com_google_protobuf//:protobuf", **kargs): """Bazel rule to create a C++ protobuf library from proto source files @@ -317,8 +317,8 @@ def py_proto_library( py_libs=[], py_extra_srcs=[], include=None, - default_runtime="//:protobuf_python", - protoc="//:protoc", + default_runtime="@com_google_protobuf//:protobuf_python", + protoc="@com_google_protobuf//:protoc", use_grpc_plugin=False, **kargs): """Bazel rule to create a Python protobuf library from proto source files -- cgit v1.2.3