Skip to content

Commit 14313a8

Browse files
committed
Add rules_python 0.37.2 for Bazel 7
bazelbuild/bazel@78729c0 from Bazel 7 updates `@bazel_tools//src/main/protobuf` to depend on `@rules_python`. This allows us to keep using rules_proto-5.3.0-21.7. For details on why I chose rules_python 0.37.2, see: - bazel-contrib/rules_scala#1660 (comment) Basically, it's the last version that doesn't pull in its own protobuf. rules_python 0.38.0 pulls in protobuf v27 unconditionally. Results in the following failure: ```txt ERROR: external/remote_java_tools_darwin_arm64/BUILD: no such target '@@remote_java_tools_darwin_arm64//:turbine_direct_graal': target 'turbine_direct_graal' not declared in package '' defined by external/remote_java_tools_darwin_arm64/BUILD ERROR: external/rules_java_builtin/toolchains/BUILD:163:14: no such target '@@remote_java_tools_darwin_arm64//:turbine_direct_graal': target 'turbine_direct_graal' not declared in package '' defined by external/remote_java_tools_darwin_arm64/BUILD and referenced by '@@rules_java_builtin//toolchains:turbine_direct_graal_darwin_arm64' ERROR: Analysis of target '//:default-values' failed; build aborted: Analysis failed ```
1 parent 2630ba4 commit 14313a8

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

bootcamp/WORKSPACE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ load(
1515
rules_magic_deps()
1616
rules_magic_leaflet_repo()
1717

18+
load("@rules_python//python:repositories.bzl", "py_repositories")
19+
20+
py_repositories()
21+
1822
load(
1923
"@rules_java//java:repositories.bzl",
2024
"rules_java_dependencies",

rules_magic/WORKSPACE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ load(
88

99
rules_magic_deps()
1010

11+
load("@rules_python//python:repositories.bzl", "py_repositories")
12+
13+
py_repositories()
14+
1115
load(
1216
"@rules_java//java:repositories.bzl",
1317
"rules_java_dependencies",

rules_magic/magic/deps.bzl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@ def rules_magic_deps():
2323
"https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz",
2424
],
2525
)
26+
27+
maybe(
28+
http_archive,
29+
name = "rules_python",
30+
sha256 = "c6fb25d0ba0246f6d5bd820dd0b2e66b339ccc510242fd4956b9a639b548d113",
31+
strip_prefix = "rules_python-0.37.2",
32+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.37.2/rules_python-0.37.2.tar.gz",
33+
)

0 commit comments

Comments
 (0)