nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.72k stars 29.66k forks source link

Build node with GN #21410

Closed nornagon closed 4 years ago

nornagon commented 6 years ago

Electron is starting to move its build system from GYP to GN to align with Chromium, which will make rolling Chromium substantially easier. However, we still have to shell out to GYP to build node.js, which is a lot of bridging code to maintain. I see there have been prior conversations about porting node's build system to GN from GYP, but they seem to have petered out without conclusion.

Would node.js be willing to accept patches to switch from GYP to GN?

NB, not suggesting that node does such a thing for 3rd-party native modules, just for node's own build.

joyeecheung commented 6 years ago

@sam-github Thanks for the correction. Were there minutes taken? (Didn't find anything in https://github.com/nodejs/Release/issues/358)

sam-github commented 6 years ago

I don't recall. @MylesBorins kicked the meeting off, he may remember.

hashseed commented 5 years ago

FWIW I hacked together a standalone Node build with GN and dependency management using gclient.

screenshot

hashseed commented 5 years ago

We are now running GN-built Node.js on V8' CI. That will soon replace the --build-v8-with-gn option.

refack commented 5 years ago

I have a slightly different approach in mind; teach GYP3 to parse GN syntax... AFAICT the delta in actual semantics is small.

This will not solve the V8 CI use case, but once we have GN parsing, nodejs/node-v8 & hashseed/gn-node should give us good coverage.

For the tooling integration use case, I'm planning on improving the "Compilation Database (a.k.a. compile_commands.json) generator, as that seems to converge into a standard consumed by XCode, CLion, MSVS, and VSCode (as well as CLI tools, like clang-tidy, and https://github.com/cquery-project/cquery).

zuohuadong commented 5 years ago

https://electronjs.org/blog/gn GN +1

Node.js needs great changes! Now, we are too slow.

vs Java / Dart / deno /Go This seems too backward.

jasnell commented 4 years ago

There's been no further activity here in nearly a year. Closing. Can reopen if absolutely necessary