Split test_general into stable and experimental targets
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
- 45/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- c, javascript, node.js
- Lĩnh vực
- api, build-system, testing-qa
Hướng nghiên cứu
Bắt đầu với thư mục upstream test/js-native-api/test_general và binding.gyp của thư mục đó, sau đó so sánh cách CTS hiện port target experimental duy nhất. Xác định các nhóm feature stable và experimental được mô tả trong issue. Được xem là hoàn tất khi các test của stable API có thể được load mà không cần tất cả các symbol experimental, trong khi các test experimental vẫn được guard riêng và có thể build.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The upstream test_general test in the Node.js repository compiles a single target with NAPI_EXPERIMENTAL, which links against all experimental Node-API symbols (node_api_set_prototype, node_api_post_finalizer). This means the addon cannot be loaded on runtimes that don't export every experimental symbol.
In the CTS, this forces all test_general JS test files to guard loadAddon behind a check for every experimental feature the addon links against. The result is that even stable API tests (like napi_strict_equals, napi_typeof, napi_instanceof, etc.) are silently skipped on runtimes that don't support all experimental features.
Proposed solution
Split the upstream test_general into separate targets:
- Stable target — compiles without
NAPI_EXPERIMENTAL, includes all stable API functions - Experimental target(s) — one per experimental feature, compiled with the appropriate
NAPI_EXPERIMENTALdefine
This would allow the CTS to test stable APIs independently of experimental feature support.
Current workaround
The CTS ports test_general as a single experimental addon (matching upstream), with all JS tests guarded behind experimentalFeatures.setPrototype && experimentalFeatures.postFinalizer.
References
- Upstream source: https://github.com/nodejs/node/tree/main/test/js-native-api/test_general
- Upstream
binding.gypdefinesNAPI_EXPERIMENTALon the single target
- Ngôn ngữ chính
- C
- Star
- 18
- Fork
- 12
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
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 nodejs/node-api-cts
-
Drop Node.js v20 from CI matrix Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
nodejs/node-api-cts#37 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
nodejs/node-api-cts#85 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
nodejs/node-api-cts#84 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
nodejs/node-api-cts#61 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
nodejs/node-api-cts#35 · 1 reaction ·
Tất cả issue của nodejs/node-api-cts
Issue tương tự
-
os:linux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
mpv-player/mpv#18510 · 2 bình luận ·
-
internal.h中,漏掉了1个定义。 Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Broadcast Documentation Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
kovidgoyal/kitty#10516 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100