feat: add support for node-gyp --jobs option to parallelize an indivi…#1106
feat: add support for node-gyp --jobs option to parallelize an indivi…#1106nkallen wants to merge 3 commits intoelectron:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1106 +/- ##
==========================================
+ Coverage 76.30% 76.34% +0.03%
==========================================
Files 21 21
Lines 726 727 +1
Branches 136 137 +1
==========================================
+ Hits 554 555 +1
Misses 121 121
Partials 51 51
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
|
Hi, Are you guys not accepting submissions? I'm pretty |
BlackHole1
left a comment
There was a problem hiding this comment.
LGTM. Although it can be achieved through the JOBS environment variable in node-gyp, I personally feel that supporting the --jobs parameter would be better. Thank you for your contribution!
PTAL @dsanders11
|
ref #303 |
|
References #303. |
erickzhao
left a comment
There was a problem hiding this comment.
Small docs change, but LGTM
dsanders11
left a comment
There was a problem hiding this comment.
I think this may be currently possible by setting the npm_config_jobs environment variable, see the node-gyp documentation.
@nkallen, could you test using the environment variable to change the number of jobs and see if that works for your use case? If it does, I'd rather document in this repo that you can pass additional options to node-gyp in this manner, rather than plumbing in through. Someone may come along with the need for another node-gyp option, like --python, and plumbing them through on a case-by-case basis doesn't seem ideal if they're easy to set via environment variables.
Hi,
I have a native module with a couple hundred c++ files. Electron-rebuild does have a "parallel" option but this doesn't actually run make in parallel WITHIN one module. This adds support for node-gyp's --jobs option, so that users like me can run electron-rebuild --jobs=max from the command line
Thanks