Skip to content

Commit

Permalink
use opentelemetry-proto from bcr
Browse files Browse the repository at this point in the history
  • Loading branch information
keith committed Mar 25, 2024
1 parent 2816490 commit ce8c1f9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
4 changes: 1 addition & 3 deletions modules/opentelemetry-cpp/1.14.2/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "curl", version = "8.4.0")
bazel_dep(name = "grpc", version = "1.56.3.bcr.1", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "github_nlohmann_json")
bazel_dep(name = "opentelemetry-proto", version = "1.1.0", repo_name = "com_github_opentelemetry_proto")
bazel_dep(name = "opentracing-cpp", version = "1.6.0", repo_name = "com_github_opentracing")
bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "prometheus-cpp", version = "1.2.4", repo_name = "com_github_jupp0r_prometheus_cpp")
Expand All @@ -25,6 +26,3 @@ bazel_dep(name = "zlib", version = "1.3.1.bcr.1")

bazel_dep(name = "google_benchmark", version = "1.8.3", dev_dependency = True, repo_name = "com_github_google_benchmark")
bazel_dep(name = "googletest", version = "1.14.0.bcr.1", dev_dependency = True, repo_name = "com_google_googletest")

non_module_deps = use_extension("//bazel:non_module_deps.bzl", "non_module_deps")
use_repo(non_module_deps, "com_github_opentelemetry_proto")
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/MODULE.bazel
@@ -0,0 +1,30 @@
@@ -0,0 +1,28 @@
+module(
+ name = "opentelemetry-cpp",
+ version = "1.14.2",
Expand All @@ -18,6 +18,7 @@
+bazel_dep(name = "curl", version = "8.4.0")
+bazel_dep(name = "grpc", version = "1.56.3.bcr.1", repo_name = "com_github_grpc_grpc")
+bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "github_nlohmann_json")
+bazel_dep(name = "opentelemetry-proto", version = "1.1.0", repo_name = "com_github_opentelemetry_proto")
+bazel_dep(name = "opentracing-cpp", version = "1.6.0", repo_name = "com_github_opentracing")
+bazel_dep(name = "platforms", version = "0.0.8")
+bazel_dep(name = "prometheus-cpp", version = "1.2.4", repo_name = "com_github_jupp0r_prometheus_cpp")
Expand All @@ -28,26 +29,3 @@
+
+bazel_dep(name = "google_benchmark", version = "1.8.3", dev_dependency = True, repo_name = "com_github_google_benchmark")
+bazel_dep(name = "googletest", version = "1.14.0.bcr.1", dev_dependency = True, repo_name = "com_google_googletest")
+
+non_module_deps = use_extension("//bazel:non_module_deps.bzl", "non_module_deps")
+use_repo(non_module_deps, "com_github_opentelemetry_proto")

--- /dev/null
+++ b/bazel/non_module_deps.bzl
@@ -0,0 +1,16 @@
+"""Load dependencies that aren't supported in bzlmod yet."""
+
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+def _non_module_deps_impl(_):
+ http_archive(
+ name = "com_github_opentelemetry_proto",
+ build_file = "@io_opentelemetry_cpp//bazel:opentelemetry_proto.BUILD",
+ sha256 = "df491a05f3fcbf86cc5ba5c9de81f6a624d74d4773d7009d573e37d6e2b6af64",
+ strip_prefix = "opentelemetry-proto-1.1.0",
+ urls = [
+ "https://github.com/open-telemetry/opentelemetry-proto/archive/v1.1.0.tar.gz",
+ ],
+ )
+
+non_module_deps = module_extension(implementation = _non_module_deps_impl)
2 changes: 1 addition & 1 deletion modules/opentelemetry-cpp/1.14.2/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"url": "https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.14.2.tar.gz",
"patch_strip": 1,
"patches": {
"0001-Add-MODULE.bazel.patch": "sha256-ii7+OaxMYnaGn2Y6El5fHy2OCnKlx6wxn1YGX09/bBU="
"0001-Add-MODULE.bazel.patch": "sha256-JAtjQwrqEgzpNN6oPz4n6Cm+i2uOh4Sm2XL3HBMCTkA="
}
}

0 comments on commit ce8c1f9

Please sign in to comment.