Harden the host's resolution heuristics: addon detection and Xcode workspace lookup
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
packages/host/src/node/path-utils.ts の isNodeApiModule、PLATFORM_EXTENSIONS、古い TODO から始め、次に packages/host/src/node/cli/xcode-helpers.ts の findXcodeWorkspace を調べます。fast path と現在の下方向検索がどのように動作するかを確認してください。アドオンの検出にプラットフォーム固有の拡張子が必要であり、古い TODO が削除され、workspace の検索がネストしたディレクトリから上方向にたどってから失敗するようになれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Two places in the host CLI where a shortcut stands in for a proper check. Both fail quietly or unhelpfully rather than loudly.
isNodeApiModule treats any .node file as an addon
The HACK short-circuits: if <path>.node exists, it returns true without ever checking that it is one of ours. But PLATFORM_EXTENSIONS is specific — .android.node and .apple.node — and a plain .node file is exactly what a Node.js-targeted addon (or a leftover node-gyp build output in build/Release/) looks like. Accepting it means auto-linking picks up something it cannot load, and the failure surfaces later and further away, at runtime on device.
The accompanying TODO on the doc comment asks for the same thing: check for a specific platform extension. Worth doing together, since the fast path exists to avoid the batch directory scan and any fix needs to preserve that.
While in this file: the TODO: Change to .apple.node above PLATFORMS (line 11) is stale — PLATFORM_EXTENSIONS.apple is already ".apple.node" two lines below. It can just be deleted.
findXcodeWorkspace gives up instead of walking upwards
The search descends into ios/macos from the starting directory and otherwise throws. Running the command from anywhere below the app root — src/, or a package directory in a monorepo, which is the normal place to be standing — fails with No Xcode workspace found in '<cwd>' even though the workspace is one level up. Walking up to the repository/package root before giving up (bounded, e.g. stopping at a .git or the filesystem root) would match what every other RN tool does.
- 主要言語
- TypeScript
- スター
- 188
- フォーク
- 10
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstackincubator/react-native-node-api のほかの issue
-
Android 🤖
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects オープンAndroid 🤖 good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
callstackincubator/react-native-node-api#163 · コメント 1 件 ·
-
enhancement good first issue gyp-to-cmake
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
callstackincubator/react-native-node-api#161 · コメント 3 件 · リアクション 1 件 ·
-
enhancement Host 🏡
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
Automatable good first issue
難易度 3/5 1〜2日 初心者へのやさしさ 15/100
callstackincubator/react-native-node-api#424 · コメント 1 件 ·
callstackincubator/react-native-node-api の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
bug v2
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
modelcontextprotocol/inspector#2458 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
carbon-design-system/ibm-products#9907 ·