Version-derived feature flags in the node implementor misfire on runtimes that report a fictional Node version
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- bun, deno, javascript, node.js
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu với implementors/node/features.js và README của node implementor; kiểm tra các bước kiểm tra process.version hiện có và tiền lệ trong #68. Quyết định xem node implementor nên ghi lại giả định về Node thực hay phát hiện các capability trước khi bật flags. Hoàn thành khi hành vi được chọn ngăn các runtime bên ngoài thử các trường hợp SharedArrayBuffer không được hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
implementors/node/features.js derives experimentalFeatures.sharedArrayBuffer and
runtimeFeatures.dataviewSharedArrayBuffer from process.version. While exploring how
far foreign runtimes get with the suite, I ran it through the node implementor under
Deno 2.9.5, and its Node compatibility mode reports process.version as v26.3.0, a
Node version that does not exist. The version comparison therefore enables the
SharedArrayBuffer cases, but Deno exports neither node_api_create_sharedarraybuffer
nor node_api_is_sharedarraybuffer, so the addon fails at load time instead of the test
being skipped: on Linux the process exits 127 on the unresolved symbols, and on Windows
dlopen reports it cannot load the addon. The suite output then reads like a broken
test rather than a missing feature. Bun does the same kind of impersonation, its stable
1.3.14 reports v24.3.0 and its current canary also reports v26.3.0, so any invented
version string can end up in these comparisons.
For Node itself the version checks are exactly right, and #26 already made features.js
a per-implementor file, so an eventual bun or deno implementor would declare its own
honest flags. The situation above only exists in the period before such implementors do,
which is also exactly when someone evaluates a new runtime by pointing the node
implementor at it. So a small question rather than a proposal: is that simply out of
scope for the node implementor (worth a sentence in its README that its flags are only
meaningful under real Node), or would you want flags like these derived from a probe of
the actual runtime rather than from the version string? #68 adds one more flag in the
current version-derived style, so whatever you prefer would apply there too. Happy to
help with either outcome.
- 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ó 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 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
nodejs/node-api-cts#34 ·
Tất cả issue của nodejs/node-api-cts
Issue tương tự
-
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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
zephyrproject-rtos/zephyr#120011 ·