From 88c980218fabb8774e0d2bf46c101fc0c01a06cf Mon Sep 17 00:00:00 2001 From: Christian Blichmann Date: Fri, 25 Sep 2020 07:25:03 -0700 Subject: [PATCH] Build fixes for recent Bazel versions We need to add the `oss-internship-2020` and `examples/hello_sapi` directories to `.bazelignore`, so that `bazel build ...` works on a clean working copy. This is because the Bazel builds in these directories use their own `WORKSPACE.bazel` and this does not nest well, leading to all kinds of hard to debug errors. PiperOrigin-RevId: 333728800 Change-Id: Ie2e68dd39bf6f8eb21af29d8ae3ae12971b408db --- .bazelignore | 4 ++++ sandboxed_api/examples/hello_sapi/BUILD.bazel | 2 -- sandboxed_api/util/BUILD.bazel | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .bazelignore diff --git a/.bazelignore b/.bazelignore new file mode 100644 index 0000000..86eb663 --- /dev/null +++ b/.bazelignore @@ -0,0 +1,4 @@ +# Using CMake or own WORKSPACE +oss-internship-2020 +# Uses its own WORKSPACE +sandboxed_api/examples/hello_sapi diff --git a/sandboxed_api/examples/hello_sapi/BUILD.bazel b/sandboxed_api/examples/hello_sapi/BUILD.bazel index d1fd764..edb93a9 100644 --- a/sandboxed_api/examples/hello_sapi/BUILD.bazel +++ b/sandboxed_api/examples/hello_sapi/BUILD.bazel @@ -40,7 +40,6 @@ sapi_library( cc_binary( name = "hello", srcs = ["hello_main.cc"], - includes = ["."], # To find the generated header deps = [":hello_sapi"], ) @@ -50,7 +49,6 @@ cc_binary( cc_binary( name = "hello_transacted", srcs = ["hello_transacted.cc"], - includes = ["."], # To find the generated header deps = [ ":hello_sapi", "@com_google_absl//absl/memory", diff --git a/sandboxed_api/util/BUILD.bazel b/sandboxed_api/util/BUILD.bazel index d0f453c..84c0c97 100644 --- a/sandboxed_api/util/BUILD.bazel +++ b/sandboxed_api/util/BUILD.bazel @@ -46,6 +46,7 @@ cc_library( name = "statusor", hdrs = ["statusor.h"], deprecation = "Migrate to `absl::StatusOr`", + visibility = ["//visibility:public"], deps = [ "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/status:statusor",