-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
333 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
module( | ||
name = "google-cloud-cpp", | ||
version = "2.16.0", | ||
compatibility_level = 1, | ||
repo_name = "google_cloud_cpp", | ||
) | ||
|
||
bazel_dep( | ||
name = "abseil-cpp", | ||
version = "20230802.1", | ||
repo_name = "com_google_absl", | ||
) | ||
bazel_dep( | ||
name = "bazel_skylib", | ||
version = "1.5.0", | ||
) | ||
bazel_dep( | ||
name = "boringssl", | ||
version = "0.0.0-20230215-5c22014", | ||
) | ||
bazel_dep( | ||
name = "curl", | ||
version = "8.4.0.bcr.1", | ||
repo_name = "com_github_curl_curl", | ||
) | ||
bazel_dep( | ||
name = "grpc", | ||
version = "1.62.1", | ||
repo_name = "com_github_grpc_grpc", | ||
) | ||
bazel_dep( | ||
name = "nlohmann_json", | ||
version = "3.11.2", | ||
repo_name = "com_github_nlohmann_json", | ||
) | ||
bazel_dep( | ||
name = "opentelemetry-cpp", | ||
version = "1.14.2", | ||
repo_name = "io_opentelemetry_cpp", | ||
) | ||
bazel_dep( | ||
name = "platforms", | ||
version = "0.0.9", | ||
) | ||
bazel_dep( | ||
name = "rules_cc", | ||
version = "0.0.9", | ||
) | ||
# -- bazel_dep definitions -- # | ||
|
||
|
||
non_module_deps = use_extension("//bazel:extensions.bzl", "non_module_deps") | ||
use_repo( | ||
non_module_deps, | ||
"com_google_googleapis", | ||
) | ||
|
||
googleapis_ext = use_extension("//bazel:googleapis_ext.bzl", "googleapis_ext") | ||
use_repo( | ||
googleapis_ext, | ||
"com_google_googleapis_imports", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
diff --git a/bazel/extensions.bzl b/bazel/extensions.bzl | ||
new file mode 100644 | ||
index 0000000000..2002631bc7 | ||
--- /dev/null | ||
+++ b/bazel/extensions.bzl | ||
@@ -0,0 +1,26 @@ | ||
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
+load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
+ | ||
+def non_module_deps_impl(_ctx): | ||
+ # Load the googleapis dependency. | ||
+ maybe( | ||
+ http_archive, | ||
+ name = "com_google_googleapis", | ||
+ urls = [ | ||
+ "https://storage.googleapis.com/cloud-cpp-community-archive/com_google_googleapis/d482d7e5793b7444260526ca813b5d1e8b3be582.tar.gz", | ||
+ "https://github.com/googleapis/googleapis/archive/d482d7e5793b7444260526ca813b5d1e8b3be582.tar.gz", | ||
+ ], | ||
+ sha256 = "60ce1e426265b373b4e2f60241c328865a2061a5304c5e7fb9afb8f17bc68520", | ||
+ strip_prefix = "googleapis-d482d7e5793b7444260526ca813b5d1e8b3be582", | ||
+ build_file = Label("//bazel:googleapis.BUILD"), | ||
+ # Scaffolding for patching googleapis after download. For example: | ||
+ # patches = ["googleapis.patch"] | ||
+ # NOTE: This should only be used while developing with a new | ||
+ # protobuf message. No changes to `patches` should ever be | ||
+ # committed to the main branch. | ||
+ patch_tool = "patch", | ||
+ patch_args = ["-p1"], | ||
+ patches = [], | ||
+ ) | ||
+ | ||
+non_module_deps = module_extension(implementation = non_module_deps_impl) | ||
diff --git a/bazel/googleapis_ext.bzl b/bazel/googleapis_ext.bzl | ||
new file mode 100644 | ||
index 0000000000..4802c99c51 | ||
--- /dev/null | ||
+++ b/bazel/googleapis_ext.bzl | ||
@@ -0,0 +1,8 @@ | ||
+load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language") | ||
+ | ||
+ | ||
+googleapis_ext = module_extension(implementation = lambda x: switched_rules_by_language( | ||
+ name = "com_google_googleapis_imports", | ||
+ cc = True, | ||
+ grpc = True, | ||
+) | ||
\ No newline at end of file |
65 changes: 65 additions & 0 deletions
65
modules/google-cloud-cpp/2.16.0/patches/module_dot_bazel.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- a/MODULE.bazel | ||
+++ a/MODULE.bazel | ||
@@ -0,0 +1,62 @@ | ||
+module( | ||
+ name = "google-cloud-cpp", | ||
+ version = "2.16.0", | ||
+ compatibility_level = 1, | ||
+ repo_name = "google_cloud_cpp", | ||
+) | ||
+ | ||
+bazel_dep( | ||
+ name = "abseil-cpp", | ||
+ version = "20230802.1", | ||
+ repo_name = "com_google_absl", | ||
+) | ||
+bazel_dep( | ||
+ name = "bazel_skylib", | ||
+ version = "1.5.0", | ||
+) | ||
+bazel_dep( | ||
+ name = "boringssl", | ||
+ version = "0.0.0-20230215-5c22014", | ||
+) | ||
+bazel_dep( | ||
+ name = "curl", | ||
+ version = "8.4.0.bcr.1", | ||
+ repo_name = "com_github_curl_curl", | ||
+) | ||
+bazel_dep( | ||
+ name = "grpc", | ||
+ version = "1.62.1", | ||
+ repo_name = "com_github_grpc_grpc", | ||
+) | ||
+bazel_dep( | ||
+ name = "nlohmann_json", | ||
+ version = "3.11.2", | ||
+ repo_name = "com_github_nlohmann_json", | ||
+) | ||
+bazel_dep( | ||
+ name = "opentelemetry-cpp", | ||
+ version = "1.14.2", | ||
+ repo_name = "io_opentelemetry_cpp", | ||
+) | ||
+bazel_dep( | ||
+ name = "platforms", | ||
+ version = "0.0.9", | ||
+) | ||
+bazel_dep( | ||
+ name = "rules_cc", | ||
+ version = "0.0.9", | ||
+) | ||
+# -- bazel_dep definitions -- # | ||
+ | ||
+ | ||
+non_module_deps = use_extension("//bazel:extensions.bzl", "non_module_deps") | ||
+use_repo( | ||
+ non_module_deps, | ||
+ "com_google_googleapis", | ||
+) | ||
+ | ||
+googleapis_ext = use_extension("//bazel:googleapis_ext.bzl", "googleapis_ext") | ||
+use_repo( | ||
+ googleapis_ext, | ||
+ "com_google_googleapis_imports", | ||
+) |
115 changes: 115 additions & 0 deletions
115
modules/google-cloud-cpp/2.16.0/patches/nlohmann_json.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
diff --git a/bazel/google_cloud_cpp_deps.bzl b/bazel/google_cloud_cpp_deps.bzl | ||
index c79b344d85..5d86658bc1 100644 | ||
--- a/bazel/google_cloud_cpp_deps.bzl | ||
+++ b/bazel/google_cloud_cpp_deps.bzl | ||
@@ -247,7 +247,6 @@ def google_cloud_cpp_deps(name = None): | ||
], | ||
sha256 = "d69f9deb6a75e2580465c6c4c5111b89c4dc2fa94e3a85fcd2ffcd9a143d9273", | ||
strip_prefix = "json-3.11.2", | ||
- build_file = Label("//bazel:nlohmann_json.BUILD"), | ||
) | ||
|
||
# Load google/crc32c, a library to efficiently compute CRC32C checksums. | ||
diff --git a/bazel/nlohmann_json.BUILD b/bazel/nlohmann_json.BUILD | ||
deleted file mode 100644 | ||
index c59be3ccf0..0000000000 | ||
--- a/bazel/nlohmann_json.BUILD | ||
+++ /dev/null | ||
@@ -1,27 +0,0 @@ | ||
-# Copyright 2020 Google LLC | ||
-# | ||
-# Licensed under the Apache License, Version 2.0 (the "License"); | ||
-# you may not use this file except in compliance with the License. | ||
-# You may obtain a copy of the License at | ||
-# | ||
-# https://www.apache.org/licenses/LICENSE-2.0 | ||
-# | ||
-# Unless required by applicable law or agreed to in writing, software | ||
-# distributed under the License is distributed on an "AS IS" BASIS, | ||
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-# See the License for the specific language governing permissions and | ||
-# limitations under the License. | ||
- | ||
-package(default_visibility = ["//visibility:public"]) | ||
- | ||
-licenses(["notice"]) # Apache 2.0 | ||
- | ||
-cc_library( | ||
- name = "nlohmann_json", | ||
- hdrs = glob([ | ||
- "include/nlohmann/*.hpp", | ||
- "include/nlohmann/**/*.hpp", | ||
- ]), | ||
- includes = ["include"], | ||
- visibility = ["//visibility:public"], | ||
-) | ||
diff --git a/docfx/BUILD.bazel b/docfx/BUILD.bazel | ||
index dcb5eef07f..2960304936 100644 | ||
--- a/docfx/BUILD.bazel | ||
+++ b/docfx/BUILD.bazel | ||
@@ -32,7 +32,7 @@ cc_library( | ||
}), | ||
deps = [ | ||
"@com_github_jbeder_yaml_cpp//:yaml-cpp", | ||
- "@com_github_nlohmann_json//:nlohmann_json", | ||
+ "@com_github_nlohmann_json//:json", | ||
"@com_github_zeux_pugixml//:pugixml", | ||
], | ||
) | ||
@@ -50,7 +50,7 @@ cc_library( | ||
deps = [ | ||
":docfx", | ||
"@com_github_jbeder_yaml_cpp//:yaml-cpp", | ||
- "@com_github_nlohmann_json//:nlohmann_json", | ||
+ "@com_github_nlohmann_json//:json", | ||
"@com_github_zeux_pugixml//:pugixml", | ||
], | ||
) | ||
diff --git a/generator/BUILD.bazel b/generator/BUILD.bazel | ||
index 60be2c158d..319b9a42da 100644 | ||
--- a/generator/BUILD.bazel | ||
+++ b/generator/BUILD.bazel | ||
@@ -34,7 +34,7 @@ cc_library( | ||
"//:common", | ||
"//google/cloud:google_cloud_cpp_rest_internal", | ||
"@com_github_jbeder_yaml_cpp//:yaml-cpp", | ||
- "@com_github_nlohmann_json//:nlohmann_json", | ||
+ "@com_github_nlohmann_json//:json", | ||
"@com_google_absl//absl/strings", | ||
"@com_google_absl//absl/strings:str_format", | ||
"@com_google_googleapis//:googleapis_system_includes", | ||
diff --git a/google/cloud/BUILD.bazel b/google/cloud/BUILD.bazel | ||
index 848c715d73..8ee22312cf 100644 | ||
--- a/google/cloud/BUILD.bazel | ||
+++ b/google/cloud/BUILD.bazel | ||
@@ -292,7 +292,7 @@ cc_library( | ||
"@boringssl//:crypto", | ||
"@boringssl//:ssl", | ||
"@com_github_curl_curl//:curl", | ||
- "@com_github_nlohmann_json//:nlohmann_json", | ||
+ "@com_github_nlohmann_json//:json", | ||
"@com_google_absl//absl/functional:function_ref", | ||
"@com_google_absl//absl/types:span", | ||
], | ||
diff --git a/google/cloud/storage/BUILD.bazel b/google/cloud/storage/BUILD.bazel | ||
index 5f11ee1f22..95c813bfba 100644 | ||
--- a/google/cloud/storage/BUILD.bazel | ||
+++ b/google/cloud/storage/BUILD.bazel | ||
@@ -63,7 +63,7 @@ cc_library( | ||
"@boringssl//:ssl", | ||
"@com_github_curl_curl//:curl", | ||
"@com_github_google_crc32c//:crc32c", | ||
- "@com_github_nlohmann_json//:nlohmann_json", | ||
+ "@com_github_nlohmann_json//:json", | ||
"@com_google_absl//absl/algorithm:container", | ||
"@com_google_absl//absl/strings", | ||
"@com_google_absl//absl/time", | ||
@@ -120,7 +120,7 @@ cc_library( | ||
"@boringssl//:ssl", | ||
"@com_github_curl_curl//:curl", | ||
"@com_github_google_crc32c//:crc32c", | ||
- "@com_github_nlohmann_json//:nlohmann_json", | ||
+ "@com_github_nlohmann_json//:json", | ||
"@com_google_absl//absl/strings:cord", | ||
"@com_google_absl//absl/strings:str_format", | ||
"@com_google_absl//absl/time", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
matrix: | ||
platform: | ||
- debian10 | ||
- ubuntu2004 | ||
- macos | ||
- macos_arm64 | ||
- windows | ||
bazel: | ||
- 7.x | ||
- 6.x | ||
tasks: | ||
verify_targets: | ||
name: Verify build targets | ||
platform: ${{ platform }} | ||
bazel: ${{ bazel }} | ||
build_targets: | ||
- '@google-cloud-cpp//:opentelemetry' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"url": "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz", | ||
"integrity": "sha256-fKf1g7YNKqEnRBH+07n7OIcRmy6EJEuz/GnqHbgZ5OU=", | ||
"strip_prefix": "google-cloud-cpp-2.16.0", | ||
"patches": { | ||
"googleapis.patch": "sha256-xhgjC7EOfJIO1W0OSJLyX+UsG+AU/zS9nM7Q8aST4ro=", | ||
"nlohmann_json.patch": "sha256-N2rycsdlm62VGsJNy1AUrKSpOoocof3JGjBZef28gLI=", | ||
"module_dot_bazel.patch": "sha256-bwltwUxbaolKaY6acO1g178+ZR/mXYEC+MxNNT84rV8=" | ||
}, | ||
"patch_strip": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"homepage": "https://github.com/googleapis/google-cloud-cpp", | ||
"maintainers": [ | ||
{ | ||
"email": "[email protected]", | ||
"name": "No Maintainer Specified" | ||
} | ||
], | ||
"repository": [ | ||
"github:googleapis/google-cloud-cpp" | ||
], | ||
"versions": [ | ||
"2.16.0" | ||
], | ||
"yanked_versions": {} | ||
} |