Uh oh!
There was an error while loading. Please reload this page.
feat(uv): add --directory support for locking - #4029
Conversation
@rickeylev, if you wish, you could point your agent at this. It would be great to finish the Windows parts. This should make it possible to have the |
Support Windows cmd execution in uv lock and pip-compile action templates, and correctly remap arguments, relative paths, and output targets when using the directory attribute or nested projects.
rickeylev
commented
Aug 26, 2026
…k_run_test Ensure assertions on generated script contents in lock_run_test succeed on Windows where directory path separators are backslashes.
Update directory attribute documentation to use VERSION_NEXT_FEATURE, remove trailing docstring backslash, wrap Starlark lines to 80 columns, and add the news entry fragment for PR bazel-contrib#4029.
Move :::versionadded VERSION_NEXT_FEATURE directive into the main lock macro docstring.
Support format parameter in _args helper and use args.add(rerooted_project, format="--project=%s").
Restore comments explaining POSIX symlink and Windows copy mechanisms for existing lock files.
rickeylev
left a comment
There was a problem hiding this comment.
OK, agent carried windows support through.
Not sure if I entirely agree/understand some of its changes. It made a bunch of changes to the add_all helper struct which i dont' fully grok.
Uh oh!
There was an error while loading. Please reload this page.
aignas
commented
Sep 2, 2026
I have also added lock file targets to the |

Currently, requirements locking targets are tightly coupled to the Bazel
package directory where the lock rule is declared. This prevents having
reusable invocations across different example packages (e.g.
examples/bzlmodand
examples) that produce identical lock files, hindering migration fromcompile_pip_requirementsto thelockrule.To resolve this, add a
directoryattribute to thelockmacro and rules topass
--directorytouv lockanduv pip compile. Reroot input sources,constraints, and project root arguments relative to the specified working
directory, and update UNIX and Windows execution templates to handle directory
remapping seamlessly.