chore(examples): replace compile_pip_requirements with uv lock() - #4110
Draft
rickeylev wants to merge 7 commits into
Draft
chore(examples): replace compile_pip_requirements with uv lock()#4110rickeylev wants to merge 7 commits into
rickeylev wants to merge 7 commits into
Conversation
Modernize requirement locking across Bzlmod-enabled examples and documentation to use uv via the lock() rule instead of pip-compile. Migrate requirement targets in Bzlmod examples to lock() and update universal and Windows lockfiles. Canonicalize platform labels in lock() so submodules resolve targets correctly.
Format multi-word flag arguments as key=value pairs (--flag=val) for clarity. Add DO NOT SUBMIT comment in other_module/MODULE.bazel to consider making uv auto-used before switching all examples over to it.
Note that platform labels in lock() are canonicalized for submodules.
Move [tool.uv] settings subsection directly under uv pip compile (bzlmod) before the pip compile (WORKSPACE) section.
Update bzlmod_lockfile MODULE.bazel.lock after canonical label changes in common_labels.bzl and lock.bzl.
Clarify that consideration of making uv auto-used is a DO NOT MERGE condition.
aignas
reviewed
Aug 24, 2026
Comment on lines
+44
to
+45
| # DO NOT MERGE: consider making uv auto-used before switching | ||
| # everything over to it. |
Collaborator
There was a problem hiding this comment.
What about uv not being present in WORKSPACE?
Collaborator
|
Do we need #4029 to be able to fully switch? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using
pip-compileviacompile_pip_requirementsis slower and beingsuperseded by
uvfor requirement locking under Bzlmod. Demonstratinglock()in the examples ensures users follow modern best practicesand benefit from faster dependency resolution.
Migrate Bzlmod-enabled example workspaces and documentation to use the
lock()macro in place ofcompile_pip_requirements, updating theassociated requirements targets and lockfiles. Additionally,
canonicalize platform labels within
lock()so submodules resolvetargets reliably.
DO NOT MERGE: consider making uv auto-used before switching everything
over to it.