-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMODULE.bazel
More file actions
136 lines (119 loc) · 4.4 KB
/
Copy pathMODULE.bazel
File metadata and controls
136 lines (119 loc) · 4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# *******************************************************************************
# Copyright (c) 2026 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
module(name = "score_diagnostics")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "score_bazel_platforms", version = "0.1.2")
bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.5.4", dev_dependency = True)
gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True)
gcc.toolchain(
name = "score_gcc_x86_64_toolchain",
target_cpu = "x86_64",
target_os = "linux",
use_default_package = True,
version = "12.2.0",
)
use_repo(
gcc,
"score_gcc_x86_64_toolchain",
)
bazel_dep(name = "rules_python", version = "1.8.3", dev_dependency = True)
# Python 3.12: Required for testing infrastructure and code generation tools
_PYTHON_VERSION = "3.12"
python = use_extension(
"@rules_python//python/extensions:python.bzl",
"python",
dev_dependency = True,
)
python.toolchain(
is_default = True,
python_version = _PYTHON_VERSION,
)
pip = use_extension(
"@rules_python//python/extensions:pip.bzl",
"pip",
dev_dependency = True,
)
pip.parse(
envsubst = ["PIP_INDEX_URL"],
extra_pip_args = ["--index-url=${PIP_INDEX_URL:-https://pypi.org/simple/}"],
hub_name = "module_template_docs_hub_env",
python_version = _PYTHON_VERSION,
requirements_lock = "@score_docs_as_code//src:requirements.txt",
)
use_repo(pip, "module_template_docs_hub_env")
# Add GoogleTest dependency
bazel_dep(name = "googletest", version = "1.17.0.bcr.2", dev_dependency = True)
# Rust rules for Bazel
bazel_dep(name = "rules_rust", version = "0.68.1-score")
bazel_dep(name = "score_crates", version = "0.0.10")
bazel_dep(name = "score_toolchains_rust", version = "0.9.1", dev_dependency = True)
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
# any further required individual rust creates shall get added below
crate.spec(
package = "futures",
version = "0.3.31",
)
crate.spec(
package = "indexmap",
version = "2.11.4",
)
crate.spec(
package = "serde_json",
version = "1.0.143",
)
crate.spec(
features = [
"macros",
"rt",
"sync",
"time",
],
package = "tokio",
version = "1.47.1",
)
crate.from_specs(
name = "score_crate_index",
supported_platform_triples = [
"aarch64-unknown-linux-gnu",
"aarch64-unknown-nto-qnx800",
"x86_64-pc-nto-qnx800",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-none",
],
)
use_repo(crate, "score_crate_index")
# C/C++ rules for Bazel
bazel_dep(name = "rules_cc", version = "0.2.18")
# functional deps
bazel_dep(name = "score_baselibs", version = "0.2.9")
# NOTE: score_baselibs has flatbuffers@25.12.19 as a non-dev dependency and that one
# transitively pulls grpc -> googleapis -> grpc-java@1.66.0 into all consumers.
# grpc-java@1.66.0 contains a broken use_repo declaration that Bazel 8.x
# rejects as a hard error.
#
# The upstream fix in flatbuffers (google/flatbuffers@2b8e4d3) upgrades grpc to
# 1.76.0, which drops the problematic grpc-java@1.66.0 dependency. Until such
# commmit is included in a flatbuffers release, this direct dependency of a
# transitive dependency serves as a mitigation.
#
# TODO: Remove below bazel_dep once flatbuffers releases a version which contains the following fix:
# https://github.com/google/flatbuffers/commit/2b8e4d3af04a6c38c7a7e19460fc26faa3608c9e
bazel_dep(name = "grpc", version = "1.76.0")
# tooling
bazel_dep(name = "score_tooling", version = "1.1.2", dev_dependency = True)
bazel_dep(name = "score_devcontainer", version = "1.7.0", dev_dependency = True)
bazel_dep(name = "aspect_rules_lint", version = "2.3.0", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.2", dev_dependency = True)
# docs-as-code
bazel_dep(name = "score_docs_as_code", version = "4.6.0", dev_dependency = True)
bazel_dep(name = "score_process", version = "1.6.0", dev_dependency = True)