Port the make_callback test addon from #219 and enable node-api/test_async in node-tests
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- c, cmake, javascript, node.js, typescript
- Lĩnh vực
- build-system, testing-qa
Hướng nghiên cứu
Bắt đầu với packages/node-addon-examples/src/index.ts, template CMake của tests/async, scripts/copy-tests.mts và packages/node-tests/common.ts; so sánh các tệp make_callback từ #219 với addon threadsafe-function từ #398. Chạy các bước kiểm tra node-addon-examples và node-tests của repository. Hoàn tất có nghĩa là addon được build và đăng ký, node-api/test_async được bật, và cả hai đường dẫn kiểm thử đều vượt qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 188
- Fork
- 10
- Merge trung bình
- 2 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstackincubator/react-native-node-api
-
Android 🤖
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projects Đang mởAndroid 🤖 good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
callstackincubator/react-native-node-api#163 · 1 bình luận ·
-
enhancement good first issue gyp-to-cmake
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
callstackincubator/react-native-node-api#161 · 3 bình luận · 1 reaction ·
-
enhancement Host 🏡
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Automatable good first issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 15/100
callstackincubator/react-native-node-api#424 · 1 bình luận ·
Tất cả issue của callstackincubator/react-native-node-api
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/inspector#2458 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carbon-design-system/ibm-products#9907 ·