Skip to content

Node gyp 11.2.0#166

Closed
ecartz wants to merge 738 commits intonwjs:masterfrom
ecartz:node-gyp-11.2.0
Closed

Node gyp 11.2.0#166
ecartz wants to merge 738 commits intonwjs:masterfrom
ecartz:node-gyp-11.2.0

Conversation

@ecartz
Copy link
Copy Markdown

@ecartz ecartz commented May 12, 2025

This is an update to the current version of node-gyp: 11.2.0.

I used rebase rather than merge, as per the previous request: #136 (comment)

Tagging those who might be interested based on previous activity @surunzi @KittenHero @gpetrov @panther7 @WJsjtu @TheJaredWilcurt

TooTallNate and others added 30 commits June 23, 2021 13:01
benmccann and others added 21 commits February 19, 2025 10:33
* fix wasm test on windows

* test not rely lint python
On windows, one may experience errors due to concurrent node-gyp calls (see nodejs#3095)

When retrying after such a failure, retries are observed to fail repeatedly with strange
EBUSY and EPERM errors. This turns out to be due to a caching feature where msbuild.exe
will continue to run in the background (for either 15s or 15m depending on VS version),
and keep open file handles to files and directories that the user may be trying to delete
(for example with a new call to `npm ci`).

This behavior is well documented, as is the recommended workaround implemented here.
* fix: remove more forcefully

* add max retries to all fs.rm calls

---------

Co-authored-by: Luke Karrys <luke@lukekarrys.com>
Remove duplicate keywords entry, possibly a merge artifact.
@ecartz
Copy link
Copy Markdown
Author

ecartz commented May 12, 2025

This would resolve #133 as well.

ecartz added 6 commits May 11, 2025 23:26
Previously a change enabled 64-bit builds for nw-gyp; however, this
bit of code was not included in that change.  Removed here.

The nw-gyp application supports building against both nw.lib and
node.lib (what node-gyp builds against).  There's some configuration
for that in this file.  This updates to properly check whether that
case holds.
Uses the NW URL for nw.lib downloads and the Node URL for node.lib
downloads.  Handles architecture correctly.

This sets a shasum URL but doesn't use it.  It disables the shasum
checking, as it doesn't work for most NW versions.
This script finds Python 2 for compatibility with NW.js.

Unfortunately, node-gyp requires Python 3.  This means that NW and
node-gyp are fundamentally incompatible.  It's not as simple as a
few minor tweaks to convert node-gyp into nw-gyp.  Either node-gyp
needs rewritten to work with Python 2, or NW needs changed to work
with Python 3.  Either approach is a larger project than I can
undertake currently.

This script works.  Perhaps someone else might find it useful.  It
doesn't help with the current project.
@ecartz
Copy link
Copy Markdown
Author

ecartz commented May 14, 2025

I'm closing this pull request.

The current state of the world is that NW is only compatible with Python 2, while node-gyp is only compatible with Python 3. I can't edit the NW cache files directly, so I'm putting that out of scope. I could propose reversions for the Python 3 specific code in the nw-gyp version of node-gyp, but that's just silly. That's removing functionality. I suppose it would be possible to use an older version of node-gyp, but I'm not going to take the time to figure out which version and try to get it to work with both NW and some version of node.

I'll look for a better supported solution, probably Electron.

@ecartz ecartz closed this May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.