Skip to content

Commit a0e66a1

Browse files
committed
changes...
1 parent afb4b42 commit a0e66a1

File tree

8 files changed

+329
-56
lines changed

8 files changed

+329
-56
lines changed

.bazelrc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,25 +108,25 @@ common --incompatible_disable_target_provider_fields
108108
common --incompatible_struct_has_no_methods
109109
common --incompatible_config_setting_private_default_visibility
110110
# common --incompatible_stop_exporting_language_modules
111-
# common --incompatible_disallow_empty_glob
111+
common --incompatible_disallow_empty_glob
112112
# common --incompatible_disable_starlark_host_transitions
113113

114114
build --nolegacy_important_outputs
115115

116116
build --@curl//:use_mbedtls=true
117117
# build --@curl//:http_only=true
118118

119-
mod --lockfile_mode=update
119+
mod --lockfile_mode=refresh
120120

121121
# Select clang-cl to be the default compiler on Windows
122122
build:windows --config=clang-cl
123123

124124
# See MODULE.bazel where we've disabled the platform/toolchain setup, but made it back here
125125
build:clang-cl --host_platform=@otel_sdk//:x64_windows-clang-cl
126126
build:clang-cl --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
127-
build:clang-cl --per_file_copt="external/protobuf\\+/.*@-Wno-invalid-offsetof"
128-
build:clang-cl --host_per_file_copt="external/protobuf\\+/.*@-Wno-invalid-offsetof"
129-
build:clang-cl --per_file_copt="external/c-ares\\+/.*@-Wno-macro-redefined"
130-
build:clang-cl --host_per_file_copt="external/c-ares\\+/.*@-Wno-macro-redefined"
127+
build:clang-cl --per_file_copt="protobuf\\+/.*@-Wno-invalid-offsetof"
128+
build:clang-cl --host_per_file_copt="protobuf\\+/.*@-Wno-invalid-offsetof"
129+
build:clang-cl --per_file_copt="c-ares\\+/.*@-Wno-macro-redefined"
130+
build:clang-cl --host_per_file_copt="c-ares\\+/.*@-Wno-macro-redefined"
131131

132132
build --incompatible_strict_action_env

MODULE.bazel

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ bazel_dep(name = "googletest", version = "1.15.2") #, dev_dependency = True)
1414
bazel_dep(name = "grpc", version = "1.66.0.bcr.2") #, repo_name = "com_github_grpc_grpc")
1515
single_version_override(
1616
module_name = "grpc",
17+
patch_strip = 1,
1718
# https://github.com/grpc/grpc/pull/37534
1819
# https://github.com/grpc/grpc/pull/37534.diff
1920
patches = ["bazel/grpc_bzlmod.diff"],
20-
patch_strip = 1,
2121
)
22+
2223
bazel_dep(name = "nlohmann_json", version = "3.11.3")
2324
bazel_dep(name = "platforms", version = "0.0.10")
2425
bazel_dep(name = "rules_cc", version = "0.0.10")
@@ -58,6 +59,17 @@ use_repo(
5859
"local_config_cc",
5960
)
6061

62+
# This is needed only for most of the `bazel mod xxx` functions to work.
63+
#
64+
# Otherwise it complaints with
65+
#
66+
# ERROR: in tag at https://bcr.bazel.build/modules/grpc-java/1.62.2/MODULE.bazel:89:15: no repository visible as
67+
# '@com_google_protobuf_javalite' to the repository '@@grpc-java+', but referenced by label
68+
# '@com_google_protobuf_javalite//:protobuf_javalite' in attribute 'target' of tag 'override'.
69+
# Is the module 'grpc-java' missing a bazel_dep or use_repo(..., "com_google_protobuf_javalite")?.
70+
#
71+
bazel_dep(name = "grpc-java", version = "1.64.0")
72+
6173
multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool")
6274
multitool.hub(lockfile = "@otel_sdk//:multitool.lock.json")
6375
use_repo(multitool, "multitool")

otel_sdk_build.cmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ goto:eof
2525

2626
:test
2727
REM singleton_test does not work when linked as static under Windows
28-
"%__BAZEL__%" test --profile=0.nodll.tracing.json --//:with_dll=false -- ... -//api/test/singleton:singleton_test || goto:error
29-
"%__BAZEL__%" build --profile=1.all.tracing.json --//:with_dll=true -- ... -otel_sdk_zip || goto:error
30-
"%__BAZEL__%" test --profile=2.dbg.tracing.json --//:with_dll=true -c dbg -- ... -otel_sdk_zip || goto:error
31-
"%__BAZEL__%" test --profile=3.fastbuild.tracing.json --//:with_dll=true -c fastbuild -- ... -otel_sdk_zip || goto:error
32-
"%__BAZEL__%" test --profile=4.opt.tracing.json --//:with_dll=true -c opt -- ... -otel_sdk_zip || goto:error
28+
"%__BAZEL__%" test -k --profile=0.nodll.tracing.json --//:with_dll=false -- ... -//api/test/singleton:singleton_test || echo goto:error
29+
"%__BAZEL__%" build -k --profile=1.all.tracing.json --//:with_dll=true -- ... -otel_sdk_zip || echo goto:error
30+
"%__BAZEL__%" test -k --profile=2.dbg.tracing.json --//:with_dll=true -c dbg -- ... -otel_sdk_zip || echo goto:error
31+
"%__BAZEL__%" test -k --profile=3.fastbuild.tracing.json --//:with_dll=true -c fastbuild -- ... -otel_sdk_zip || echo goto:error
32+
"%__BAZEL__%" test -k --profile=4.opt.tracing.json --//:with_dll=true -c opt -- ... -otel_sdk_zip || echo goto:error
3333
goto:eof
3434

3535
:zip
36-
"%__BAZEL__%" run --profile=5.pkg.tracing.json --//:with_dll=true make_otel_sdk || goto:error
36+
"%__BAZEL__%" run --profile=5.pkg.tracing.json --//:with_dll=true make_otel_sdk || echo goto:error
3737
goto:eof
3838

3939
:shutdown

x/.bazelrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
build --@otel_sdk//:with_dll
21
import %workspace%/../.bazelrc
32
try-import %workspace%/../../top.bazelrc

x/MODULE.bazel

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,75 @@
1-
module(name = "otel_sdk_x", version = "0.1")
2-
bazel_dep(name = "curl", version = "8.8.0.bcr.1")
1+
module(
2+
name = "otel_sdk_x",
3+
version = "0.1",
4+
)
5+
36
bazel_dep(name = "otel_sdk", version = "")
4-
local_path_override(module_name = "otel_sdk", path = "..")
7+
local_path_override(
8+
module_name = "otel_sdk",
9+
path = "..",
10+
)
11+
12+
## Almost copied verbatim from ../MODULE.bazel
13+
14+
bazel_dep(name = "abseil-cpp", version = "20240722.0")
15+
16+
#bazel_dep(name = "aspect_bazel_lib", version = "2.8.1")
17+
bazel_dep(name = "bazel_skylib", version = "1.7.1")
18+
bazel_dep(name = "boringssl", version = "0.0.0-20240530-2db0eb3")
19+
bazel_dep(name = "curl", version = "8.8.0.bcr.1")
20+
21+
#bazel_dep(name = "depend_on_what_you_use", version = "0.4.0")
22+
bazel_dep(name = "google_benchmark", version = "1.8.5") #, dev_dependency = True)
23+
bazel_dep(name = "googletest", version = "1.15.2") #, dev_dependency = True)
24+
bazel_dep(name = "grpc", version = "1.66.0.bcr.1") #, repo_name = "com_github_grpc_grpc")
25+
single_version_override(
26+
module_name = "grpc",
27+
patch_strip = 1,
28+
# https://github.com/grpc/grpc/pull/37534
29+
# https://github.com/grpc/grpc/pull/37534.diff
30+
patches = ["bazel/grpc_bzlmod.diff"],
31+
)
32+
33+
bazel_dep(name = "nlohmann_json", version = "3.11.3")
34+
bazel_dep(name = "platforms", version = "0.0.10")
35+
bazel_dep(name = "rules_cc", version = "0.0.9")
36+
bazel_dep(name = "rules_pkg", version = "1.0.1")
37+
bazel_dep(name = "rules_proto", version = "6.0.2")
38+
bazel_dep(name = "zlib", version = "1.3.1.bcr.3")
39+
40+
#bazel_dep(name = "opentracing-cpp", version = "1.6.0")
41+
bazel_dep(name = "rules_multitool", version = "0.12.0")
42+
bazel_dep(name = "opentelemetry-proto", version = "1.3.2")
43+
archive_override(
44+
module_name = "opentelemetry-proto",
45+
integrity = "sha256-wGnA2WE3zwBdNEEfpn3TtvH4xkrx5/sv4AiaQcQlrNc=",
46+
patch_strip = 1,
47+
# Copied from https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/opentelemetry-proto/1.3.1/patches
48+
patches = ["bazel/opentelemetry-proto.patch"],
49+
strip_prefix = "opentelemetry-proto-1.3.2",
50+
urls = "https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/v1.3.2.tar.gz",
51+
)
52+
53+
bazel_dep(name = "prometheus-cpp", version = "1.2.4")
54+
archive_override(
55+
module_name = "prometheus-cpp",
56+
integrity = "sha256-uElFYvmIrzXsElYbbrNS0Mvtfj99aKae2nhsZhCvxG4=",
57+
strip_prefix = "prometheus-cpp-6492e820cdff7e7345d46d82b43735aaea542098",
58+
urls = "https://github.com/jupp0r/prometheus-cpp/archive/6492e820cdff7e7345d46d82b43735aaea542098.zip",
59+
)
560

661
use_repo(
762
use_extension("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure_extension"),
863
"local_config_cc",
964
)
65+
66+
# This is needed only for most of the `bazel mod xxx` functions to work.
67+
#
68+
# Otherwise it complaints with
69+
#
70+
# ERROR: in tag at https://bcr.bazel.build/modules/grpc-java/1.62.2/MODULE.bazel:89:15: no repository visible as
71+
# '@com_google_protobuf_javalite' to the repository '@@grpc-java+', but referenced by label
72+
# '@com_google_protobuf_javalite//:protobuf_javalite' in attribute 'target' of tag 'override'.
73+
# Is the module 'grpc-java' missing a bazel_dep or use_repo(..., "com_google_protobuf_javalite")?.
74+
#
75+
bazel_dep(name = "grpc-java", version = "1.64.0")

0 commit comments

Comments
 (0)