Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

rust.sh shares one CARGO_TARGET_DIR across worktrees, so a scratch-copy build poisons the next run

クローズ 初心者向け
#906 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker, rust, shell

調査の方向性

scripts/rust.shから始め、CARGO_TARGET_DIRの設定方法とソースコードのマウント方法を調べてください。説明されている一時コピーでのビルドに続けてworktreeで実行する手順を再現し、提案されている2つの修正のどちらがスクリプトに適しているかを評価してください。次回のworktreeでの実行時に古い成果物が使われなくなるか、必要なソースコードの変更がスクリプトに明確に記載されれば完了です。確認のため、該当するテストスイートを再実行してください。

索引モデルが issue の本文から書いたものです。

説明

scripts/rust.sh runs every build in one container with CARGO_TARGET_DIR=/target and the source mounted at /work/nostream. A build of a scratch copy of the tree — the shape a reviewer uses to prove a fix by reverting it — writes into that same target directory, and the next worktree run then reads artifacts keyed to the scratch path.

Measured during the 4.0 rewrite (006-nostream-core, round 3): a revert build followed by the worktree suite gave 51 passed / 2 failed; touch-ing the affected sources and re-running gave 53 passed / 0 failed, with no source change. The failures were stale artifacts, not defects.

Two candidate fixes:

  1. Isolate the target for a scratch run: pass CARGO_TARGET_DIR=/target-$(basename "$PWD") (or a caller-supplied CARGO_TARGET_DIR) instead of a single shared /target.
  2. Keep the shared target and document the requirement in the script header: after building anything outside the job worktree, touch the sources before the next worktree run.

(2) is a one-line comment; (1) costs a cold build per distinct path but removes the trap. The reviewer that hit it lost one round-trip and nearly reported a regression that did not exist.

主要言語
TypeScript
スター
829
フォーク
234
平均マージ
17時間 46分
マージ済み PR(30日)
73

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cameri/nostream のほかの issue

cameri/nostream の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。