Skip to content

feat: uv --directory support for locking - #4029

Draft
aignas wants to merge 6 commits into
bazel-contrib:mainfrom
aignas:aignas.chore.use_lock_everywhere
Draft

feat: uv --directory support for locking#4029
aignas wants to merge 6 commits into
bazel-contrib:mainfrom
aignas:aignas.chore.use_lock_everywhere

Conversation

@aignas

@aignas aignas commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

With this PR we will be able to decouple how the locking rule is working from
which BUILD.bazel file contains the rule. This means that we can have duplicate
invocations in the examples/bzlmod and examples that would yield exactly
the same thing, allowing us to essentially migrate all of the invocations of
compile_pip_requirements everywhere to the lock rule.

The goal is to ensure that all of the following invocations can have the same
output:

  • bazel run <lock_target>.run
  • bazel run <lock_target>.update
  • uv <cmd>

Summary:

  • Add uv pip compile --directory support on UNIX.
  • Add uv lock --directory support on UNIX.
  • Add uv pip compile --directory support on Windows.
  • Add uv lock --directory support on Windows.
  • Add integration tests for various setups in tests/uv.
  • Add unit tests for the code to ensure the paths are correctly remapped.

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.

1 participant