-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
build: reduce one level of spawning in node_gyp #12653
Conversation
tools/gyp_node.py
Outdated
args.append(os.path.join(arg_path, 'node.gyp')) | ||
common_fn = os.path.join(arg_path, 'common.gypi') | ||
options_fn = os.path.join(arg_path, 'config.gypi') | ||
options_fips_fn = os.path.join(arg_path, 'config_fips.gypi') |
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.
Don't make unrelated changes in a single commit, split it out into two commits.
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.
Split. or should it be Splat Done.
configure
Outdated
@@ -1400,4 +1401,5 @@ gyp_args += args | |||
if warn.warned: | |||
warn('warnings were emitted in the configure phase') | |||
|
|||
sys.exit(subprocess.call(gyp_args)) | |||
errorlevel = run_gyp(gyp_args) | |||
sys.exit(errorlevel) |
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.
Superfluous. errorlevel is always zero because run_gyp() exits on error.
@bnoordhuis fixed PTAL |
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 modulo comments.
tools/gyp_node.py
Outdated
options_fips_fn = os.path.join(os.path.abspath(node_root), 'config_fips.gypi') | ||
arg_path = node_root if sys.platform == 'win32' else os.path.abspath(node_root) | ||
args.append(os.path.join(arg_path, 'node.gyp')) | ||
common_fn = os.path.join(arg_path, 'common.gypi') |
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.
While you're here, can you drop the extraneous space before the =
?
tools/gyp_node.py
Outdated
common_fn = os.path.join(os.path.abspath(node_root), 'common.gypi') | ||
options_fn = os.path.join(os.path.abspath(node_root), 'config.gypi') | ||
options_fips_fn = os.path.join(os.path.abspath(node_root), 'config_fips.gypi') | ||
arg_path = node_root if sys.platform == 'win32' else os.path.abspath(node_root) |
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.
Long line?
tools/gyp_node.py
Outdated
|
||
|
||
if __name__ == '__main__': | ||
args = sys.argv[1:] | ||
gyp_args = list(args) | ||
run_gyp(gyp_args) |
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.
You can just run_gyp(sys.argv[1:])
here, it's already a list.
By the way, the second commit log should be brought up to par with the style guide. |
Ack |
Addressed all comments and rebased. |
`configure` will now call `node_gyp` as a module instead of forking makes it easier to debug PR-URL: nodejs#12653 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
PR-URL: nodejs#12653 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
landed in 8035527 |
Post land double check |
`configure` will now call `node_gyp` as a module instead of forking makes it easier to debug PR-URL: nodejs#12653 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
PR-URL: nodejs#12653 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
should this be backported to v6.x? |
I think so. |
PR-URL: #12653 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
PR-URL: #12653 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
`configure` will now call `node_gyp` as a module instead of forking makes it easier to debug PR-URL: #12653 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
`configure` will now call `node_gyp` as a module instead of forking makes it easier to debug PR-URL: #12653 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
configure
will now callnode_gyp
as a module instead of forkingmakes it easier to debug
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
build