Skip to content

Commit 1298bd5

Browse files
committed
build: change gazelle rules_python override to use bazelrc (#3382)
This is because the `--override_module` flag in BCR presubmit configs can't affect local_path_override in MODULE.bazel. Per bazelbuild/bazel-central-registry#6241 (comment) (cherry picked from commit caab0fa)
1 parent c7a406c commit 1298bd5

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

gazelle/examples/bzlmod_build_file_generation/.bazelrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,10 @@ common --experimental_enable_bzlmod
77

88
coverage --java_runtime_version=remotejdk_11
99
common:bazel7.x --incompatible_python_disallow_native_rules
10+
11+
# NOTE: This override is specific to the development of gazelle itself
12+
# and the testing of it during its BCR release presubmits.
13+
# In development of gazelle itself, we override it to the development
14+
# rules_python code. In the BCR presubmits, this override is removed
15+
# and the bazel_dep version of rules_python is used.
16+
common --override_module=rules_python=../../../

gazelle/examples/bzlmod_build_file_generation/MODULE.bazel

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@ module(
1515
# https://github.com/bazel-contrib/rules_python/releases
1616
bazel_dep(name = "rules_python", version = "1.0.0")
1717

18-
# NOTE: This override is removed for BCR presubmits and the version
19-
# specified by bazel_dep() is used instead.
20-
# The following loads rules_python from the file system.
21-
# For usual setups you should remove this local_path_override block.
22-
local_path_override(
23-
module_name = "rules_python",
24-
path = "../../..",
25-
)
26-
2718
# The following stanza defines the dependency rules_python_gazelle_plugin.
2819
# For typical setups you set the version.
2920
# See the releases page for available versions.

0 commit comments

Comments
 (0)