New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 712323 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Use ninja deps to suggest suspects

Project Member Reported by st...@chromium.org, Apr 17 2017

Issue description

When a source file fails to be compiled to the targeted object file, the root cause could be:
* The source file itself or included header files lead to breakage.
* Compile flag changes in gn file.
* Bot temporary failure.

A possible heuristic is: given that obj/path/to/target.o failed, do the followings.
1. Get its deps by "ninja -t deps obj/path/to/target.o". This would include the source path/to/target.cc and all the header files it depends on directly or indirectly.
2. Get the whole build graph by "ninja -t graph".
3. Use the build graph to replace any generated header file with those original files in the git repo that it depends on.
4. With the adjusted deps, reduce the regression range to only one or just a couple of commits that touch any of the dep.
 

Comment 1 by st...@chromium.org, Apr 17 2017

Problems in this approach:
1. Change to gn files or recipes (like turning on a compile flag) might lead to a CXX/CC failure, but those files won't be in the deps.
2. The deps of the failed target could be out of day. Because if an edge fails, ninja won't update the deps for its output nodes.

Comment 2 by st...@chromium.org, Apr 17 2017

Blocking: 711831

Comment 3 by st...@chromium.org, Apr 25 2017

Blocking: -711831 714267

Comment 4 by st...@chromium.org, May 2 2017

Blocking: -714267
I decide to leave this out from the weekly tracking as security review is higher priority and this is not a blocker for auto-revert. I will work on it whenever I get some free cycles though.

Comment 5 by st...@chromium.org, Nov 9 2017

Status: Fixed (was: Assigned)
Done by the intern project.

Sign in to add a comment