-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for node-gyp --jobs option to parallelize an indivi… #1106
base: main
Are you sure you want to change the base?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small docs change, but LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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