Repository navigation
Float16Array not working in node:v8 serde #55574
Description
Activity
- addedweb-standardsIssues and PRs related to web-platform APIs and standards compliance.Issues and PRs related to web-platform APIs and standards compliance.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.and removedv8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.web-standardsIssues and PRs related to web-platform APIs and standards compliance.Issues and PRs related to web-platform APIs and standards compliance.
on Oct 28, 2024 This doesn't have anything to do with the
serializefunction. Node.js doesn't provide aFloat16Array:$ node -p "Float16Array" [eval]:1 Float16Array ^ ReferenceError: Float16Array is not defined
Well, yeah, at the moment it doesn't. But once
Float16Arrayis added I think the support innode:v8will follow?Reacted by Aviv KellerAs noted in #52416 (comment), support for
Float16Arrayis in-progress in V8. It's currently behind a--js-float16arrayV8 runtime flag.Reacted by Bartek Iwańczuk, jakecastelli and Ash VardanianHiya, Bartek.
maybe there's a chance we could agree that arrayBufferViewTypeToIndex will return 13 for the Float16Array?
Seems uncontroversial to me. The one thing is that
arrayBufferViewIndexToType(13)is going to fail with a "Float16Array is not defined" ReferenceError but everything else will work just fine though.- added a commit that references this issue
on Nov 3, 2024 Hiya, Bartek.
maybe there's a chance we could agree that arrayBufferViewTypeToIndex will return 13 for the Float16Array?
Seems uncontroversial to me. The one thing is that
arrayBufferViewIndexToType(13)is going to fail with a "Float16Array is not defined" ReferenceError but everything else will work just fine though.Hey Ben, thanks for commenting. Should I open a PR that updates these function already? As you said they would fail with
ReferenceErrors for now, but onceFloat16Arraysupport lands they would start working.I guess we can update the functions and add the
--js-float16arrayflag in the test to validate it works.- added a commit that references this issue
on Dec 7, 2024 - added a commit that references this issue
on Dec 10, 2024 - added a commit that references this issue
on Dec 20, 2024 - added a commit that references this issue
on Jan 5, 2025 - added a commit that references this issue
on Oct 10, 2025
Version
23.1.0
Platform
Subsystem
node:v8
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
serializecalls finishes successfuly.What do you see instead?
Additional information
While I understand that
Float16Arrayis not yet supported (eg. #52416) as it requires upgrade to V8 12.4, maybe there's a chance we could agree thatarrayBufferViewTypeToIndexwill return13for theFloat16Array?node/lib/v8.js
Lines 277 to 293 in 5633c62
Thanks!