uv lock(): support non-quiet output from the .run target
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- build-system
調査の方向性
@rules_python//python/uv:lock.bzl から始めて、マクロ lock() が .run ターゲットの uv コマンドをどのように組み立てているかを確認します。issue で説明されているオプションの quiet 動作を追加し、既存のデフォルトを維持したうえで、quiet = False の場合は通常の出力が可能になり、デフォルトでは引き続き --no-progress と --quiet が渡されることを検証します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Starlark
- スター
- 690
- フォーク
- 722
- 平均マージ
- 18時間 7分
- マージ済み PR(30日)
- 56
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bazel-contrib/rules_python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bazel-contrib/rules_python#3821 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
bazel-contrib/rules_python#4163 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
bazel-contrib/rules_python#4162 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
bazel-contrib/rules_python#4158 ·
-
help wanted
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
bazel-contrib/rules_python#4139 · コメント 2 件 ·
bazel-contrib/rules_python の issue をすべて見る
似ている issue
-
type/automation type/tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
priority: p3
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
googleapis/librarian#7636 ·
-
package-update
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
oSoWoSo/vOid_Community_repOsitory#147 · コメント 1 件 ·
-
Builders
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100