Preserve the previous build output when writing its Cargo receipt fails
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 56/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
- 領域
- build-system, cli
調査の方向性
Start at the binary activation and receipt writing sequence in tools/src/build.rs around line 119, then trace the existing package backup restoration work in #1001 and the build identity checks. Reproduce the receipt destination conflict described in the issue and inspect the build-cargo tests for activation and rollback coverage. Done means a failed receipt write preserves both previous outputs or reports a retained recovery location, with successful builds activating a matching pair.
索引モデルが issue の本文から書いたものです。
説明
Problem
The build-cargo helper replaces the requested output binary before writing its build.json receipt. If receipt serialization or activation fails, the helper returns an error after the previous output has already been lost. The two outputs can then describe different build generations.
Starting point: binary activation followed by receipt writing.
Reproduction
Audited canonical master e1f8effd195b6339c3979b1e091e63c25f1da983 on Linux amd64 with checkout-built Wave 0.0.1-alpha-dev, matching std, Rust 1.89.0, Cargo jobs=2 and LLVM 21.1.8. The master SHA was rechecked before registration.
Build the two tools from the audited checkout using the pinned toolchain and matching LLVM. The following Linux reproduction invokes real incremental Cargo, uses only disposable output paths, and makes the receipt destination a directory to force a deterministic activation error:
from pathlib import Path
import os
import subprocess
import tempfile
root = Path.cwd()
with tempfile.TemporaryDirectory(prefix="wave-build-receipt-") as temporary:
output = Path(temporary) / "wavec"
output.write_bytes(b"PREVIOUS-COMPILER")
receipt = output.with_suffix(".build.json")
receipt.mkdir()
environment = os.environ.copy()
environment["LLVM_SYS_211_PREFIX"] = "/usr/lib64/llvm21"
result = subprocess.run([
str(root / "target/debug/wave-tools"), "build-cargo",
"--target", "x86_64-unknown-linux-gnu",
"--binary", str(root / "target/debug/wavec"),
"--output", str(output), "--",
"cargo", "+1.89.0", "build", "--locked", "--jobs", "2",
"-p", "wavec", "--bin", "wavec",
], env=environment, capture_output=True, text=True, timeout=300)
print("exit:", result.returncode)
print(result.stderr.strip())
print("old bytes preserved:", output.read_bytes() == b"PREVIOUS-COMPILER")
print("output header:", output.read_bytes()[:4])
Observed:
exit: 1
wave-tools: Is a directory (os error 21)
old bytes preserved: False
output header: b'\x7fELF'
The Cargo compiler build itself succeeded. Despite the helper's failed result, the previous sentinel was replaced by the new compiler. A directory at the receipt path is one reproducible failure injection, not the only possible receipt I/O failure.
Scope
Treat binary and receipt activation as one recoverable build-output operation. Prepare and validate both destinations before replacement; any later failure must preserve or restore the prior output set, retaining a recoverable backup if restoration itself fails. Keep Cargo compilation and Meson orchestration unchanged.
Related: #1001 covered package-set backup restoration, while #1070 delivered Rust tooling. Neither covers this build-cargo binary/receipt activation order.
Completion criteria
- A receipt-write failure leaves the previous binary and receipt usable, or reports a retained recovery location if rollback cannot finish.
- A successful invocation activates a matching binary/receipt pair.
- Regressions cover a conflicting receipt destination and failures around activation and restoration.
- Native platform replacement semantics and existing package/build identity checks remain intact.
- 主要言語
- Rust
- スター
- 56
- フォーク
- 21
- 平均マージ
- 20時間 49分
- マージ済み PR(30日)
- 45
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
wavefnd/Wave のほかの issue
-
Reject unrepresentable POSIX listener descriptors before Unix-domain accept対応中かも @ShahadatTest が 2 日前に担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
wavefnd/Wave#1082 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug help wanted
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
bug help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 53/100
メンテナーはふだん 1 日以内に返信
-
bug ci help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
Prevent compiler stack overflow on long acyclic forward type-alias chains対応中かも @hiyouwhatsapp が 3 日前に担当しました。 オープンbug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
🐞 bug 🧩 bevy_gantz_egui
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
nannou-org/gantz#500 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
metasequoiaime/msime#10989 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fritzprix/libr-agent#2612 ·
メンテナーはふだん 1 日以内に返信
-
crate: spate-core priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NSPG13/agent-bounties#1749 ·
メンテナーはふだん 1 日以内に返信