-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
NAPI_VERSION redefined #48310
Comments
@legendecas this is likely a result of the recent addition of NAPI_VERSION 9, possibly we have something missing in our doc of the steps needed for a release. |
We may need an additional define MAX_NODE_API_VERSION which we use when reporting what node version is supported. |
@mhdawson AFAICT, this only happens when
Are you referring to something like |
correct but maybe you already handled that some other way? |
So if I understand correctly this is only an issue for our internal testing? |
It would be an issue for embedder's linked node-api addons if |
@legendecas still trying to understrand the scope of the concern. So maybe a stupid question but what if people simply include node.h before js_native_api.h. Is there no issue or the reverse issue. If it's the latter it seems like we may need to look at what NAPI_VERSION is being used in within core and possibly have a new define which is used in the cases that currently need the value to be set to NAPI_VERSION 9. That's why I mentioned possibly introducing a MAX_NODE_API_VERSION which as you say is likely what should be returned by napi_get_version() even if an addon author has defined NAPI_VERSION as something else. |
@mhdawson There would be no warnings if Indeed, the As |
to addons or something else? If it is |
|
I don't think non node-api C++ addons should be using NAPI_VERSION ? |
yeah, but it's there and can be used. Though I don't think it would be meaningful to be used. |
@legendecas thanks for confirming. I think give our discussion the risk of breakage to any addon is quite low, and should not affect Node-api addons where the ABI guarantee exists. Therefore, I think that the way to go is to rename and mark the PR as SemVer major. It should have no effect on node-api addons, very small chance of affecting any NaN/other addons and being SemVer major should cover any impact on embedders if any. |
Reopening to wait for #48501. |
Fixed in #48501. |
Version
main
Platform
all
Subsystem
node-api
What steps will reproduce the bug?
We need to figure out the sequence of include files. We want to avoid such warnings.
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
No such warnings.
What do you see instead?
This warning.
Additional information
No response
The text was updated successfully, but these errors were encountered: