Skip to content

Commit 365d2d3

Browse files
committed
Update Bazel configuration and dependencies
- Upgrade Bazel version to 7.6.1 - Refine .gitignore to include Bazel build folders - Introduce MODULE.bazel for module definition and dependencies - Adjust WORKSPACE file to load only necessary proto toolchains - Remove unused git_repository load from repositories.bzl Signed-off-by: Matthieu MOREL <[email protected]>
1 parent a6e226f commit 365d2d3

File tree

7 files changed

+59
-17
lines changed

7 files changed

+59
-17
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.1.0
1+
7.6.1

.gitignore

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# bazel build folders
2-
/bazel-bin
3-
/bazel-grpc-httpjson-transcoding
4-
/bazel-out
5-
/bazel-testlogs
2+
/bazel-*
3+
MODULE.bazel.lock
64

75
# IDE
86
.clwb/

MODULE.bazel

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
module(
2+
name = "grpc-httpjson-transcoding",
3+
version = "",
4+
)
5+
6+
bazel_dep(name = "bazel_skylib", version = "1.8.2")
7+
bazel_dep(name = "gazelle", version = "0.45.0", repo_name = "bazel_gazelle")
8+
bazel_dep(name = "googleapis", version = "0.0.0-20250826-a92cee39", repo_name = "com_google_googleapis")
9+
bazel_dep(name = "protobuf", version = "29.3", repo_name = "com_google_protobuf")
10+
bazel_dep(name = "rules_cc", version = "0.2.9")
11+
bazel_dep(name = "rules_go", version = "0.57.0", repo_name = "io_bazel_rules_go")
12+
bazel_dep(name = "proto-converter")
13+
14+
git_override(
15+
module_name = "proto-converter",
16+
commit = "3f393212800d011296e116b38435f4374d714d73",
17+
remote = "https://github.com/grpc-ecosystem/proto-converter.git",
18+
)
19+
20+
bazel_dep(name = "rules_ruby", version = "0.20.1")
21+
bazel_dep(name = "rules_python", version = "1.6.3")
22+
23+
bazel_dep(name = "rules_fuzzing", version = "0.6.0", dev_dependency = True)
24+
25+
switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules")
26+
switched_rules.use_languages(
27+
cc = True,
28+
)
29+
use_repo(switched_rules, "com_google_googleapis_imports")
30+
31+
# -- bazel_dep definitions -- #
32+
33+
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
34+
# -- use_repo_rule statements -- #
35+
36+
37+
http_archive(
38+
name = "io_bazel_rules_docker",
39+
urls = [
40+
"https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz"
41+
],
42+
sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf",
43+
)
44+
# -- repo definitions -- #

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ load(
8888
_cc_image_repos()
8989
# END io_bazel_rules_docker
9090

91-
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
91+
load("@rules_proto//proto:repositories.bzl", "rules_proto_toolchains")
9292

9393
rules_proto_toolchains()
9494

WORKSPACE.bzlmod

Whitespace-only changes.

perf_benchmark/BUILD

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
#
1515
################################################################################
1616
#
17-
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
18-
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
17+
load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library")
18+
load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
1919
load("@io_bazel_rules_docker//cc:image.bzl", "cc_image")
2020
load("@io_bazel_rules_docker//container:container.bzl", "container_push")
21+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
2122

2223
cc_proto_library(
2324
name = "benchmark_cc_proto",

repositories.bzl

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
################################################################################
1616
#
1717
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
18-
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
1918

20-
def absl_repositories(bind = True):
19+
def absl_repositories():
2120
http_archive(
2221
name = "com_google_absl",
2322
sha256 = "ea1d31db00eb37e607bfda17ffac09064670ddf05da067944c4766f517876390",
@@ -28,7 +27,7 @@ def absl_repositories(bind = True):
2827
PROTOBUF_COMMIT = "315ffb5be89460f2857387d20aefc59b76b8bdc3" # May 31, 2023
2928
PROTOBUF_SHA256 = "aa61db6ff113a1c76eac9408144c6e996c5e2d6b2410818fd7f1b0d222a50bf8"
3029

31-
def protobuf_repositories(bind = True):
30+
def protobuf_repositories():
3231
http_archive(
3332
name = "com_google_protobuf",
3433
strip_prefix = "protobuf-" + PROTOBUF_COMMIT,
@@ -41,7 +40,7 @@ def protobuf_repositories(bind = True):
4140
GOOGLETEST_COMMIT = "f8d7d77c06936315286eb55f8de22cd23c188571" # v1.14.0: Aug 2, 2023
4241
GOOGLETEST_SHA256 = "7ff5db23de232a39cbb5c9f5143c355885e30ac596161a6b9fc50c4538bfbf01"
4342

44-
def googletest_repositories(bind = True):
43+
def googletest_repositories():
4544
http_archive(
4645
name = "com_google_googletest",
4746
strip_prefix = "googletest-" + GOOGLETEST_COMMIT,
@@ -52,7 +51,7 @@ def googletest_repositories(bind = True):
5251
GOOGLEAPIS_COMMIT = "1d5522ad1056f16a6d593b8f3038d831e64daeea" # Sept 03, 2020
5352
GOOGLEAPIS_SHA256 = "cd13e547cffaad217c942084fd5ae0985a293d0cce3e788c20796e5e2ea54758"
5453

55-
def googleapis_repositories(bind = True):
54+
def googleapis_repositories():
5655
http_archive(
5756
name = "com_google_googleapis",
5857
strip_prefix = "googleapis-" + GOOGLEAPIS_COMMIT,
@@ -63,15 +62,15 @@ def googleapis_repositories(bind = True):
6362
GOOGLEBENCHMARK_COMMIT = "1.7.0" # Jul 25, 2022
6463
GOOGLEBENCHMARK_SHA256 = "3aff99169fa8bdee356eaa1f691e835a6e57b1efeadb8a0f9f228531158246ac"
6564

66-
def googlebenchmark_repositories(bind = True):
65+
def googlebenchmark_repositories():
6766
http_archive(
6867
name = "com_google_benchmark",
6968
strip_prefix = "benchmark-" + GOOGLEBENCHMARK_COMMIT,
7069
url = "https://github.com/google/benchmark/archive/v" + GOOGLEBENCHMARK_COMMIT + ".tar.gz",
7170
sha256 = GOOGLEBENCHMARK_SHA256,
7271
)
7372

74-
def nlohmannjson_repositories(bind = True):
73+
def nlohmannjson_repositories():
7574
http_archive(
7675
name = "com_github_nlohmann_json",
7776
strip_prefix = "json-3.11.3",
@@ -82,14 +81,14 @@ def nlohmannjson_repositories(bind = True):
8281
RULES_DOCKER_COMMIT = "0.25.0" # Jun 22, 2022
8382
RULES_DOCKER_SHA256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf"
8483

85-
def io_bazel_rules_docker(bind = True):
84+
def io_bazel_rules_docker():
8685
http_archive(
8786
name = "io_bazel_rules_docker",
8887
sha256 = RULES_DOCKER_SHA256,
8988
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v" + RULES_DOCKER_COMMIT + "/rules_docker-v" + RULES_DOCKER_COMMIT + ".tar.gz"],
9089
)
9190

92-
def protoconverter_repositories(bind = True):
91+
def protoconverter_repositories():
9392
http_archive(
9493
name = "com_google_protoconverter",
9594
sha256 = "6081836fa3838ebb1aa15089a5c3e20f877a0244c7a39b92a2000efb40408dcb",

0 commit comments

Comments
 (0)