summaryrefslogtreecommitdiffstats
path: root/src/missing_deps.cc
Commit message (Collapse)AuthorAgeFilesLines
* missingdeps: use nested maps for edge adjacency cacheTomasz Śniatowski2021-02-221-5/+10
| | | | | | In my tests, nested maps outperform a large map of pairs by 10-20% on a sample Chromium missingdeps run, and are arguably simpler due to fewer ifdefs needed.
* missingdeps: add exception for targets that dep on build.ninjaTomasz Śniatowski2021-02-221-0/+8
| | | | A "missing dep path" to build.ninja is a false positive, skip reporting it.
* Add a -t missingdeps tool to detect some classes of build flakesTomasz Śniatowski2021-02-221-0/+181
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.