Skip to content

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

Merged
rickeylev merged 2 commits intobazel-contrib:mainfrom
rickeylev:google.featflaginfo
Aug 31, 2024
Merged

refactor(flags): return FeatureFlagInfo in --python_version flag#2167
rickeylev merged 2 commits intobazel-contrib:mainfrom
rickeylev:google.featflaginfo

Conversation

@rickeylev
Copy link
Copy Markdown
Collaborator

@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 force-pushed the google.featflaginfo branch from a92a8bb to 0c75cb9 Compare August 30, 2024 21:48
@rickeylev rickeylev marked this pull request as ready for review August 30, 2024 21:48
@rickeylev rickeylev enabled auto-merge August 30, 2024 22:04
@rickeylev rickeylev added this pull request to the merge queue Aug 31, 2024
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

Added to changelog.

@rickeylev rickeylev enabled auto-merge August 31, 2024 14:10
@rickeylev rickeylev added this pull request to the merge queue Aug 31, 2024
Merged via the queue into bazel-contrib:main with commit 54c9fab Aug 31, 2024
@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