uv lock(): support non-quiet output from the .run target
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- build-system
Research direction
Start in @rules_python//python/uv:lock.bzl and inspect how the lock() macro assembles the .run target's uv command. Add the optional quiet behavior described in the issue, preserving the existing default, and verify that quiet = False allows normal output while the default still passes --no-progress and --quiet.
Written by the indexing model from the issue text.
Description
Problem
The lock() macro in @rules_python//python/uv:lock.bzl generates a .run target whose shell script hardcodes --no-progress --quiet when invoked via bazel run:
exec '.../uv' 'lock' '--no-python-downloads' '--no-cache' '--project' '.' '--python' '...' '--no-progress' '--quiet' "$@"
This means all uv output is suppressed. Passing --verbose does not work — uv rejects --quiet and --verbose together with an error:
error: the argument '--quiet...' cannot be used with '--verbose...'
Use case
We call bazel run //:uv_lock.run -- --check from a just recipe to verify that uv.lock is consistent with pyproject.toml (a developer workflow check, not a CI test). With --quiet hardcoded, there is no feedback on success and no details on failure about what changed. We want uv's normal output (e.g. "Resolved 562 packages in 5.75s" on success, or the list of changed packages on failure).
Proposed solution
Add an optional quiet attribute to the lock() macro (defaulting to True to preserve existing behavior) that controls whether --quiet and --no-progress are passed to the .run script:
lock(
name = "uv_lock",
srcs = ["pyproject.toml", "uv.lock"],
out = "uv.lock",
quiet = False, # show uv output when running bazel run //:uv_lock.run
)
Workaround
We currently work around this by adding a custom Starlark rule (uv_lock_check_run) that inherits the same runfiles as .run but finds the uv binary at runtime and calls it directly without --quiet. This wrapper exists solely because the attribute is not exposed.
- Dominant language
- Starlark
- Stars
- 690
- Forks
- 722
- Avg merge
- 18h 7m
- Merged PRs (30d)
- 56
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bazel-contrib/rules_python
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bazel-contrib/rules_python#3821 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
bazel-contrib/rules_python#4163 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
bazel-contrib/rules_python#4162 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
bazel-contrib/rules_python#4158 ·
-
help wanted
Difficulty 3/5 1-2 days Newbie friendliness 68/100
bazel-contrib/rules_python#4139 · 2 comments ·
All issues in bazel-contrib/rules_python
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oSoWoSo/vOid_Community_repOsitory#147 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
agentic-workflows cascade-suspected
Difficulty 1/5 Under an hour Newbie friendliness 88/100