|
|
Created:
9 years, 1 month ago by Nico Modified:
9 years, 1 month ago CC:
chromium-reviews, pam+watch_chromium.org, Dirk Pranke Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionAdd a small tool to answer questions like "Why does target A depend on target B".
BUG=none
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=111430
Patch Set 1 #Patch Set 2 : better #Patch Set 3 : docstrings etc #Patch Set 4 : ... #
Total comments: 8
Patch Set 5 : . #
Total comments: 11
Patch Set 6 : ... #
Total comments: 3
Patch Set 7 : ... #Patch Set 8 : s/google/chromium/. who knew. #Messages
Total messages: 16 (0 generated)
http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py#newcode2 tools/gyp-explain.py:2: Copyright http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py#newcode53 tools/gyp-explain.py:53: if __name__ == '__main__': Use a main()
http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py#newcode2 tools/gyp-explain.py:2: On 2011/11/23 20:06:30, Marc-Antoine Ruel wrote: > Copyright Done. http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py#newcode53 tools/gyp-explain.py:53: if __name__ == '__main__': On 2011/11/23 20:06:30, Marc-Antoine Ruel wrote: > Use a main() Done.
http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py#newcode16 tools/gyp-explain.py:16: tools/gyp-explain.sh chrome_dll gtest# Drive-by: ".sh"? It might be more helpful to put: Usage: ... <from_target> <to_target> Example: ... chrome_dll gtest http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py#newcode19 tools/gyp-explain.py:19: def GetPath(graph, fro, to, get_all=False): Is get_all even necessary, given that you're returning a generator?
http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py#newcode16 tools/gyp-explain.py:16: tools/gyp-explain.sh chrome_dll gtest# On 2011/11/23 20:19:51, viettrungluu wrote: > Drive-by: ".sh"? Done. > It might be more helpful to put: > > Usage: > ... <from_target> <to_target> > > Example: > ... chrome_dll gtest Not done. http://codereview.chromium.org/8672006/diff/5001/tools/gyp-explain.py#newcode19 tools/gyp-explain.py:19: def GetPath(graph, fro, to, get_all=False): On 2011/11/23 20:19:51, viettrungluu wrote: > Is get_all even necessary, given that you're returning a generator? Oh, good point. Removed.
http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py#newcode2 tools/gyp-explain.py:2: Most script don't put an empty line here, in fact I removed it everywhere since it was the minority. http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py#newcode72 tools/gyp-explain.py:72: print ' GYP_GENERATORS=dump_dependency_json build/gyp_chromium' Why not run it automatically? It'd be more user friendly. Note that when I run that, I get: KeyError: 'Undefined variable RULE_INPUT_DIRNAME in chrome/chrome.gyp while loading dependencies of chrome/browser/sync/tools/sync_tools.gyp while loading dependencies of build/all.gyp while trying to load build/all.gyp' http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py#newcode74 tools/gyp-explain.py:74: sys.exit(1) I highly prefer to return 1 and have sys.exit(Main(sys.argv)) as the last script line. http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py#newcode91 tools/gyp-explain.py:91: print 'No paths found from %s to %s.' % (fro, to) return 1 so this can be used as a test?
LGTM on my part, but maruel has more comments, apparently. http://codereview.chromium.org/8672006/diff/5003/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/5003/tools/gyp-explain.py#newcode29 tools/gyp-explain.py:29: while len(q) > 0: nit: |while q:|
Thanks, guys! http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py#newcode2 tools/gyp-explain.py:2: On 2011/11/23 20:28:05, Marc-Antoine Ruel wrote: > Most script don't put an empty line here, in fact I removed it everywhere since > it was the minority. Done. http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py#newcode72 tools/gyp-explain.py:72: print ' GYP_GENERATORS=dump_dependency_json build/gyp_chromium' On 2011/11/23 20:28:05, Marc-Antoine Ruel wrote: > Why not run it automatically? It'd be more user friendly. I disagree. > Note that when I run that, I get: > KeyError: 'Undefined variable RULE_INPUT_DIRNAME in chrome/chrome.gyp while > loading dependencies of chrome/browser/sync/tools/sync_tools.gyp while loading > dependencies of build/all.gyp while trying to load build/all.gyp' Yeah, dump_dependency_json used to be broken everywhere except linux. I fixed that yesterday, but I haven't rolled gyp to pick that up in chromium yet. http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py#newcode74 tools/gyp-explain.py:74: sys.exit(1) On 2011/11/23 20:28:05, Marc-Antoine Ruel wrote: > I highly prefer to return 1 and have > sys.exit(Main(sys.argv)) > as the last script line. Yeah, me too, but I already sys.exit from MatchNode(). Doing It Right increases the line count considerably, and all that check in clean up already almost doubled its line count. http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py#newcode91 tools/gyp-explain.py:91: print 'No paths found from %s to %s.' % (fro, to) On 2011/11/23 20:28:05, Marc-Antoine Ruel wrote: > return 1 so this can be used as a test? Can be added once something needs it :-) http://codereview.chromium.org/8672006/diff/5003/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/5003/tools/gyp-explain.py#newcode29 tools/gyp-explain.py:29: while len(q) > 0: On 2011/11/23 20:30:40, viettrungluu wrote: > nit: |while q:| Done.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/8672006/5003
Presubmit check for 8672006-5003 failed and returned exit status 1. Running presubmit commit checks ... ** Presubmit Warnings ** License must match: .*? Copyright \(c\) 2011 The Chromium Authors\. All rights reserved\.\n.*? Use of this source code is governed by a BSD-style license that can be\n.*? found in the LICENSE file\.\n Found a bad license header in these files: tools/gyp-explain.py
lgtm anyway http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py#newcode72 tools/gyp-explain.py:72: print ' GYP_GENERATORS=dump_dependency_json build/gyp_chromium' On 2011/11/23 20:33:01, Nico wrote: > Yeah, dump_dependency_json used to be broken everywhere except linux. I fixed > that yesterday, but I haven't rolled gyp to pick that up in chromium yet. Ah, why? http://codereview.chromium.org/8672006/diff/5003/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/5003/tools/gyp-explain.py#newcode51 tools/gyp-explain.py:51: sys.exit(1) I didn't mean to remove the calls in this functions, just in Main(). Anyway, no big deal.
http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py#newcode72 tools/gyp-explain.py:72: print ' GYP_GENERATORS=dump_dependency_json build/gyp_chromium' On 2011/11/23 20:35:57, Marc-Antoine Ruel wrote: > On 2011/11/23 20:33:01, Nico wrote: > > Yeah, dump_dependency_json used to be broken everywhere except linux. I fixed > > that yesterday, but I haven't rolled gyp to pick that up in chromium yet. > > Ah, why? No particular reason. I'll roll it now.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/8672006/7004
http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py File tools/gyp-explain.py (right): http://codereview.chromium.org/8672006/diff/7001/tools/gyp-explain.py#newcode2 tools/gyp-explain.py:2: I actually prefer the empty line because it lets the boilerplate lice stand off on its own. Let’s bikeshed.
Try job failure for 8672006-7004 (retry) on mac_rel for step "media_unittests". It's a second try, previously, step "media_unittests" failed. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&nu... |