Skip to content

Commit 26347ca

Browse files
committed
make the x test more like the top
1 parent c1b96de commit 26347ca

File tree

8 files changed

+61
-4665
lines changed

8 files changed

+61
-4665
lines changed

.bazelignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ otel_sdk.zip
1212
WORKSPACE
1313
.bazelrc
1414
otel_sdk_build.cmd
15+
.git
16+
x

.bazelrc

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,19 @@
44
build --features=parse_headers
55
build --features=layering_check
66

7-
common --incompatible_use_plus_in_repo_names
8-
97
# Don't try to build .so and .dylib shared libs (instead of static) libs on Linux/OSX
108
# For some reason, with clang-cl, it also tried to do on Windows, where dynamic linking just does not support it.
119
build --dynamic_mode=off
1210

13-
build --experimental_cc_shared_library
14-
15-
common --incompatible_disable_native_repo_rules
16-
1711
common --noenable_workspace
1812
common --remote_download_minimal
1913

2014
# Avoid using c:\windows\system32\bash.exe
2115
common:windows --shell_executable="c:\\program files\\git\\usr\\bin\\bash.exe"
2216

23-
#common --noexperimental_merged_skyframe_analysis_execution
24-
2517
common --nolegacy_external_runfiles
18+
build --nolegacy_important_outputs
19+
2620
common --skip_incompatible_explicit_targets
2721

2822
# Enable automatic configs based on platform
@@ -33,12 +27,10 @@ build --build_tag_filters=-jaeger,-opentracing,-opentracing_shim
3327
test --test_tag_filters=-jaeger,-opentracing,-opentracing_shim
3428

3529
build --experimental_convenience_symlinks=clean
36-
build --experimental_cc_implementation_deps
3730

3831
build:windows --copt="/Brepro" --copt="/guard:cf" --copt="/guard:ehcont" --copt="/Z7" --copt="/JMC-" --copt="/sdl"
39-
build:windows --host_copt="/Brepro" --host_copt="/guard:cf" --host_copt="/guard:ehcont" --host_copt="/Z7" --host_copt="/JMC-" --host_copt="/sdl"
4032
build:windows --linkopt="/Brepro" --linkopt="/guard:cf" --linkopt="/guard:ehcont" --linkopt="/DEBUG:FULL" --linkopt="/CETCOMPAT" --linkopt="/SWAPRUN:NET,CD" --linkopt="/OPT:REF,ICF" --linkopt="/RELEASE" --linkopt="/DEBUGTYPE:CV,PDATA,FIXUP"
41-
build:windows --host_linkopt="/Brepro" --host_linkopt="/guard:cf" --host_linkopt="/guard:ehcont" --host_linkopt="shell32.lib"
33+
build:windows --host_linkopt="shell32.lib"
4234
# Requires Visual Studio 2019 Build Tools installed in default location with the latest compiler (14.29.30133) for x64
4335
build:windows --action_env=BAZEL_VC_FULL_VERSION=14.29.30133 --action_env=BAZEL_WINSDK_FULL_VERSION=10.0.22621.0
4436
build:windows --host_action_env=BAZEL_VC_FULL_VERSION=14.29.30133 --host_action_env=BAZEL_WINSDK_FULL_VERSION=10.0.22621.0
@@ -79,12 +71,6 @@ common:tsan --cc_output_directory_tag=tsan
7971
# https://github.com/google/sanitizers/issues/953
8072
common:tsan --test_env=TSAN_OPTIONS=report_atomic_races=0
8173

82-
## This is what my ../top.bazelrc contains (not in the repo as local to my machine)
83-
# build --disk_cache=f:/b/d
84-
# common --repository_cache=f:/b/r
85-
# startup --output_user_root=f:/b/u
86-
try-import %workspace%/../top.bazelrc
87-
8874
test --test_size_filters=small,medium,large,enormous
8975
test --test_timeout_filters=short,moderate,long,eternal
9076
test --test_verbose_timeout_warnings
@@ -101,17 +87,18 @@ startup --windows_enable_symlinks
10187

10288
# Ideally all of these should get uncommented for further bazel migrations
10389
# This list was taken from here https://github.com/bazelbuild/bazel/releases/tag/7.0.0
90+
# common --incompatible_disable_starlark_host_transitions
91+
# common --incompatible_stop_exporting_language_modules
10492
common --incompatible_auto_exec_groups
93+
common --incompatible_config_setting_private_default_visibility
94+
common --incompatible_disable_native_repo_rules
10595
common --incompatible_disable_non_executable_java_binary
106-
common --incompatible_disallow_struct_provider_syntax
10796
common --incompatible_disable_target_provider_fields
108-
common --incompatible_struct_has_no_methods
109-
common --incompatible_config_setting_private_default_visibility
110-
# common --incompatible_stop_exporting_language_modules
11197
common --incompatible_disallow_empty_glob
112-
# common --incompatible_disable_starlark_host_transitions
113-
114-
build --nolegacy_important_outputs
98+
common --incompatible_disallow_struct_provider_syntax
99+
common --incompatible_strict_action_env
100+
common --incompatible_struct_has_no_methods
101+
common --incompatible_use_plus_in_repo_names
115102

116103
build --@curl//:use_mbedtls=true
117104
# build --@curl//:http_only=true
@@ -129,18 +116,21 @@ build:clang-cl --host_per_file_copt="protobuf\\+/.*@-Wno-invalid-offsetof"
129116
build:clang-cl --per_file_copt="c-ares\\+/.*@-Wno-macro-redefined"
130117
build:clang-cl --host_per_file_copt="c-ares\\+/.*@-Wno-macro-redefined"
131118

132-
# LLVM 1.19.1
119+
# LLVM 19.1.0
133120
# opentelemetry/logs/logger.h(76,89):
134121
# error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
135122
# detail::LogRecordSetterTrait<typename std::decay<ArgumentType>::type>::template Set(
136123
# ^
137124
build:clang-cl --copt=-Wno-missing-template-arg-list-after-template-kw
138125

139-
build --incompatible_strict_action_env
140-
141-
142126
# still does not work yet
143127
#common --incompatible_enable_proto_toolchain_resolution
144128

145129
# allow newer protobuf to compile
146-
common --experimental_google_legacy_api
130+
common --experimental_google_legacy_api
131+
132+
## This is what my ../top.bazelrc contains (not in the repo as local to my machine)
133+
# build --disk_cache=f:/b/d
134+
# common --repository_cache=f:/b/r
135+
# startup --output_user_root=f:/b/u
136+
try-import %workspace%/../top.bazelrc

bazel/opentelemetry-proto.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ index 0000000..07d6a90
77
+# Copyright The OpenTelemetry Authors
88
+# SPDX-License-Identifier: Apache-2.0
99
+
10-
+load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
10+
+load("@grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
1111
+load("@rules_proto//proto:defs.bzl", "proto_library")
1212
+
1313
+package(default_visibility = ["//visibility:public"])
@@ -167,5 +167,5 @@ index 0000000..a5a5e54
167167
+ compatibility_level = 0,
168168
+)
169169
+
170-
+bazel_dep(name = "grpc", version = "1.56.3.bcr.1", repo_name = "com_github_grpc_grpc")
171-
+bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
170+
+bazel_dep(name = "grpc", version = "1.66.0.bcr.2")
171+
+bazel_dep(name = "rules_proto", version = "6.0.2")

multitool.lock.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,36 @@
44
"binaries": [
55
{
66
"kind": "file",
7-
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.36.3/sentry-cli-Linux-aarch64",
8-
"sha256": "fbafab83e3f1b5dc9ef733524957a4c9fb3d5c607f2be0b11e9f031e36909cce",
7+
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.36.6/sentry-cli-Linux-aarch64",
8+
"sha256": "01915e5930649b9867775e1ea0807742542bb8b98268cd4921a0eb1ad6146d97",
99
"os": "linux",
1010
"cpu": "arm64"
1111
},
1212
{
1313
"kind": "file",
14-
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.36.3/sentry-cli-Linux-x86_64",
15-
"sha256": "f1cb3f3936230c20ae4ab20802614fa208063d6239f7d29e06abb0917a934118",
14+
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.36.6/sentry-cli-Linux-x86_64",
15+
"sha256": "2ee44f63b820fc3f543ea362d83047738552457db7ffb49b4757d907f40daa96",
1616
"os": "linux",
1717
"cpu": "x86_64"
1818
},
1919
{
2020
"kind": "file",
21-
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.36.3/sentry-cli-Darwin-arm64",
22-
"sha256": "82a1478f623e7f5c54300d2f13c560841048a020591279bdf7469ee3647545af",
21+
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.36.6/sentry-cli-Darwin-arm64",
22+
"sha256": "13befc6e6fcd3248605bf4f721f638a2f5a028a6427f17396d4c8ba3eb87116c",
2323
"os": "macos",
2424
"cpu": "arm64"
2525
},
2626
{
2727
"kind": "file",
28-
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.36.3/sentry-cli-Darwin-x86_64",
29-
"sha256": "48a999bd17d4888a6b41cf5062c9381907c6a8226d0f6c4b0b3dcd79247e1094",
28+
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.36.6/sentry-cli-Darwin-x86_64",
29+
"sha256": "d7797b3f1aa3d6053b232cb31915b74089237df0def288ef6fdee2351a17839d",
3030
"os": "macos",
3131
"cpu": "x86_64"
3232
},
3333
{
3434
"kind": "file",
35-
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.36.3/sentry-cli-Windows-x86_64.exe",
36-
"sha256": "49bd3c20b693a4871e3340ec526cb826e716ee003aa2edea2fc11dc7aa4f58f2",
35+
"url": "https://github.com/getsentry/sentry-cli/releases/download/2.36.6/sentry-cli-Windows-x86_64.exe",
36+
"sha256": "2d0a50334df8681b26c1fd5bf5715a9adcf48ef58b2ce3b90bfc9431c5857ae0",
3737
"os": "windows",
3838
"cpu": "x86_64"
3939
}

opentracing-shim/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
load("//:dll_deps.bzl", "dll_deps")
5-
load("//bazel:otel_cc.bzl", "otel_cc_binary", "otel_cc_import", "otel_cc_library", "otel_cc_shared_library", "otel_cc_test")
5+
load("//bazel:otel_cc.bzl", "otel_cc_library", "otel_cc_test")
66

77
package(default_visibility = ["//visibility:public"])
88

@@ -25,7 +25,7 @@ otel_cc_library(
2525
tags = ["opentracing"],
2626
deps = [
2727
"//api",
28-
"@com_github_opentracing//:opentracing",
28+
"@opentracing-cpp//:opentracing",
2929
],
3030
)
3131

x/MODULE.bazel

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@ module(
33
version = "0.1",
44
)
55

6-
bazel_dep(name = "otel_sdk", version = "")
6+
bazel_dep(name = "otel_sdk")
77
local_path_override(
88
module_name = "otel_sdk",
99
path = "..",
1010
)
1111

12-
## Almost copied verbatim from ../MODULE.bazel
13-
14-
bazel_dep(name = "abseil-cpp", version = "20240722.0")
15-
bazel_dep(name = "bazel_skylib", version = "1.7.1")
16-
bazel_dep(name = "boringssl", version = "0.20240913.0")
12+
# Below is needed as we have "build --@curl//:use_mbedtls=true" from ..\.bazelrc
1713
bazel_dep(name = "curl", version = "8.8.0.bcr.1")
18-
bazel_dep(name = "google_benchmark", version = "1.8.5")
19-
bazel_dep(name = "googletest", version = "1.15.2")
14+
15+
# bazel_dep(name = "google_benchmark", version = "1.8.5")
16+
# bazel_dep(name = "googletest", version = "1.15.2")
2017
bazel_dep(name = "grpc", version = "1.66.0.bcr.2")
2118
single_version_override(
2219
module_name = "grpc",
@@ -26,23 +23,23 @@ single_version_override(
2623
patches = ["bazel/grpc_bzlmod.diff"],
2724
)
2825

29-
bazel_dep(name = "nlohmann_json", version = "3.11.3")
30-
bazel_dep(name = "platforms", version = "0.0.10")
31-
bazel_dep(name = "rules_cc", version = "0.0.10")
32-
bazel_dep(name = "rules_pkg", version = "1.0.1")
33-
bazel_dep(name = "rules_proto", version = "6.0.2")
34-
bazel_dep(name = "zlib", version = "1.3.1.bcr.3")
35-
bazel_dep(name = "rules_multitool", version = "0.12.0")
36-
bazel_dep(name = "opentelemetry-proto", version = "1.3.2")
37-
archive_override(
38-
module_name = "opentelemetry-proto",
39-
integrity = "sha256-wGnA2WE3zwBdNEEfpn3TtvH4xkrx5/sv4AiaQcQlrNc=",
40-
patch_strip = 1,
41-
# Copied from https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/opentelemetry-proto/1.3.1/patches
42-
patches = ["bazel/opentelemetry-proto.patch"],
43-
strip_prefix = "opentelemetry-proto-1.3.2",
44-
urls = "https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/v1.3.2.tar.gz",
45-
)
26+
# bazel_dep(name = "nlohmann_json", version = "3.11.3")
27+
# bazel_dep(name = "platforms", version = "0.0.10")
28+
# bazel_dep(name = "rules_cc", version = "0.0.10")
29+
# bazel_dep(name = "rules_pkg", version = "1.0.1")
30+
# bazel_dep(name = "rules_proto", version = "6.0.2")
31+
# bazel_dep(name = "zlib", version = "1.3.1.bcr.3")
32+
# bazel_dep(name = "rules_multitool", version = "0.12.0")
33+
# bazel_dep(name = "opentelemetry-proto", version = "1.3.2")
34+
# archive_override(
35+
# module_name = "opentelemetry-proto",
36+
# integrity = "sha256-wGnA2WE3zwBdNEEfpn3TtvH4xkrx5/sv4AiaQcQlrNc=",
37+
# patch_strip = 1,
38+
# # Copied from https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/opentelemetry-proto/1.3.1/patches
39+
# patches = ["bazel/opentelemetry-proto.patch"],
40+
# strip_prefix = "opentelemetry-proto-1.3.2",
41+
# urls = "https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/v1.3.2.tar.gz",
42+
# )
4643

4744
bazel_dep(name = "prometheus-cpp", version = "1.2.4")
4845
archive_override(
@@ -56,14 +53,3 @@ use_repo(
5653
use_extension("@bazel_tools//tools/cpp:cc_configure.bzl", "cc_configure_extension"),
5754
"local_config_cc",
5855
)
59-
60-
# This is needed only for most of the `bazel mod xxx` functions to work.
61-
#
62-
# Otherwise it complaints with
63-
#
64-
# ERROR: in tag at https://bcr.bazel.build/modules/grpc-java/1.62.2/MODULE.bazel:89:15: no repository visible as
65-
# '@com_google_protobuf_javalite' to the repository '@@grpc-java+', but referenced by label
66-
# '@com_google_protobuf_javalite//:protobuf_javalite' in attribute 'target' of tag 'override'.
67-
# Is the module 'grpc-java' missing a bazel_dep or use_repo(..., "com_google_protobuf_javalite")?.
68-
#
69-
bazel_dep(name = "grpc-java", version = "1.66.0")

0 commit comments

Comments
 (0)