Port the make_callback test addon from #219 and enable node-api/test_async in node-tests
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- c, cmake, javascript, node.js, typescript
- Bereich
- build-system, testing-qa
Rechercherichtung
Beginne mit packages/node-addon-examples/src/index.ts, der CMake-Vorlage für tests/async, scripts/copy-tests.mts und packages/node-tests/common.ts; vergleiche die Dateien make_callback aus #219 mit dem threadsafe-function-Addon aus #398. Führe die Checks des Repositorys für node-addon-examples und node-tests aus. Erledigt bedeutet, dass das Addon gebaut und registriert wird, node-api/test_async aktiviert ist und beide Testpfade erfolgreich sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Two test-coverage follow-ups deferred from #398. Both validate functionality that Hermes' first-party Node-API implementation provides on its own (independent of the hermes_napi_host integration), so they were split out as test-infrastructure work.
1. Port the make_callback test addon from #219
napi_async_init / napi_async_destroy / napi_make_callback are provided natively by the vendored Hermes since the static_h adoption (the injector binds the full symbol surface), which obsoletes #219's host-side C++ implementation — but its test addon (tests/make_callback/: addon.c adapted from Node's own test plus a promise-less driver asserting receiver/argument/return-value plumbing) ports directly to the packages/node-addon-examples/tests/<name>/ pattern established there and in #398:
- Copy
addon.c,addon.js,binding.gypfrom #219 (credit @paradowstack), add the checked-inCMakeLists.txtper thetests/asynctemplate and apackage.jsonwith a unique name (e.g.make-callback-test). - Register under
suites.testsinpackages/node-addon-examples/src/index.ts.
Expected to pass as-is against next — a failure would be a real conformance finding against Hermes' implementation.
2. Enable node-api/test_async in packages/node-tests
The entry exists but is commented out in scripts/copy-tests.mts's ALLOW_LIST. Two independent blockers:
commonshims: the bundling pipeline aliases../../commontopackages/node-tests/common.ts, which currently only exportsbuildType. Upstreamtest.jsusescommon.mustCall. A faithfulmustCall/mustCallAtLeast/mustNotCallneeds a home for its verification step: upstream checks call counts at process exit, which has no analogue in the long-lived mocha-remote app — the shim needs a per-test verification hook wired into the generated suite (e.g. anafterEach-style flush exposed fromcommon.ts).<uv.h>in the C side: upstreamtest_async.cincludes<uv.h>directly, so enabling it also needs a small uv shim along the lines of the pthread-based one written fortests/threadsafe-function/addon.cin #398 (or an upstream contribution making the test buildable without libuv).
Note on value: the behavioral coverage largely overlaps the hand-written tests/async addon (create/queue/cancel/delete, cancel-while-queued via pool saturation — upstream's MAX_CANCEL_THREADS 6 trick is the same one tests/async already uses — plus the #398 additions for thread identity and cancel-while-running). The win from enabling the upstream suite is conformance tracking against Node itself rather than new coverage, which is also why it wasn't a blocker for #398.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 191
- Forks
- 10
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 3
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus callstackincubator/react-native-node-api
-
Android 🤖
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projectsOffenAndroid 🤖 good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
callstackincubator/react-native-node-api#163 · 1 Kommentar ·
-
enhancement good first issue gyp-to-cmake
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
callstackincubator/react-native-node-api#161 · 3 Kommentare · 1 Reaktion ·
-
enhancement Host 🏡
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
-
Automatable good first issue
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 15/100
callstackincubator/react-native-node-api#424 · 1 Kommentar ·
Alle Issues in callstackincubator/react-native-node-api
Ähnliche Issues
-
refactor
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 5 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
OHDSI/Data2Evidence#3450 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
e2e-failure ready-to-code
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
redhat-developer/rhdh-plugin-export-overlays#4011 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
automation missing-model model-sync provider:ofox
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
anomalyco/models.dev#8421 ·
Maintainer antworten meist innerhalb von 1 Tag
-
SlackAdapter and TelegramAdapter are not assignable to Adapter under exactOptionalPropertyTypesOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag