Skip to content

fix: fix vs2026 ICE compatibility#1739

Open
legendecas wants to merge 3 commits into
nodejs:mainfrom
legendecas:fix-ci
Open

fix: fix vs2026 ICE compatibility#1739
legendecas wants to merge 3 commits into
nodejs:mainfrom
legendecas:fix-ci

Conversation

@legendecas

@legendecas legendecas commented Jul 13, 2026

Copy link
Copy Markdown
Member

Fix GitHub action failures on windows.

@codecov-commenter

codecov-commenter commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.69%. Comparing base (13c28f6) to head (a438147).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1739   +/-   ##
=======================================
  Coverage   63.69%   63.69%           
=======================================
  Files           3        3           
  Lines        2063     2063           
  Branches      730      730           
=======================================
  Hits         1314     1314           
  Misses        162      162           
  Partials      587      587           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@StefanStojanovic

Copy link
Copy Markdown

I see that actions with Node.js v26 are failing because of LINK : fatal error LNK1117: syntax error in option 'opt:lldltojobs=2' [D:\a\node-addon-api\node-addon-api\test\build\binding_type_check.vcxproj]. That was fixed in nodejs/node-gyp#3331 and released in node-gyp v13.

Now about the other failures. They seem to happen on Windows Server 2025, and this is why D:\a\node-addon-api\node-addon-api\napi-inl.h(4770,76): error C1001: Internal compiler error. [D:\a\node-addon-api\node-addon-api\test\build\binding_custom_namespace.vcxproj]. GitHub Copilot suggested this change to fix it

@@
 template <typename T>
 template <typename InstanceWrap<T>::InstanceGetterCallback getter,
           typename InstanceWrap<T>::InstanceSetterCallback setter>
 inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceAccessor(
     const char* utf8name, napi_property_attributes attributes, void* data) {
   napi_property_descriptor desc = napi_property_descriptor();
   desc.utf8name = utf8name;
   desc.getter = details::TemplatedInstanceCallback<T, getter>;
-  desc.setter = This::WrapSetter(This::SetterTag<setter>());
+  desc.setter =
+      setter == nullptr ? nullptr : details::TemplatedInstanceVoidCallback<T, setter>;
   desc.data = data;
   desc.attributes = attributes;
   return desc;
 }
@@
 template <typename T>
 template <typename InstanceWrap<T>::InstanceGetterCallback getter,
           typename InstanceWrap<T>::InstanceSetterCallback setter>
 inline ClassPropertyDescriptor<T> InstanceWrap<T>::InstanceAccessor(
     Symbol name, napi_property_attributes attributes, void* data) {
   napi_property_descriptor desc = napi_property_descriptor();
   desc.name = name;
   desc.getter = details::TemplatedInstanceCallback<T, getter>;
-  desc.setter = This::WrapSetter(This::SetterTag<setter>());
+  desc.setter =
+      setter == nullptr ? nullptr : details::TemplatedInstanceVoidCallback<T, setter>;
   desc.data = data;
   desc.attributes = attributes;
   return desc;
 }

I do not have access to a Windows Server 2025 machine, but you can try pushing these changes (node-gyp version and the diff) and rerun the actions to see if it will be fixed.

@legendecas legendecas changed the title deps: install node-gyp supporting vs2026 deps!: install node-gyp supporting vs2026 Jul 14, 2026
@legendecas

Copy link
Copy Markdown
Member Author

Unfortunately the patch did not fix the Internal Compiler Error. I'm going to try with pinning the MSVS version.

@legendecas legendecas changed the title deps!: install node-gyp supporting vs2026 fix: fix vs2026 ICE compatibility Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Need Triage

Development

Successfully merging this pull request may close these issues.

3 participants