[autoninja] Update Siso .ninja_log comments

Siso is going to generate non-empty .ninja_log for the analysis tools.
https://crrev.com/c/4907677

This CL fixes the comment about empty ninja_log.

It's not compatible with Ninja's .ninja_log. So `gn clean` will still
be required.

Bug: b/298594790
Change-Id: Ib4c60f3ed22f516d6f7e2847aaf57e228121eccf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4937692
Auto-Submit: Junji Watanabe <jwata@google.com>
Commit-Queue: Junji Watanabe <jwata@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
changes/92/4937692/7
Junji Watanabe 2 years ago committed by LUCI CQ
parent a51863b2f8
commit c51829968b

@ -166,11 +166,11 @@ def main(args):
siso_marker = os.path.join(output_dir, '.siso_deps')
if use_siso:
ninja_marker = os.path.join(output_dir, '.ninja_log')
# autosiso generates a .ninja_log file so the mere existence of a
# .ninja_log file doesn't imply that a ninja build was done. However
# if there is a .ninja_log but no .siso_deps then that implies a
# ninja build.
ninja_marker = os.path.join(output_dir, '.ninja_log')
if os.path.exists(ninja_marker) and not os.path.exists(siso_marker):
print('Run gn clean before switching from ninja to siso in %s' %
output_dir,

@ -117,8 +117,8 @@ def ReadTargets(log, show_all):
The result is a list of Target objects."""
header = log.readline()
# TODO: b/298594790 - Siso currently generates empty .ninja_log files.
# Handle them gracefully by silently returning an empty list of targets.
# Handle empty ninja_log gracefully by silently returning an empty list of
# targets.
if not header:
return []
assert header == '# ninja log v5\n', \

Loading…
Cancel
Save