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.
Problem
The
lock()macro in@rules_python//python/uv:lock.bzlgenerates a.runtarget whose shell script hardcodes--no-progress --quietwhen invoked viabazel run:This means all uv output is suppressed. Passing
--verbosedoes not work — uv rejects--quietand--verbosetogether with an error:Use case
We call
bazel run //:uv_lock.run -- --checkfrom ajustrecipe to verify thatuv.lockis consistent withpyproject.toml(a developer workflow check, not a CI test). With--quiethardcoded, 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
quietattribute to thelock()macro (defaulting toTrueto preserve existing behavior) that controls whether--quietand--no-progressare passed to the.runscript:Workaround
We currently work around this by adding a custom Starlark rule (
uv_lock_check_run) that inherits the same runfiles as.runbut finds the uv binary at runtime and calls it directly without--quiet. This wrapper exists solely because the attribute is not exposed.