Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error running on Node 20.12 (works in 20.11.6) in napi-intl.h when calling napi_status napi_create_external_buffer #52754

Open
mylowillem opened this issue Apr 29, 2024 · 2 comments
Labels
build Issues and PRs related to build files or the CI.

Comments

@mylowillem
Copy link

Version

20.12

Platform

Windows and OSX

Subsystem

napi-intl.h

What steps will reproduce the bug?

Line 2680 in file napi-intl.h

How often does it reproduce? Is there a required condition?

always it's a compiler error

What is the expected behavior? Why is that the expected behavior?

The code compiles in node 20.11.2 so I expect it to compile in node 20.12

What do you see instead?

Severity Code Description Project Line Suppression State Details File
Error C2664 'napi_status napi_create_external_buffer(napi_env,size_t,void *,node_api_nogc_finalize,void *,napi_value *)': cannot convert argument 4 from 'void (__cdecl *)(napi_env,void *,void *) noexcept' to 'node_api_nogc_finalize' binary_encoder 2680 C:\git\cloud\node_modules\node-addon-api\napi-inl.h

Additional information

Compiler errors on both OSX and Windows. Haven't tested on Linux

Severity Code Description Project Line Suppression State Details File
Error C2664 'napi_status napi_create_external_buffer(napi_env,size_t,void *,node_api_nogc_finalize,void *,napi_value *)': cannot convert argument 4 from 'void (__cdecl *)(napi_env,void *,void *) noexcept' to 'node_api_nogc_finalize' binary_encoder 2680 C:\git\cloud\node_modules\node-addon-api\napi-inl.h

@VoltrexKeyva VoltrexKeyva added the build Issues and PRs related to build files or the CI. label Apr 30, 2024
@richardlau
Copy link
Member

cc @nodejs/node-api

@KevinEady
Copy link
Contributor

Hi @mylowillem ,

Are you using NAPI_EXPERIMENTAL? If so, please check this comment on a similar issue: #52229 (comment) If not, please state the same here, and we'll look further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI.
Projects
None yet
Development

No branches or pull requests

4 participants