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

Follow unconfigured aliases during options parsing #22192

Closed
wants to merge 2 commits into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Apr 30, 2024

Fixes #20582

RELNOTES: Starlark command-line flags can now be referred to through alias targets.

RELNOTES: Starlark command-line flags can now be referred to through `alias` targets.
@fmeum fmeum requested a review from gregestren April 30, 2024 09:26
@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Apr 30, 2024
@fmeum
Copy link
Collaborator Author

fmeum commented Apr 30, 2024

@gregestren I picked this up since it is relevant for a design I'm working on: I want to build a general-purpose features system for Bazel modules, similar to that of Cargo. Modules can declare configurable features and have appropriate custom Starlark flags generated for them in a repository rule, with a managed default value. But this is only likely to work well if a module can wrap these generated flags in aliases under its own repo, say @rules_cc//cc/config:std aliases @features.rules_cc//:std, which is use_repoed from a module extension.

Hope that motivates this, happy to explain more about the context if you have concerns.

Copy link
Contributor

@gregestren gregestren left a comment

Choose a reason for hiding this comment

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

Nice!

@iancha1992 iancha1992 added the team-Configurability platforms, toolchains, cquery, select(), config transitions label Apr 30, 2024
@fmeum fmeum requested a review from gregestren May 1, 2024 19:58
@gregestren gregestren added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels May 1, 2024
@fmeum
Copy link
Collaborator Author

fmeum commented May 1, 2024

@bazel-io fork 7.2.0

@copybara-service copybara-service bot closed this in 43fdcd3 May 1, 2024
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label May 1, 2024
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request May 1, 2024
Fixes bazelbuild#20582

RELNOTES: Starlark command-line flags can now be referred to through `alias` targets.

Closes bazelbuild#22192.

PiperOrigin-RevId: 629865954
Change-Id: I6215c8484ddc08e75507191bfa1eb5bc709c5fc6
@fmeum fmeum deleted the 20582-flag-aliases branch May 2, 2024 07:06
github-merge-queue bot pushed a commit that referenced this pull request May 2, 2024
Fixes #20582

RELNOTES: Starlark command-line flags can now be referred to through
`alias` targets.

Closes #22192.

PiperOrigin-RevId: 629865954
Change-Id: I6215c8484ddc08e75507191bfa1eb5bc709c5fc6

Commit
43fdcd3

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Kila2 pushed a commit to Kila2/bazel that referenced this pull request May 13, 2024
Fixes bazelbuild#20582

RELNOTES: Starlark command-line flags can now be referred to through `alias` targets.

Closes bazelbuild#22192.

PiperOrigin-RevId: 629865954
Change-Id: I6215c8484ddc08e75507191bfa1eb5bc709c5fc6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Configurability platforms, toolchains, cquery, select(), config transitions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

alias() doesn't support surfacing a *_flag to the command line
3 participants