Skip to content

Commit d538b98

Browse files
committed
upgrade Bazel protobuf to 33.1
1 parent eb8a63c commit d538b98

File tree

16 files changed

+59
-32
lines changed

16 files changed

+59
-32
lines changed

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
1+
build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
matrix:
8282
bzlmod: [true, false]
8383
env:
84-
USE_BAZEL_VERSION: 7.0.0
84+
USE_BAZEL_VERSION: 7.7.1
8585

8686
steps:
8787
- uses: actions/checkout@v4

MODULE.bazel

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,14 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
4848

4949
bazel_dep(name = "bazel_jar_jar", version = "0.1.7")
5050
bazel_dep(name = "bazel_skylib", version = "1.7.1")
51-
bazel_dep(name = "googleapis", repo_name = "com_google_googleapis", version = "0.0.0-20240326-1c8d509c5")
52-
bazel_dep(name = "grpc-proto", repo_name = "io_grpc_grpc_proto", version = "0.0.0-20240627-ec30f58")
53-
# Protobuf 25.5+ is incompatible with Bazel 7 with bzlmod
54-
bazel_dep(name = "protobuf", repo_name = "com_google_protobuf", version = "24.4")
51+
bazel_dep(name = "googleapis", version = "0.0.0-20240326-1c8d509c5", repo_name = "com_google_googleapis")
52+
bazel_dep(name = "grpc-proto", version = "0.0.0-20240627-ec30f58", repo_name = "io_grpc_grpc_proto")
53+
bazel_dep(name = "protobuf", version = "33.1", repo_name = "com_google_protobuf")
5554
bazel_dep(name = "rules_cc", version = "0.0.9")
56-
bazel_dep(name = "rules_java", version = "5.3.5")
55+
bazel_dep(name = "rules_java", version = "9.1.0")
5756
bazel_dep(name = "rules_jvm_external", version = "6.0")
58-
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
5957

6058
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
61-
6259
maven.install(
6360
artifacts = IO_GRPC_GRPC_JAVA_ARTIFACTS,
6461
repositories = [

WORKSPACE

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,28 @@ workspace(name = "io_grpc_grpc_java")
22

33
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44

5+
http_archive(
6+
name = "bazel_features",
7+
sha256 = "a660027f5a87f13224ab54b8dc6e191693c554f2692fcca46e8e29ee7dabc43b",
8+
strip_prefix = "bazel_features-1.30.0",
9+
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.30.0/bazel_features-v1.30.0.tar.gz",
10+
)
11+
12+
load("@bazel_features//:deps.bzl", "bazel_features_deps")
13+
bazel_features_deps()
14+
515
http_archive(
616
name = "rules_java",
7-
url = "https://github.com/bazelbuild/rules_java/releases/download/5.3.5/rules_java-5.3.5.tar.gz",
8-
sha256 = "c73336802d0b4882e40770666ad055212df4ea62cfa6edf9cb0f9d29828a0934",
17+
urls = [
18+
"https://github.com/bazelbuild/rules_java/releases/download/9.1.0/rules_java-9.1.0.tar.gz",
19+
],
20+
sha256 = "4e1a28a25c2efa53500c928d22ceffbc505dd95b335a2d025836a293b592212f",
921
)
1022

23+
load("@rules_java//java:rules_java_deps.bzl", "compatibility_proxy_repo")
24+
25+
compatibility_proxy_repo()
26+
1127
http_archive(
1228
name = "rules_jvm_external",
1329
sha256 = "d31e369b854322ca5098ea12c69d7175ded971435e55c18dd9dd5f29cc5249ac",
@@ -26,11 +42,14 @@ load("@bazel_jar_jar//:jar_jar.bzl", "jar_jar_repositories")
2642

2743
jar_jar_repositories()
2844

29-
load("@com_google_protobuf//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS")
30-
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
45+
load("@com_google_protobuf//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")
3146

3247
protobuf_deps()
3348

49+
load("@rules_python//python:repositories.bzl", "py_repositories")
50+
51+
py_repositories()
52+
3453
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
3554

3655
switched_rules_by_language(

alts/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
12
load("@rules_java//java:defs.bzl", "java_library", "java_proto_library")
23
load("@rules_jvm_external//:defs.bzl", "artifact")
3-
load("@rules_proto//proto:defs.bzl", "proto_library")
44
load("//:java_grpc_library.bzl", "java_grpc_library")
55

66
java_library(

examples/.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
1+
build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17

examples/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
load("@rules_proto//proto:defs.bzl", "proto_library")
1+
load("@com_google_protobuf//bazel:java_proto_library.bzl", "java_proto_library")
2+
load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
23
load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
34

45
proto_library(

examples/MODULE.bazel

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
bazel_dep(name = "grpc-java", repo_name = "io_grpc_grpc_java", version = "1.78.0-SNAPSHOT") # CURRENT_GRPC_VERSION
2-
bazel_dep(name = "grpc-proto", repo_name = "io_grpc_grpc_proto", version = "0.0.0-20240627-ec30f58")
3-
bazel_dep(name = "protobuf", repo_name = "com_google_protobuf", version = "23.1")
1+
bazel_dep(name = "grpc-java", version = "1.78.0-SNAPSHOT", repo_name = "io_grpc_grpc_java") # CURRENT_GRPC_VERSION
2+
bazel_dep(name = "grpc-proto", version = "0.0.0-20240627-ec30f58", repo_name = "io_grpc_grpc_proto")
3+
bazel_dep(name = "protobuf", version = "33.1", repo_name = "com_google_protobuf")
44
bazel_dep(name = "rules_jvm_external", version = "6.0")
5-
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
65

76
# Do not use this override in your own MODULE.bazel. It is unnecessary when
87
# using a version from BCR. Be aware the gRPC Java team does not update the

examples/WORKSPACE

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,18 @@ jar_jar_repositories()
3434

3535
# Protobuf now requires C++14 or higher, which requires Bazel configuration
3636
# outside the WORKSPACE. See .bazelrc in this directory.
37-
load("@com_google_protobuf//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS")
38-
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
37+
load("@com_google_protobuf//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps")
3938

4039
protobuf_deps()
4140

41+
load("@rules_python//python:repositories.bzl", "py_repositories")
42+
43+
py_repositories()
44+
45+
load("@rules_java//java:rules_java_deps.bzl", "compatibility_proxy_repo")
46+
47+
compatibility_proxy_repo()
48+
4249
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
4350

4451
switched_rules_by_language(

examples/example-alts/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
load("@rules_proto//proto:defs.bzl", "proto_library")
1+
load("@com_google_protobuf//bazel:java_proto_library.bzl", "java_proto_library")
2+
load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library")
23
load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
34

45
proto_library(

0 commit comments

Comments
 (0)