bregctl: project lock adds a missing digest after the entry's trailing blank line
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
crates/registry-bregctl/src/module_lock_patch.rsから始め、特にpatch_module_locksとkey_value_endを確認し、その後このファイルのユニットテストを読みます。最後のエントリの場合と、エントリの後に空行がある場合に、item.endがどこを指すかを確認します。両方のケースのテストを追加します。digestがそのエントリと一緒に保たれ、次のトップレベルキーの前の空行が保持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When a modules[] entry has no digest yet, bregctl project lock adds one at the end of the
entry. If the entry ends with a blank line (the usual spacing before the next top-level key),
the digest goes after the blank line, so the entry is split by a blank line. The YAML is still
valid and check accepts it, so this is cosmetic, but the lock is meant to be a minimal patch that
leaves the author's layout alone.
Minimal repro, a registry.yaml with:
modules:
- id: inspections
version: 0.1.0
evidenceProviders:
# ...
After bregctl project lock <project>:
modules:
- id: inspections
version: 0.1.0
digest: "sha256:..."
evidenceProviders:
# ...
Expected:
modules:
- id: inspections
version: 0.1.0
digest: "sha256:..."
evidenceProviders:
# ...
Likely fix: in crates/registry-bregctl/src/module_lock_patch.rs, patch_module_locks inserts a
missing digest at item.end (around line 131). For the last entry that is the end of the
modules block, which key_value_end (line 230) places after blank lines; for an earlier entry
it is the next entry's first line, so a blank line between entries has the same effect. Inserting
after the last non-blank line of the item fixes both.
Tests: unit tests in the same file (mod tests, line 249): one for the last entry followed by a
blank line and a top-level key, one for a blank line between two entries.
- 主要言語
- Rust
- スター
- 2
- フォーク
- 0
- 平均マージ
- 10時間 32分
- マージ済み PR(30日)
- 269
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
registrystack/registry-stack のほかの issue
-
area:docs documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
registrystack/registry-stack#2253 ·
メンテナーはふだん 1 日以内に返信
-
area:coordinator bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
registrystack/registry-stack#2252 ·
メンテナーはふだん 1 日以内に返信
-
area:release bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
registrystack/registry-stack#2248 ·
メンテナーはふだん 1 日以内に返信
-
area:breg documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
registrystack/registry-stack#2233 ·
メンテナーはふだん 1 日以内に返信
-
area:breg bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
registrystack/registry-stack#2227 ·
メンテナーはふだん 1 日以内に返信
registrystack/registry-stack の issue をすべて見る
似ている issue
-
engine-rs P3 review-deferral wasm
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
maniator/verticopolis#1154 ·
メンテナーはふだん 1 日以内に返信
-
FFMPEG_BIN/FFPROBE_BIN are always overridden, so a working system ffmpeg cannot be used対応中かも @Bilker1422 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Stremio/stremio-service#116 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信