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

Incremental build correctness: stale artifacts, destructive renames and undeclared build-phase I/O

オープン
#422 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
cmake, typescript

調査の方向性

packages/cmake-rn/src/cli.ts のクリーンアップ TODO から始め、次に packages/host/src/node/prebuilds/apple.ts の createFramework と、packages/host/src/node/cli/apple.ts の PBXShellScriptBuildPhase のセットアップを調べます。Apple の処理を packages/host/src/node/prebuilds/android.ts と比較します。古い出力が削除され、Apple の入力が CMake ビルドディレクトリに残り、Xcode のフェーズが入力と出力を宣言して変更のないビルドでスキップできるようになれば完了です。

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

説明

Apple 🍎 CMake RN Host 🏡

Three TODOs that individually look like nits but share a cause: the pipeline moves and renames build outputs, and none of the tooling around it knows that.

Stale build artifacts are no longer cleaned

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/cmake-rn/src/cli.ts#L306-L313

The cleanup is commented out with "Consider if this is still important 😬", and its own comment answers the question: it is important because we rename the output files. If a previous build left libfoo.so and the current one produces a differently named artifact, the stale file survives in outputPath and can be picked up downstream. Either restore it, or work out what made it unnecessary and delete the dead code with a note — leaving it commented out means neither.

createFramework renames its input instead of copying

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/host/src/node/prebuilds/apple.ts#L106-L110

fs.promises.rename moves the library out of the CMake build directory and into the framework, then rewrites its install name. From CMake's point of view its own output has vanished, so the next build has to relink — and any second consumer of that artifact finds it missing. Copying costs one file write and makes the step idempotent.

The Android side has the same shape but already copies (prebuilds/android.ts), so this is an inconsistency as much as a bug.

The Xcode build phase declares no inputs or outputs

https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/host/src/node/cli/apple.ts#L87-L94

A PBXShellScriptBuildPhase without inputPaths/outputPaths runs on every single build, and Xcode says so in the build log. Declaring them lets Xcode skip the phase when nothing changed — the difference between a no-op incremental build and re-running the addon pipeline on every ⌘B. This one interacts with the two above: declaring outputs is only sound once the artifacts stay where they are claimed to be.

主要言語
TypeScript
スター
188
フォーク
10
平均マージ
2日 17時間
マージ済み PR(30日)
3

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

callstackincubator/react-native-node-api のほかの issue

callstackincubator/react-native-node-api の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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