Harden the host's resolution heuristics: addon detection and Xcode workspace lookup
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- cli
Direzione di ricerca
Inizia da packages/host/src/node/path-utils.ts, esaminando isNodeApiModule, PLATFORM_EXTENSIONS e il TODO obsoleto, quindi esamina findXcodeWorkspace in packages/host/src/node/cli/xcode-helpers.ts. Verifica come funzionano il fast path e la ricerca discendente attuale. Il lavoro è completato quando il rilevamento degli addon richiede un’estensione specifica della piattaforma, il TODO obsoleto è rimosso e la ricerca del workspace risale dalle directory annidate prima di fallire.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 188
- Fork
- 10
- Merge medio
- 2g 17h
- PR unite (30g)
- 3
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di callstackincubator/react-native-node-api
-
Android 🤖
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects ApertaAndroid 🤖 good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
callstackincubator/react-native-node-api#163 · 1 commento ·
-
enhancement good first issue gyp-to-cmake
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
callstackincubator/react-native-node-api#161 · 3 commenti · 1 reazione ·
-
enhancement Host 🏡
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Automatable good first issue
Difficoltà 3/5 1-2 giorni Idoneità per principianti 15/100
callstackincubator/react-native-node-api#424 · 1 commento ·
Tutte le issue di callstackincubator/react-native-node-api
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ontola/atomic-server#1625 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
-
bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
midnightntwrk/midnight-sdk#403 ·