Port the make_callback test addon from #219 and enable node-api/test_async in node-tests
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- c, cmake, javascript, node.js, typescript
調査の方向性
packages/node-addon-examples/src/index.ts、tests/async の CMake テンプレート、scripts/copy-tests.mts、packages/node-tests/common.ts から始め、#219 の make_callback ファイルと #398 の threadsafe-function addon を比較します。リポジトリの node-addon-examples と node-tests のチェックを実行します。完了の条件は、addon がビルドされて登録され、node-api/test_async が有効化され、両方のテストパスが成功することです。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- 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 ·