Skip to content

Conversation

@bnoordhuis
Copy link
Member

Fixes: #58873

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/node-api

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. node-api Issues and PRs related to the Node-API. labels Jun 29, 2025
@legendecas
Copy link
Member

There is an open PR for this: #58879

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicates #58879

@bnoordhuis
Copy link
Member Author

The other guy should have back-linked to the issue... from a quick glance, that PR breaks ABI; this one doesn't.

@jasnell
Copy link
Member

jasnell commented Jun 29, 2025

Ok, the other PR can be updated to fix any remaining issues. I'd encourage providing review comments and suggestions there.

@codecov

This comment was marked as resolved.

@bnoordhuis
Copy link
Member Author

Why? This one is perfect. It's not first come, first serve, right?

napi_float64_array,
napi_bigint64_array,
napi_biguint64_array,
napi_float16_array,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without breaking the ABI, we still need to mark this as NAPI_EXPERIMENTAL as mentioned in #58879 (comment) until this is been backported to all LTS lines.

In addition, we need a feature macro, to allow addons to detect a new feature: https://github.com/nodejs/node/blob/main/doc/contributing/adding-new-napi-api.md#process-and-approval.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without breaking the ABI

The problem with this in #58879 was that the enum value was added in the middle. Adding an extra enum value at the end, as it is done here, is generally not ABI-breaking since it does not change the numeric values of the other enum alternatives.

Copy link
Member

@legendecas legendecas Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not saying this breaks ABI. My point is we need guard this with NAPI_EXPERIMENTAL (and a NAPI_VERSION bump soon in the next versions) and a feature macro to allow addons detect that APIs like napi_create_typedarray are supported with napi_float16_array at both build time and run time.

@jasnell
Copy link
Member

jasnell commented Jun 29, 2025

Certainly not first come first serve but there's also no harm at all in helping a newer contributor work through any remaining issues in their PR. And as @legendecas points out there are outstanding issues in the PR also.

@legendecas
Copy link
Member

Thank you very much for the patch! Still, we have #58879 landed.

@legendecas legendecas closed this Nov 18, 2025
@github-project-automation github-project-automation bot moved this from Need Triage to Done in Node-API Team Project Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. node-api Issues and PRs related to the Node-API.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Add Float16Array support to node-api

5 participants