diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2019-03-31 10:50:44 +0200 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-04-04 16:02:23 +0200 |
commit | 608878c95692e12a42d97f2b7cfd839453bc815d (patch) | |
tree | 196fa613b481fe5f4c81cf282bb05a8533d2ab02 /tools/inspector_protocol | |
parent | 04355eff5bc604cb639f91d159ce21971e2c3bb4 (diff) | |
download | android-node-v8-608878c95692e12a42d97f2b7cfd839453bc815d.tar.gz android-node-v8-608878c95692e12a42d97f2b7cfd839453bc815d.tar.bz2 android-node-v8-608878c95692e12a42d97f2b7cfd839453bc815d.zip |
build: fix inspector dependency resolution
It was reported that parallel builds on Windows sometimes error because
of missing intermediate files.
On closer inspection I noticed that some files are copied from src/ to
the intermediate build directory in a way where they don't participate
in dependency resolution. Put another way, the build system doesn't
know to wait for the copy to complete because we don't tell it to.
Fix that by not copying around files but instead making the script that
processes them a little smarter about where to find them and where to
store the results.
PR-URL: https://github.com/nodejs/node/pull/27026
Fixes: https://github.com/nodejs/node/issues/27025
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'tools/inspector_protocol')
-rwxr-xr-x | tools/inspector_protocol/code_generator.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/inspector_protocol/code_generator.py b/tools/inspector_protocol/code_generator.py index fb9959d608..9200022413 100755 --- a/tools/inspector_protocol/code_generator.py +++ b/tools/inspector_protocol/code_generator.py @@ -29,9 +29,9 @@ module_path, module_filename = os.path.split(os.path.realpath(__file__)) def read_config(): # pylint: disable=W0703 - def json_to_object(data, output_base, config_base): + def json_to_object(data, output_base): def json_object_hook(object_dict): - items = [(k, os.path.join(config_base, v) if k == "path" else v) for (k, v) in object_dict.items()] + items = [(k, os.path.join(output_base, v) if k == "path" else v) for (k, v) in object_dict.items()] items = [(k, os.path.join(output_base, v) if k == "output" else v) for (k, v) in items] keys, values = list(zip(*items)) return collections.namedtuple('X', keys)(*values) @@ -71,7 +71,6 @@ def read_config(): if not config_file: raise Exception("Config file name must be specified") config_file = config_file.decode('utf8') - config_base = os.path.dirname(config_file) config_values = arg_options.config_value if not config_values: config_values = [] @@ -84,7 +83,7 @@ def read_config(): try: config_json_file = open(config_file, "r") config_json_string = config_json_file.read() - config_partial = json_to_object(config_json_string, output_base, config_base) + config_partial = json_to_object(config_json_string, output_base) config_json_file.close() defaults = { ".use_snake_file_names": False, |