Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support --noexperimental_python_import_all_repositories #312

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions src/analyze_includes/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ py_library(
py_binary(
name = "analyze_includes",
srcs = ["main.py"],
# Compatibility to --noexperimental_python_import_all_repositories
imports = ["../.."],
legacy_create_init = False,
main = "main.py",
visibility = ["//visibility:public"],
Expand Down
2 changes: 2 additions & 0 deletions src/apply_fixes/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ py_library(
py_binary(
name = "main",
srcs = ["main.py"],
# Compatibility to --noexperimental_python_import_all_repositories
imports = ["../.."],
visibility = ["//:__pkg__"],
deps = [":lib"],
)
3 changes: 3 additions & 0 deletions test/apply_fixes/execution_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@

# Useless as the workspace are thrown away after each creation
common --lockfile_mode=off

# Some users require this setting to mitigate issues due to a large PYTHONPATH created by rules_python
build --noexperimental_python_import_all_repositories
"""

BAZEL_VERSION = "7.4.1"
Expand Down
4 changes: 3 additions & 1 deletion test/aspect/execute_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
# with bzlmod. bzlmod does not work for us before Bazel 6.2.
"--enable_bzlmod=false": CompatibleVersions(minimum="6.0.0", before="6.2.0"),
"--enable_bzlmod=true": CompatibleVersions(minimum="6.2.0", before="7.0.0"),
# Incompatible changes
# Experimental changes we want to be compatible for
"--noexperimental_python_import_all_repositories": CompatibleVersions(minimum="1.0.0"),
# Preparation for incompatible changes
"--incompatible_legacy_local_fallback=false": CompatibleVersions(minimum="5.0.0"), # false is the forward path
"--incompatible_enforce_config_setting_visibility": CompatibleVersions(minimum="5.0.0"),
"--incompatible_config_setting_private_default_visibility": CompatibleVersions(minimum="5.0.0"),
Expand Down
1 change: 1 addition & 0 deletions third_party/pcpp/pcpp.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ load("@rules_python//python:py_library.bzl", "py_library")
py_library(
name = "pcpp",
srcs = glob(["pcpp/**/*"]),
imports = ["."],
visibility = ["@depend_on_what_you_use//:__subpackages__"],
)