node icon indicating copy to clipboard operation
node copied to clipboard

deps: cherry-pick 88260bf from node-gyp upstream

Open StefanStojanovic opened this issue 1 year ago • 11 comments

This change cherry-picks a small change from node-gyp needed for running native tests on ClangCL compiled binaries. The change was already approved here, so this is just the official port after the changes landed in node-gyp. Next is the part of the description regarding this change from the original PR:

Enforce MSVC to be used for node-gyp. As far as I can tell, this is the intended way of using node-gyp on Windows. The issue with running the native suites is that now we use Clang to compile Node.js, so config.variables.clang is set to 1, which makes node-gyp generate project files for ClangCL. While we'd like to enable this, that is currently not the priority so for now enforcing MSVC would be the way to go the way I see it. The changes in create-config-gypi.js would be done as a PR in node-gyp and then floated in Node.js until the next node-gyp update.

Tagging relative teams: @nodejs/platform-windows @nodejs/node-gyp

P.S. Since it's already reviewed, I'll request fast-tracking and I'm planning to land it after the first approval.

Refs: https://github.com/nodejs/node-gyp/pull/3098 Refs: https://github.com/nodejs/node/pull/55784

StefanStojanovic avatar Nov 29 '24 13:11 StefanStojanovic

Review requested:

  • [ ] @nodejs/security-wg

nodejs-github-bot avatar Nov 29 '24 13:11 nodejs-github-bot

Fast-track has been requested by @StefanStojanovic. Please 👍 to approve.

github-actions[bot] avatar Nov 29 '24 13:11 github-actions[bot]

CI: https://ci.nodejs.org/job/node-test-pull-request/63776/

nodejs-github-bot avatar Nov 29 '24 14:11 nodejs-github-bot

Let's release https://github.com/nodejs/node-gyp/pull/3050 as well!

legendecas avatar Nov 29 '24 14:11 legendecas

Since this is located in the deps/npm, my second think is that this cherry pick would make the npm bundled with nodejs diverged from the one released on npm. I think this might not be a good idea and better to wait npm upgrades. /cc @nodejs/npm

legendecas avatar Dec 02 '24 15:12 legendecas

I think this might not be a good idea and better to wait npm upgrades.

Correct. It looks like 10.3.0 was not published yet. Once it is npm can update.

wraithgar avatar Dec 02 '24 16:12 wraithgar

Yes, just noticed that the publish workflow was not working. Fixing at https://github.com/nodejs/node-gyp/pull/3099

legendecas avatar Dec 02 '24 16:12 legendecas

Since this is located in the deps/npm, my second think is that this cherry pick would make the npm bundled with nodejs diverged from the one released on npm. I think this might not be a good idea and better to wait npm upgrades. /cc @nodejs/npm

I understand the concern and it is completely valid. Any idea on the ETA of node-gyp v10.3,0 making its way into the Node.js project (so full journey, node-gyp release, npm update, npm release, and node update)?

Regarding the change itself, although it is not a good practice to get it this way, it would not break anything, as using Clang is AFAIK not supported on Windows anyway, so IMHO this is not risky (although it is a dirty solution).

Knowing an ETA on this would be helpful.

StefanStojanovic avatar Dec 02 '24 19:12 StefanStojanovic

https://www.npmjs.com/package/node-gyp/v/10.3.1 is published

legendecas avatar Dec 02 '24 20:12 legendecas

Any idea on the ETA of node-gyp v10.3,0 making its way into the Node.js project (so full journey, node-gyp release, npm update, npm release, and node update)?

I can't speak to the full timeline but do want to point out that #56135 has landed which contains the change from this PR. So the only step remaining is the node update which I think means this PR can be closed now.

lukekarrys avatar Dec 05 '24 19:12 lukekarrys