-
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
node-addon-api addons broken by default on Node.js 20.12+ #52229
Comments
@addaleax do you have Experiemental enabled? If I remember correctly any such change should only have affected people using the Experiemental option? |
From the PR
so I think that my assumption that it should only affect addons using NAPI_EXPERIMENTAL is correct. @gabrielschulhof can you clarify as well. I think you were waiting on some PRs to make it into Node.js to address issues on the node-addon-api side of things. |
If the issue is that #50060 wasn't highlighted in the release notes for 20.12.0, well that had over 400 commits and #50060 wasn't labelled as a |
@mhdawson Yeah no, the opt-out of this behavior is experimental (behind
There’s a self-contained one-liner reproduction in the issue description. (Also ran this in a Docker image to make sure my personal environment is not having any effect.) @richardlau Yeah, I was more thinking about the fact that #50060 should have been labeled as a breaking change, not that this should have been caught during the release 🙂 |
Reached out to Gabriel through twitter message as well. I think there was likely a mix-up in the guards versus it being planned to affect existing addons not using NAPI_EXPERIMENTAL but would like to confirm with him. |
@richardlau I've not managed to get in touch with @gabrielschulhof yet, but I'm wondering if we should revert the change on 20.x and 18.x. Having done the releases to do forsee any complications with that? |
@mhdawson Would it be possible for the node-api team to discuss on Friday's meeting if reverting is something that should be done and open revert PRs against 20.x and 18.x if so? FWIW for Node.js 18.x we have already have other fixes for regressions that warrant a release: |
@richardlau thanks for confirming that. I'll make sure that we discuss Friday in the team meeintg and if we agree we should revert I'm happy to volunteer to create the revert PRs unless that is something the releaser can easily do as part of the release process. |
@addaleax It was not our intention to break add-ons built without NAPI_EXPERIMENTAL. At https://github.com/mongodb-js/kerberos/blob/main/src/kerberos.h#L7-L9
This should allow you to move past building the add-on. Thank you for being vigilant, and please keep an eye out for add-ons that break as a result of this change, because it is the first time that we're changing the API signature of otherwise stable APIs, even if we're keeping the ABI the same. |
See: nodejs/node#52229 (comment) Change-type: patch
See nodejs/node#52229 – addons using certain features of the node-addon-api package have been broken by an upstream Node.js change if they were setting `NAPI_EXPERIMENTAL`, which `kerberos` is doing.
This fixes build with Node v20.12.2. Related upstream issue: <nodejs/node#52229>
This fixes build with Node v20.12.2. Related upstream issue: <nodejs/node#52229>
This fixes build with new clang which treats -Wincompatible-function-pointer-types as an error. Related upstream issue: <nodejs/node#52229>
This fixes build with new clang which treats -Wincompatible-function-pointer-types as an error. Related upstream issue: <nodejs/node#52229>
Version
v20.12.0
Platform
Linux 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 10:22:43 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
node-api
What steps will reproduce the bug?
cd /tmp && nvm install 20.12.0 && npm i --build-from-source kerberos
(or any other node-addon-api addon that usesObjectWrap
or similar APIs)How often does it reproduce? Is there a required condition?
Consistently.
What is the expected behavior? Why is that the expected behavior?
Addon builds like it did prior to 0ac070c.
What do you see instead?
Additional information
This was introduced in 0ac070c / #50060. From the PR description, this seems like intentional breakage, so it may need a solution in node-addon-api, not here. If it was intentional breakage, calling this out more explicitly somewhere in the release notes would have been helpful imo. @gabrielschulhof
The text was updated successfully, but these errors were encountered: