@@ -107,23 +107,29 @@ the following commands to your `WORKSPACE` file:
107107# Add the necessary Starlark functions to fetch google-cloud-cpp-spanner.
108108load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
109109
110- # Update the version and SHA256 digest as needed.
110+ # Fetch the Cloud Spanner C++ library.
111+ # NOTE: Update this version and SHA256 as needed.
111112http_archive(
112113 name = "com_github_googleapis_google_cloud_cpp_spanner",
113114 sha256 = "a833d3c1a6d127132e961350829babac521b62b4c837b88d7c219b400e98fed1",
114115 strip_prefix = "google-cloud-cpp-spanner-0.8.0",
115116 url = "https://github.com/googleapis/google-cloud-cpp-spanner/archive/v0.8.0.tar.gz",
116117)
117118
118- # Configure @com_google_googleapis to only compile C++ and gRPC:
119+ # Call a function to load the Cloud Spanner C++ library's deps
120+ load("@com_github_googleapis_google_cloud_cpp_spanner//bazel:google_cloud_cpp_spanner_deps.bzl", "google_cloud_cpp_spanner_deps")
121+ google_cloud_cpp_spanner_deps()
122+
123+ # (optional) Only generate C++ from the protos.
119124load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
120125switched_rules_by_language(
121126 name = "com_google_googleapis_imports",
122- cc = True, # C++ support is only "Partially implemented", roll our own.
127+ cc = True,
123128 grpc = True,
124129)
125130
126- # Call the corresponding workspace function for each dependency
131+ # Load indirect dependencies due to
132+ # https://github.com/bazelbuild/bazel/issues/1943
127133load("@com_github_googleapis_google_cloud_cpp_common//bazel:google_cloud_cpp_common_deps.bzl", "google_cloud_cpp_common_deps")
128134google_cloud_cpp_common_deps()
129135load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
0 commit comments