Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Make the vendored Node-API sources distinguishable from our own code

Aperta
#228 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

Inizia facendo l’inventario di Core/Node-API/Source, confrontando js_native_api_v8.cc, js_native_api_v8_internals.h e js_native_api_v8.h con le loro controparti Node.js. Esamina #70, #227, i marker [BABYLON-NATIVE-ADDITION] esistenti e i riferimenti upstream citati nell’issue. Il lavoro sarà considerato completato quando il progetto avrà una struttura e uno schema di provenienza concordati che distinguano tra file upstream, file upstream modificati e file interni al progetto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

[Filed by Copilot on behalf of @bghgary]

Core/Node-API/Source mixes files vendored from Node.js with implementations we wrote, and nothing marks which is which. #227 is what that costs: js_native_api_v8_internals.h looks vendored but is a hand-written shim, and it carried a handle leak from the original 2019 fork until last week.

Syncing does not fix it. #70 ("Update Node-API to latest from node.js") rewrote 54 lines of that same file in 2024 and left the bug in, because the file has no upstream counterpart to copy from — upstream's version pulls in node_internals.h / env.h / util-inl.h, so ours reimplements OneByteString, the CHECK macros and PersistentToLocal locally.

A 3rdparty/<name>/ directory carrying a README or license that links the source would cover the straightforward case, but it doesn't fit cleanly here: we vendor a subset of Node's files and add engine implementations (Chakra, JavaScriptCore, QuickJS) alongside them.

What structure actually works is the open question:

  • which files are verbatim upstream, which are modified upstream, and which are ours
  • where the upstream ref is recorded, so a future sync knows what it is syncing from
  • whether per-change markers are enough — the [BABYLON-NATIVE-ADDITION] convention is currently 7 lines in js_native_api_v8.cc, 3 in js_native_api_v8_internals.h, and 0 in js_native_api_v8.h
Lingua principale
C++
Stelle
22
Fork
23
Merge medio
4g 8h
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di BabylonJS/JsRuntimeHost

Tutte le issue di BabylonJS/JsRuntimeHost

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.