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

refactor(flags): return FeatureFlagInfo in --python_version flag #2167

Merged
merged 2 commits into from
Aug 31, 2024

Conversation

rickeylev
Copy link
Contributor

@rickeylev rickeylev commented Aug 30, 2024

Make the --python_version flag also return the FeatureFlagInfo provider.

There are two reasons to also return the FeatureFlagInfo provider:

First, it allows the flag implementation to change the value and have that value respected
by config_setting() later. This allows, for example, the rule to use custom logic (and
information from things it depends on) to determine the effective flag value.

Secondly, it makes the flag compatible with the Google fork of this rule, which is
implemented using FeatureFlagInfo, to help eventually converge them.

Along the way, add config_common to the Sphinx Bazel inventory.

@rickeylev rickeylev requested a review from aignas as a code owner August 30, 2024 21:45
@rickeylev rickeylev marked this pull request as draft August 30, 2024 21:46
@rickeylev rickeylev marked this pull request as ready for review August 30, 2024 21:48
@rickeylev rickeylev added this pull request to the merge queue Aug 31, 2024
Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

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

Maybe we should note that we now return a FeatureFlag from the python version in the changelog. Rules_pycross had this implemented on top of rules_python, so maybe now it is possible to reduce the duplication?

Edit: unqueued the PR in case you would like to add the changelog item.

@aignas aignas removed this pull request from the merge queue due to a manual request Aug 31, 2024
@rickeylev
Copy link
Contributor Author

Added to changelog.

@rickeylev rickeylev added this pull request to the merge queue Aug 31, 2024
Merged via the queue into bazelbuild:main with commit 54c9fab Aug 31, 2024
4 checks passed
@rickeylev rickeylev deleted the google.featflaginfo branch September 3, 2024 03:16
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.

2 participants