Skip to content

feat(bzlmod): add python.override APIs #2222

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

Merged
merged 11 commits into from
Sep 22, 2024

Conversation

aignas
Copy link
Collaborator

@aignas aignas commented Sep 15, 2024

Before this PR the users could not override how the hermetic toolchain
is downloaded when in bzlmod. However, the same APIs would be
available to users using WORKSPACE. With this we also allow root
modules to restrict which toolchain versions the non-root modules, which
may be helpful when optimizing the CI runtimes so that we don't waste
time downloading multiple micro versions of the same 3.X python
version, which most of the times have identical behavior.

Whilst at it, tweak the semver implementation to allow for testing of
absence of values in the original input.

Work towards #2081 and this should be one of the last items that are
blocking #1361 from the API point of view.

Replaces #2151.

@aignas aignas marked this pull request as draft September 15, 2024 06:41
Before this PR the users could not override how the hermetic toolchain
is downloaded when in `bzlmod`. However, the same APIs would be
available to users using `WORKSPACE`. With this we also allow root
modules to restrict which toolchain versions the non-root modules, which
may be helpful when optimizing the CI runtimes so that we don't waste
time downloading multiple `micro` versions of the same `3.X` python
version, which most of the times have identical behavior.

Whilst at it, tweak the `semver` implementation to allow for testing of
absence of values in the original input.

Work towards bazel-contrib#2081 and this should be one of the last items that are
blocking bazel-contrib#1361 from the API point of view.
@aignas aignas force-pushed the feat/python-override branch from 45984a5 to 42df522 Compare September 17, 2024 06:23
@aignas aignas marked this pull request as ready for review September 19, 2024 02:46
Copy link
Collaborator

@rickeylev rickeylev left a comment

Choose a reason for hiding this comment

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

Reviewed everything but the python.bzl part and its tests. Just some doc fixes thus far.

@aignas aignas enabled auto-merge September 22, 2024 04:55
@aignas aignas added this pull request to the merge queue Sep 22, 2024
Merged via the queue into bazel-contrib:main with commit b92927d Sep 22, 2024
4 checks passed
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