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: fold per-target python version into base rules #2541

Merged

Conversation

rickeylev
Copy link
Collaborator

Today, specifying the Python version for a target requires using the version-aware
rules in transition.bzl (or the generated equivalents bound to a specific Python
version). With the rules rewritten in Bazel, that functionality can be moved into
the base rules themselves. Moving the logic into the base rules simplifies the
implementation and avoids having to re-implement subtle behaviors in the wrappers
to correctly emulate the wrapped target.

For backwards compatibility, the symbols in transition.bzl are left as aliases
to the underlying rules.

@rickeylev rickeylev requested a review from aignas as a code owner December 29, 2024 19:00
@rickeylev rickeylev force-pushed the refactor.consolidate.pyversion.transition branch 3 times, most recently from 41e1574 to 73df96d Compare December 29, 2024 20:55
@rickeylev rickeylev force-pushed the refactor.consolidate.pyversion.transition branch from 73df96d to 535be2f Compare December 30, 2024 00:19
python/config_settings/transition.bzl Outdated Show resolved Hide resolved
python/config_settings/transition.bzl Show resolved Hide resolved
@rickeylev rickeylev enabled auto-merge December 31, 2024 23:31
@rickeylev rickeylev added this pull request to the merge queue Dec 31, 2024
Merged via the queue into bazelbuild:main with commit 611eda8 Dec 31, 2024
4 checks passed
@rickeylev rickeylev deleted the refactor.consolidate.pyversion.transition branch January 1, 2025 22:35
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