|
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
|
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
|
Total messages: 51 (39 generated)
|