Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Issue 2770693003: Add missing .h files to .gn files that have a .cc file next to it in the gn file already. (Closed)

Created:
3 years, 9 months ago by Nico
Modified:
3 years, 9 months ago
Reviewers:
brettw, tzik
CC:
chromium-reviews, ios-reviews+chrome_chromium.org, kouhei+svg_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, horo+watch_chromium.org, darktears, eae+blinkwatch, fs, yzshen+watch_chromium.org, jsbell+serviceworker_chromium.org, tracing+reviews_chromium.org, pennymac+watch_chromium.org, noyau+watch_chromium.org, marq+watch_chromium.org, gyuyoung2, net-reviews_chromium.org, Stephen Chennney, miu+watch_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, pdr+renderingwatchlist_chromium.org, ios-reviews_chromium.org, kinuko+watch, pfeldman+blink_chromium.org, blink-reviews-css, blink-reviews-html_chromium.org, jam, falken+watch_chromium.org, abarth-chromium, blink-reviews-dom_chromium.org, dglazkov+blink, darin-cc_chromium.org, jchaffraix+rendering, devtools-reviews_chromium.org, blink-reviews, chromium-apps-reviews_chromium.org, xjz+watch_chromium.org, rwlbuis, pdr+svgwatchlist_chromium.org, blink-reviews-frames_chromium.org, mlamouri+watch-content_chromium.org, dshwang, imcheng+watch_chromium.org, blink-reviews-style_chromium.org, zoltan1, Peter Beverloo, jasonroberts+watch_google.com, blink-reviews-layout_chromium.org, sof, caseq+blink_chromium.org, lushnikov+blink_chromium.org, blink-reviews-bindings_chromium.org, feature-media-reviews_chromium.org, krit, nhiroki, caitkp+watch_chromium.org, haraken, piman+watch_chromium.org, szager+layoutwatch_chromium.org, tzik, darin (slow to review), jochen+watch_chromium.org, sdefresne+watch_chromium.org, michaeln, shimazu+serviceworker_chromium.org, kalyank, blink-reviews-api_chromium.org, wfh+watch_chromium.org, pkl (ping after 24h if needed), avayvod+watch_chromium.org, leviw+renderwatch, fmalita+watch_chromium.org, serviceworker-reviews, ozone-reviews_chromium.org, Aaron Boodman, blink-reviews-paint_chromium.org, kinuko+serviceworker, tfarina, apavlov+blink_chromium.org, cc-bugs_chromium.org, isheriff+watch_chromium.org, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add missing .h files to .gn files that have a .cc file next to it in the gn file already. I downloaded https://docs.google.com/spreadsheets/d/15az3FMl-jAS0mx4E9XVSBVHVpmEzo-9EAGY0ywe7bZs/edit#gid=0 as a csv file, and removed the header line and all columns except the filename. Then i ran this script to create this CL: import os, re, subprocess edits = {} for filename in open('/Users/thakis/Downloads/files.txt'): filename = filename.strip() if not filename.endswith('.h'): continue basename = os.path.basename(filename) cc = r'\b' + os.path.splitext(basename)[0] + r'\.(cc|cpp|mm)\b' p = subprocess.Popen(['git', 'grep', '-En', cc, '--', '*.gn', '*.gni'], stdout = subprocess.PIPE) out, _ = p.communicate() if p.returncode != 0 or not out: continue for gnline in out.splitlines(): gnfile, linenr, contents = gnline.split(':') linenr = int(linenr) new = re.sub(cc, basename, contents) print gnfile, linenr, new edits.setdefault(gnfile, {})[linenr] = new for gnfile in edits: lines = open(gnfile).read().splitlines() for l in reversed(edits[gnfile].keys()): lines.insert(l, edits[gnfile][l]) open(gnfile, 'w').write('\n'.join(lines)) (It has off-by-a-few errors in the insertion code, so I manually cleaned up the output a little bit. Since it was only needed in two files, I didn't debug the script.) I then removed the editing part of the script and made it just do `if out: print filename` at the end of the first loop, and used this Apps Script to updated the spreadsheet: var covered = [ /* filenames printed by script */ ]; function thakisAutoScript() { var spreadsheet = SpreadsheetApp.getActive(); var sheet = spreadsheet.getActiveSheet(); var dataRange = sheet.getRange("A2:E898"); var data = dataRange.getValues(); for (var i = 0; i < data.length; ++i) { var row = data[i]; var file = row[0]; if (covered.indexOf(file) == -1) continue; row[1] = '.h'; row[2] = 'FALSE'; row[3] = 'thakis'; row[4] = 'https://codereview.chromium.org/2770693003/'; sheet.getRange(2 + i, 1, 1, 5).setValues([row]); } } No intended behavior change, see "[chromium-dev] Unlisted source files in BUILD.gn" BUG=none CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win10_chromium_x64_rel_ng;master.tryserver.chromium.win:win_optional_gpu_tests_rel NOTRY=true Review-Url: https://codereview.chromium.org/2770693003 Cr-Commit-Position: refs/heads/master@{#459147} Committed: https://chromium.googlesource.com/chromium/src/+/b8590c94fe271ff8b6825fd703c6c9ff6e2429ab

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : WebKit/public is weird #

Patch Set 4 : manual ios #

Patch Set 5 : manual fixes: ios, eventmodules #

Patch Set 6 : self review #

Patch Set 7 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -8 lines) Patch
M cc/BUILD.gn View 2 chunks +2 lines, -0 lines 0 comments Download
M cc/blink/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/BUILD.gn View 4 chunks +7 lines, -1 line 0 comments Download
M chrome/test/BUILD.gn View 13 chunks +13 lines, -0 lines 0 comments Download
M chrome_elf/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/constrained_window/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/nacl/browser/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/nacl/loader/sandbox_linux/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/nacl/renderer/plugin/BUILD.gn View 1 chunk +7 lines, -0 lines 0 comments Download
M components/tracing/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M components/update_client/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M content/shell/android/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M device/power_save_blocker/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/api/document_scan/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M extensions/renderer/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/gles2_conform_support/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/tools/compositor_model_bench/BUILD.gn View 1 chunk +5 lines, -0 lines 0 comments Download
M ios/chrome/browser/ui/bookmarks/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ios/chrome/browser/ui/bookmarks/bookmark_utils_ios_unittest.mm View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M media/cast/BUILD.gn View 2 chunks +2 lines, -0 lines 0 comments Download
M mojo/edk/system/ports/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M net/BUILD.gn View 5 chunks +9 lines, -1 line 0 comments Download
M ppapi/BUILD.gn View 1 chunk +3 lines, -0 lines 0 comments Download
M skia/BUILD.gn View 1 2 3 4 5 2 chunks +33 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/BUILD.gn View 10 chunks +24 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/BUILD.gn View 11 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/BUILD.gn View 6 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/BUILD.gn View 3 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/BUILD.gn View 3 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/BUILD.gn View 13 chunks +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/BUILD.gn View 9 chunks +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/svg/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/BUILD.gn View 2 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/page/BUILD.gn View 2 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/BUILD.gn View 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/BUILD.gn View 6 chunks +27 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/svg/BUILD.gn View 9 chunks +27 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/timing/BUILD.gn View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webdatabase/BUILD.gn View 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 5 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/wtf/BUILD.gn View 2 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M ui/base/BUILD.gn View 1 2 3 4 5 3 chunks +6 lines, -1 line 0 comments Download
M ui/events/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/ozone/platform/wayland/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M ui/views_content_client/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 51 (39 generated)
Nico
3 years, 9 months ago (2017-03-23 14:12:59 UTC) #8
Nico
Brett, can you review this? It's fairly simple, gn-related, and needs global approval (or a ...
3 years, 9 months ago (2017-03-23 15:39:57 UTC) #25
tzik
LGTM!
3 years, 9 months ago (2017-03-23 15:58:23 UTC) #26
Nico
On 2017/03/23 15:58:23, tzik wrote: > LGTM! Thanks, didn't expect you to still be around ...
3 years, 9 months ago (2017-03-23 16:00:06 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2770693003/100001
3 years, 9 months ago (2017-03-23 16:02:33 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/346545)
3 years, 9 months ago (2017-03-23 16:16:16 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2770693003/100001
3 years, 9 months ago (2017-03-23 17:26:05 UTC) #36
commit-bot: I haz the power
Failed to apply patch for content/test/BUILD.gn: While running git apply --index -p1; error: patch failed: ...
3 years, 9 months ago (2017-03-23 17:34:15 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2770693003/120001
3 years, 9 months ago (2017-03-23 17:38:21 UTC) #42
brettw
spot-checked LGTM
3 years, 9 months ago (2017-03-23 17:47:20 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2770693003/120001
3 years, 9 months ago (2017-03-23 18:02:48 UTC) #48
commit-bot: I haz the power
3 years, 9 months ago (2017-03-23 18:15:46 UTC) #51
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/b8590c94fe271ff8b6825fd703c6...

Powered by Google App Engine
This is Rietveld 408576698