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

Ignore usages of ignored flag aliases instead of failing #25125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Jan 29, 2025

When a .bazelrc contains:

common --flag_alias=my_flag=//:my_flag
common --my_flag=value

commands that don't support Starlark flags no longer fails with:

ERROR: --my_flag=value :: Unrecognized option: --my_flag=value

Fixes #25116

When a `.bazelrc` contains:
```
common --flag_alias=my_flag=//:my_flag
common --my_flag=value
```
commands that don't support Starlark flags no longer fails with:
```
ERROR: --my_flag=value :: Unrecognized option: --my_flag=value
```
@fmeum fmeum requested a review from gregestren January 29, 2025 12:21
@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Jan 29, 2025
@iancha1992 iancha1992 added the team-Configurability platforms, toolchains, cquery, select(), config transitions label Jan 29, 2025
@gregestren
Copy link
Contributor

Noting for the record that this is consistent with common's definition: https://bazel.build/run/bazelrc#option-defaults

add_to_bazelrc "common --drink=coffee"
write_build_setting_bzl

# canonicalize-flags does not see the common flag in .bazelrc.
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this comment mean? I thought canonicalize-flags does see common settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review PR is awaiting review from an assigned reviewer team-Configurability platforms, toolchains, cquery, select(), config transitions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flag aliases are not expanded before error in query like commands
3 participants