New issue
Advanced search Search tips

Issue 675022 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Have run_tool.py filter based on GN/ninja targets rather than raw file paths

Project Member Reported by dcheng@chromium.org, Dec 16 2016

Issue description

The current scheme runs the tool based on paths filtered out of git ls-files. However, this doesn't work well (it won't cover headers that are only included by generated code unless you use --all), and also imposes a burden on developers: developers need to be careful to rebuild dependencies before running a clang tool.

If run_tool.py understood the targets involved, then it could automatically rebuild the targets in question, and run the tool afterwards.

Two problems:
- There's a magical step involved here in having run_tool.py figure out all the rules in a compile DB that belong to the specified targets.
- We want to be able to specify individual files (Ninja syntax looks like ninja -C out/Release ../../base/bind_unittest.cc^) and targets (GN style would be like //third_party/WebKit). I'm not sure how we'd mesh the two.
 
I am probably being nitpicky, but I wanted to point out that "all the rules in a compile DB that belong to the specified targets" really means: "all the compile rules that *depend* on sources built/used/depended on by a given target".  For example - when renaming everything under "blink_tests" target, we should also run the renaming tool on things that wouldn't be built as part of blink_tests, but that include/depend on headers from blink_tests.

This is also tricky to get right, because some headers (i.e. see ) might not be listed in BUILD.gn at all.  I am not sure 1) how to identify such headers for renaming (cannot do it by naming a GN target, because they are missing from BUILD.gn, right?).  I am also not sure 2) how in such case the tool could figure out which compile targets to process to make sure that such headers are renamed;  hopefully there is some sort of GN dependency to cover this.
Project Member

Comment 2 by sheriffbot@chromium.org, Feb 16 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment