Skip to content

feat: restore flag aliases to Starlark-defined flags#3932

Open
gregestren wants to merge 2 commits into
bazel-contrib:mainfrom
gregestren:main
Open

feat: restore flag aliases to Starlark-defined flags#3932
gregestren wants to merge 2 commits into
bazel-contrib:mainfrom
gregestren:main

Conversation

@gregestren

Copy link
Copy Markdown
Contributor

This was breaking rules_python CI with Bazel 9.0.0.

@aranguyen and I made some changes that we thought would resolve in 9.1.0 or 9.2.0.

The repro I tried on 9.0.0 now passes:

Tested:

USE_BAZEL_VERSION=9.0.0 bazelisk build --nobuild //tests/py_zipapp:system_python_zipapp
ERROR: Analysis of target '//tests/py_zipapp:system_python_zipapp' failed; build aborted: no such package '@@rules_python//python/config_settings': The repository '@@rules_python' could not be resolved: Repository '@@rules_python' is not defined
USE_BAZEL_VERSION=9.2.0 bazelisk build --nobuild //tests/py_zipapp:system_python_zipapp
INFO: Build completed successfully, 0 total actions

References:

Tested:

```
USE_BAZEL_VERSION=9.0.0 bazelisk build --nobuild //tests/py_zipapp:system_python_zipapp
ERROR: Analysis of target '//tests/py_zipapp:system_python_zipapp' failed; build aborted: no such package '@@rules_python//python/config_settings': The repository '@@rules_python' could not be resolved: Repository '@@rules_python' is not defined
```

```
USE_BAZEL_VERSION=9.2.0 bazelisk build --nobuild //tests/py_zipapp:system_python_zipapp
INFO: Build completed successfully, 0 total actions
```

References:

- bazel-contrib#3450 (comment)
- bazel-contrib#3450 (comment)
Copilot AI review requested due to automatic review settings July 17, 2026 17:26
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Restores flag_alias mappings in MODULE.bazel so legacy/native Python-related Bazel flags resolve to rules_python’s Starlark-defined flags again, addressing the Bazel 9.x regression discussed in #3450 and referenced issue comments.

Changes:

  • Re-enable flag_alias for build_python_zip.
  • Re-enable flag_alias for incompatible_default_to_explicit_init_py.
  • Re-enable flag_alias for python_path and experimental_python_import_all_repositories.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread MODULE.bazel
Comment thread MODULE.bazel
@gregestren

Copy link
Copy Markdown
Contributor Author

Any other tests I should check besides routine CI?

@rickeylev rickeylev changed the title build: restore flag aliases to Starlark-defined flags feat: restore flag aliases to Starlark-defined flags Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants