Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions gazelle/examples/bzlmod_build_file_generation/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ common --experimental_enable_bzlmod

coverage --java_runtime_version=remotejdk_11
common:bazel7.x --incompatible_python_disallow_native_rules

# NOTE: rules_python MUST be overridden using bazelrc config.
# This is because the BCR presubmits run with a different directory
# structure, so override this to remove the override.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment explaining the need for this override is a bit confusing, especially the phrase 'so override this to remove the override'. For better clarity and maintainability, I suggest rephrasing it to more directly explain how this change helps with BCR presubmits.

# NOTE: rules_python MUST be overridden using bazelrc config.
# This is because BCR presubmits cannot override a `local_path_override`
# in MODULE.bazel. This allows BCR presubmits to disable the override
# by passing `--override_module=rules_python=`.

common --override_module=rules_python=../../../
9 changes: 0 additions & 9 deletions gazelle/examples/bzlmod_build_file_generation/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ module(
# https://github.com/bazel-contrib/rules_python/releases
bazel_dep(name = "rules_python", version = "1.0.0")

# NOTE: This override is removed for BCR presubmits and the version
# specified by bazel_dep() is used instead.
# The following loads rules_python from the file system.
# For usual setups you should remove this local_path_override block.
local_path_override(
module_name = "rules_python",
path = "../../..",
)

# The following stanza defines the dependency rules_python_gazelle_plugin.
# For typical setups you set the version.
# See the releases page for available versions.
Expand Down