summaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorTomasz Śniatowski <tsniatowski@vewd.com>2021-02-15 12:06:30 (GMT)
committerTomasz Śniatowski <tsniatowski@vewd.com>2021-02-22 22:48:58 (GMT)
commit3030254733f0baae1353b99e72e85babfbf5fbce (patch)
tree96c06dc3f48c930eb1caa3b468eb00bdbdb308c0 /configure.py
parentd0489c3863f6b2a0d0b0e15880217da3fd4e6d8f (diff)
downloadNinja-3030254733f0baae1353b99e72e85babfbf5fbce.zip
Ninja-3030254733f0baae1353b99e72e85babfbf5fbce.tar.gz
Ninja-3030254733f0baae1353b99e72e85babfbf5fbce.tar.bz2
Add a -t missingdeps tool to detect some classes of build flakes
The tool looks for targets that depend on a generated file, but do not properly specify a dependency on the generator. It needs to be run after a successful build, and will list all potential flakes that may have broken the build, but didn't due to accidental build step ordering. The search relies on the correctness of depfile and generator output information, but these are usually easier to get right than dependencies. The errors found can usually be verified as actual build flakes by trying to build the listed problematic files alone in a clean build directory. Such builds usually fail with a compile job lacking a generated file. There is some overlap between this tool and 'gn check', but not everyone uses gn, not everyone using gn uses gn check, and most importantly, gn check is more about modularity, and less about actual build-time deps without flakes. The tool needs to be run after a build completes and depfile data is collected. It may take several seconds to process, up to a dozen or two on a large, chromium-sized build.
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.py b/configure.py
index cded265..647b5b0 100755
--- a/configure.py
+++ b/configure.py
@@ -511,6 +511,7 @@ for name in ['build',
'line_printer',
'manifest_parser',
'metrics',
+ 'missing_deps',
'parser',
'state',
'string_piece_util',
@@ -577,6 +578,7 @@ for name in ['build_log_test',
'graph_test',
'lexer_test',
'manifest_parser_test',
+ 'missing_deps_test',
'ninja_test',
'state_test',
'string_piece_util_test',