Skip to content

Commit

Permalink
try to use protobuf 29 in workspace for bazel 9
Browse files Browse the repository at this point in the history
  • Loading branch information
rickeylev committed Nov 14, 2024
1 parent c500a69 commit 2722e29
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 17 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bazel_dep(name = "rules_cc", version = "0.0.14")
bazel_dep(name = "platforms", version = "0.0.4")

# Those are loaded only when using py_proto_library
bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "rules_proto", version = "7.0.2")
bazel_dep(name = "protobuf", version = "29.0-rc2", repo_name = "com_google_protobuf")

internal_deps = use_extension("//python/private:internal_deps.bzl", "internal_deps")
Expand Down
2 changes: 1 addition & 1 deletion examples/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local_path_override(
)

# (py_proto_library specific) We are using rules_proto to define rules_proto targets to be consumed by py_proto_library.
bazel_dep(name = "rules_proto", version = "6.0.0-rc1")
bazel_dep(name = "rules_proto", version = "6.0.2")

# (py_proto_library specific) Add the protobuf library for well-known types (e.g. `Any`, `Timestamp`, etc)
bazel_dep(name = "protobuf", version = "27.0", repo_name = "com_google_protobuf")
Expand Down
7 changes: 0 additions & 7 deletions internal_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,6 @@ def rules_python_internal_deps():
sha256 = "0e124567fa85287874eff33a791c3bbdcc5343329a56faa828ef624380d4607c",
url = "https://github.com/keith/rules_multirun/releases/download/0.9.0/rules_multirun.0.9.0.tar.gz",
)
# Needed by rules_cc, triggered by @rules_java_builtins from Bazel
http_archive(
name = "protobuf",
sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa",
strip_prefix = "protobuf-27.0",
url = "https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protobuf-27.0.tar.gz",
)

# Needed by rules_cc, triggered by @rules_java_builtins from Bazel
http_archive(
Expand Down
8 changes: 0 additions & 8 deletions python/private/py_repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ def py_repositories():
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.13/rules_cc-0.0.13.tar.gz"],
)

# Needed by rules_cc, triggerred by @rules_java_prebuilt in Bazel by using @rules_cc//cc:defs.bzl
http_archive(
name = "protobuf",
sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa",
strip_prefix = "protobuf-27.0",
url = "https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protobuf-27.0.tar.gz",
)

# Needed by rules_cc, triggerred by @rules_java_prebuilt in Bazel by using @rules_cc//cc:defs.bzl
http_archive(
name = "protobuf",
Expand Down
27 changes: 27 additions & 0 deletions tests/integration/py_cc_toolchain_registered/WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

local_repository(
name = "rules_python",
path = "../../..",
)

http_archive(
name = "proto_bazel_features",
sha256 = "d7787da289a7fb497352211ad200ec9f698822a9e0757a4976fd9f713ff372b3",
strip_prefix = "bazel_features-1.9.1",
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.9.1/bazel_features-v1.9.1.tar.gz",
)

http_archive(
name = "com_google_protobuf",
##sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa",
strip_prefix = "protobuf-29.0-rc2",
urls = [
"https://github.com/protocolbuffers/protobuf/releases/download/v29.0-rc2/protobuf-29.0-rc2.tar.gz",
],
)

http_archive(
name = "protobuf",
##sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa",
strip_prefix = "protobuf-29.0-rc2",
urls = [
"https://github.com/protocolbuffers/protobuf/releases/download/v29.0-rc2/protobuf-29.0-rc2.tar.gz",
],
)

load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

py_repositories()
Expand Down

0 comments on commit 2722e29

Please sign in to comment.