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

Be able to query semantic options from repository rules #10907

Open
oquenchil opened this issue Mar 5, 2020 · 6 comments
Open

Be able to query semantic options from repository rules #10907

oquenchil opened this issue Mar 5, 2020 · 6 comments
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Starlark-Integration Issues involving Bazel's integration with Starlark, excluding builtin symbols type: feature request

Comments

@oquenchil
Copy link
Contributor

I'm introducing an incompatible flag for a change to a repository rule that is under Bazel and therefore has to respect the incompatible change policy.

The change in logic has to happen in the repository rule, so I need to know there the value of the semantic option.

I ask you to please introduce a method that allows querying for these values. Even if it's just allowed from repositories that the Bazel team owns, which I believe is all that we need, since we are the ones introducing incompatible changes. Third-party repository rules don't have a reason to query these incompatible flag values.

@oquenchil oquenchil added type: feature request P2 We'll consider working on this in future. (Assignee optional) team-Starlark labels Mar 5, 2020
@oquenchil
Copy link
Contributor Author

@lberki

@lberki
Copy link
Contributor

lberki commented Mar 5, 2020

/cc @laurentlb

@aiuto
Copy link
Contributor

aiuto commented Apr 29, 2020

All rule authors also have a valid use case for querying incompatible flags and other semantic options. A typical case is where you want a rule set that can work during a migration, such that it takes advantage of new behavior if present, but falls back if not. This allows you to roll out new releases of your rules ahead of the breaking Bazel release, with the assurance that user will not be required to update their use of your rules along with the Bazel release.

Related: #11164

@brandjon
Copy link
Member

This issue affects pretty much all .bzl authors, and overlaps with requests to expose the bazel version to rule/macro logic. See also #8305 and #7428.

@brandjon brandjon added P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Build-Language and removed P2 We'll consider working on this in future. (Assignee optional) team-Starlark labels Feb 19, 2021
@brandjon brandjon added team-Starlark-Integration Issues involving Bazel's integration with Starlark, excluding builtin symbols and removed team-Build-Language labels Nov 4, 2022
Copy link

github-actions bot commented Jan 9, 2024

Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

@github-actions github-actions bot added the stale Issues or PRs that are stale (no activity for 30 days) label Jan 9, 2024
@aiuto
Copy link
Contributor

aiuto commented Jan 9, 2024

It's still a valid feature request. Being able to ask what features are present in this Bazel instance is incredibly useful for making rules that work across evolving bazel versions.

@github-actions github-actions bot removed the stale Issues or PRs that are stale (no activity for 30 days) label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Starlark-Integration Issues involving Bazel's integration with Starlark, excluding builtin symbols type: feature request
Projects
None yet
Development

No branches or pull requests

4 participants