Skip to content

Commit 54de94b

Browse files
Googlercopybara-github
Googler
authored andcommitted
Fix WORKSPACE setup for Bazel 8 / Bazel@HEAD
- Replaces `@protobuf` with `@com_google_protobuf`[^1] - Updates protobuf version to the latest release - Updates versions & moves declaration of `rules_python` and `rules_proto` before calling any setup macros to ensure we're on the right version. Work towards bazelbuild/bazel#23619 PiperOrigin-RevId: 701894382
1 parent 4602f76 commit 54de94b

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

WORKSPACE

+18-11
Original file line numberDiff line numberDiff line change
@@ -357,21 +357,35 @@ http_archive(
357357
sha256 = "1389206b2208c5f33a05dd96e51715b0855c480c082b7bb4889a8e07fcff536c",
358358
)
359359

360-
_protobuf_version = "29.0-rc1"
360+
_protobuf_version = "29.0"
361361

362-
_protobuf_sha256 = "32247eed6fa8c9792d2667b9fb306e8403736097226b478711d7f3bfece6fbda"
362+
_protobuf_sha256 = "10a0d58f39a1a909e95e00e8ba0b5b1dc64d02997f741151953a2b3659f6e78c"
363363

364364
http_archive(
365-
name = "protobuf",
365+
name = "com_google_protobuf",
366366
sha256 = _protobuf_sha256,
367367
strip_prefix = "protobuf-%s" % _protobuf_version,
368368
urls = ["https://github.com/protocolbuffers/protobuf/archive/v%s.tar.gz" % _protobuf_version],
369369
)
370370

371+
http_archive(
372+
name = "rules_python",
373+
sha256 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53",
374+
strip_prefix = "rules_python-0.40.0",
375+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.0.tar.gz",
376+
)
377+
378+
http_archive(
379+
name = "rules_proto",
380+
sha256 = "0e5c64a2599a6e26c6a03d6162242d231ecc0de219534c38cb4402171def21e8",
381+
strip_prefix = "rules_proto-7.0.2",
382+
url = "https://github.com/bazelbuild/rules_proto/releases/download/7.0.2/rules_proto-7.0.2.tar.gz",
383+
)
384+
371385
load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies")
372386
rules_java_dependencies()
373387

374-
load("@protobuf//:protobuf_deps.bzl", "protobuf_deps")
388+
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
375389
protobuf_deps()
376390

377391
load("@rules_java//java:repositories.bzl", "rules_java_toolchains")
@@ -565,13 +579,6 @@ new_git_repository(
565579
shallow_since = "1518210648 -0800",
566580
)
567581

568-
http_archive(
569-
name = "rules_python",
570-
sha256 = "ffc7b877c95413c82bfd5482c017edcf759a6250d8b24e82f41f3c8b8d9e287e",
571-
strip_prefix = "rules_python-0.19.0",
572-
url = "https://github.com/bazelbuild/rules_python/releases/download/0.19.0/rules_python-0.19.0.tar.gz",
573-
)
574-
575582
load("@rules_python//python:repositories.bzl", "py_repositories")
576583

577584
py_repositories()

0 commit comments

Comments
 (0)