nan icon indicating copy to clipboard operation
nan copied to clipboard

Support Node 23

Open kkoopa opened this issue 1 year ago • 6 comments

V8 Was bumped, this would be a patch release, since I already claimed support for Node 23 in 2.22.0. Also fixes #978.

kkoopa avatar Oct 18 '24 12:10 kkoopa

Turns out it is not that easy. First, a couple tests need updating. Second, the interceptors are not correctly handled in that they do require return values or will require them soon. I have some workarounds in mind, but implementing them will take a bit of effort. Addons will require a tiny bit of rewriting if using interceptors, but that is par for the course.

kkoopa avatar Oct 19 '24 00:10 kkoopa

Some tests are still failing related to the Holder change and interceptors. It might be that the tests simply need updating due to the functionality used not being allowed anymore. I do not have time to figure out what the deal is, so this will be stuck until someone clears it up.

kkoopa avatar Oct 19 '24 04:10 kkoopa

I believe I fixed the tests. Let us wait and see.

kkoopa avatar Oct 19 '24 13:10 kkoopa

@bnoordhuis Any chance you remember what the deal with Holder versus This in node::ObjectWrap was ten years ago and what it currently is wrt. to, say, the accessors tests here https://github.com/nodejs/nan/blob/main/test/cpp/accessors.cpp? I found this old PR https://github.com/nodejs/nan/pull/524, but do not know what applies to which version of what any more.

kkoopa avatar Oct 21 '24 05:10 kkoopa

+1 this. Ended up needing to manually patch to use Electron v33.

devinbinnie avatar Oct 24 '24 20:10 devinbinnie

It looks like this PR is stalled, I am using this workaround for my Electron 33 builds: https://github.com/nodejs/nan/issues/978#issuecomment-2417592484. Works with any version of Electron supported by nan v2.22.0. Also have an additional workaround for GitHub Action and local scripts for C++ compiler version 20 for both Electron 32 and 33. Although I only have a C++ v20 compiler failure on Windows but not macOS or Linux runners.

agracio avatar Oct 25 '24 15:10 agracio

Any updates on this PR's status?

richardMSFT avatar Nov 13 '24 18:11 richardMSFT

Can the commitment Node.js v23 compatibility be removed from https://www.npmjs.com/package/nan ?

  • #953

cclauss avatar Jan 20 '25 09:01 cclauss

Please rebase this pull request and edit the following lines to add Node.js v23 to the testing. https://github.com/nodejs/nan/blob/b5d90f15730b620fb6cc4fed079674740424539a/.github/workflows/ci.yml#L18-L19

cclauss avatar Feb 13 '25 12:02 cclauss

https://github.com/nodejs/nan/issues/978 appears to be fixed in 2.22.2 presumably in a different PR.
Looking at merged PRs this one stands out as a potential fix: https://github.com/nodejs/nan/pull/989 since it is specifically updated v8::ScriptOrigin resolution.

Tested using electron 29-34 as well as 35 beta and latest 36 nightly.

agracio avatar Feb 28 '25 23:02 agracio

@kkoopa you might want to close this PR since it is no longer relevant and is fixed by nan v2.22.2 see my previous comment https://github.com/nodejs/nan/pull/979#issuecomment-2691701807

agracio avatar Mar 13 '25 17:03 agracio

Node.js v23 is not being tested in v2.22.2 https://github.com/nodejs/nan/actions/runs/13548804273 which is worrisome if we claim v23 compatibility. https://github.com/nodejs/nan/blob/9585023a32bf0e945c932200fc7f1ddbcf1fadad/.github/workflows/ci.yml#L24

cclauss avatar Mar 13 '25 17:03 cclauss

True but I believe this PR was created to address https://github.com/nodejs/nan/issues/978 rather than add Node.js test. But I might be completely wrong as a complete outsider to nan. Since this PR is no longer needed to address https://github.com/nodejs/nan/issues/978 there should be another issue+PR opened to focus on adding Node.js 23 to build matrix. The code changes that were added to address https://github.com/nodejs/nan/issues/978 might be a distraction to adding tests for Node.js 23

agracio avatar Mar 13 '25 17:03 agracio

  • #993 fails. https://github.com/nodejs/nan/pull/993/checks

README.md says that Node.js v22 is supported but v23 is not yet listed.

cclauss avatar Mar 13 '25 18:03 cclauss

Node.js 24 is out and there is an issue with NAN:

npm error ../../../nan/nan_callbacks_12_inl.h:112:62: error: ‘const class v8::FunctionCallbackInfo<v8::Value>’ has no member named ‘Holder’
npm error   112 |   inline v8::Local<v8::Object> Holder() const { return info_.Holder(); }

Is this issue related to that or is it a separate one?

nikeee avatar Jun 17 '25 12:06 nikeee

PR https://github.com/nodejs/nan/pull/1000 merges these changes and addresses issues with Node.js 23 and 24 tests.

agracio avatar Jun 17 '25 17:06 agracio

Why are the appveyor tests not running now?

kkoopa avatar Jul 10 '25 15:07 kkoopa

I can only guess that you have disabled them, they are running on my branch. Edit: not sure who you asking tbh.

https://ci.appveyor.com/project/agracio/nan/history

The last build you have is for 2.22.1 so it did not run for 2.22.2 release. If I have to guess it was disabled after all tests were moved to Github Actions.

agracio avatar Jul 10 '25 16:07 agracio

Webhook log says 403 Unauthorized, somehow something is not getting through there. Last Appveyor build is 5 months old.

kkoopa avatar Jul 10 '25 16:07 kkoopa

I'm afraid that is not something I can help with.

agracio avatar Jul 10 '25 16:07 agracio

GitHub Actions are the de facto standard CI solution these daze.

cclauss avatar Jul 10 '25 16:07 cclauss

Correct but since I removed tests for node.js 8, 10, 12 and 14 from GitHub Actions the idea was that they will run on AppVeyor.

agracio avatar Jul 10 '25 16:07 agracio

Yes, those ancient versions need a lot of fiddling to even get running, and the appveyor images are tailor made for that.

On July 10, 2025 7:49:28 PM GMT+03:00, agracio @.***> wrote:

agracio left a comment (nodejs/nan#979)

Correct but since I removed tests for node.js 8, 10, 12 and 14 from GitHub Actions the idea was that they will run on AppVeyor.

-- Reply to this email directly or view it on GitHub: https://github.com/nodejs/nan/pull/979#issuecomment-3058220428 You are receiving this because you modified the open/close state.

Message ID: @.***>

kkoopa avatar Jul 10 '25 16:07 kkoopa

All versions less than v22 are no longer supported.

  • https://nodejs.org/en/about/previous-releases#release-schedule

cclauss avatar Jul 10 '25 16:07 cclauss

v20 is Maintenance LTS and is supported but I think we already had this discussion.

It is up to nan maintainers to agree to a support plan.

agracio avatar Jul 10 '25 16:07 agracio

The GitHub organization of this repository is nodejs not nan-maintainers. The url that I provided shows that the v20 EoL date is two weeks ago. If people want to pay for support for EoL versions then work might be done. If not then they will need to replicate bugs in a supported version of Node.js.

cclauss avatar Jul 10 '25 17:07 cclauss

From URL that you provided the graph shows approximately April 2026 and then going to https://github.com/nodejs/release#release-schedule v20 EOL is 2026-04-30. But again I do not think that you are presenting your argument to the right person.

I think you were looking at 'Last Updated' column which shows the date of the last release for that version.

agracio avatar Jul 10 '25 17:07 agracio