nodejs / node-addon-api

Module for using Node-API from C++
MIT License
2.09k stars 456 forks source link

Failures with VS2022 #1491

Closed mhdawson closed 1 month ago

mhdawson commented 2 months ago

I was just adding 23 to the matrix and noticed we should have added testing with VS2022 a while ago.

Seems like there are some failures - https://ci.nodejs.org/job/node-test-node-addon-api-new/nodes=win-vs2022/8773/

mhdawson commented 2 months ago

@vmoroz will take a look.

vmoroz commented 2 months ago

@mhdawson , the code uses std::allocator methods construct and destroy. They were deprecated in in C++17 and removed in C++20. See https://en.cppreference.com/w/cpp/memory/allocator/construct, https://en.cppreference.com/w/cpp/memory/allocator/destroy. I will send a PR that fixes it.

KevinEady commented 1 month ago

Is this fixed by #1492?

mhdawson commented 1 month ago

We took a look at the CI runs in the meeting today and its fixed. Many thanks @vmoroz