DescriptionGN: (HeaderChecker) Allow any chain to forward direct dependent configs.
When finding a dependency chain, the header check will now prefer chains which
forward direct-dependent configs if the target which provides a header has
one. Previously an error would be produced because the chain which was found
did not forward configs, even though another chain did.
A breadth-first search is used instead of a depth-first search because short
chains are more likely to be intended by the author, and make for both less
work and clearer diagnostic messages.
This reduces the size of 'gn check' output on the chromium tree and the time
to execute. (Output directed to 'wc -l' and /dev/null, respectively.)
Before: 104685 lines, 542.36s user, 35.573s total
After: 36977 lines, 7.10s user, 1.526s total
Manual inspection reveals that the line reduction appears to be from the
removal of spurious errors when IsDependencyOf selected an indirect chain
which does not forward direct-dependent configs, even though a direct
dependency existed. (About 7 cases were examined manually; sheer volume makes
full manual verification infeasible.)
BUG=391505
TEST=HeaderCheckerTest, manual
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288110
Patch Set 1 #Patch Set 2 : update comments in header #
Total comments: 4
Patch Set 3 : expand comments #Patch Set 4 : clang-format #Patch Set 5 : undo spurious clang-format change of existing code #Patch Set 6 : remove redundant check #Patch Set 7 : merge with UniqueVector #
Messages
Total messages: 15 (0 generated)
|