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

Issue 766573003: gn format //build (Closed)

Created:
6 years ago by scottmg
Modified:
6 years ago
Reviewers:
brettw
CC:
chromium-reviews, cc-bugs_chromium.org, klundberg+watch_chromium.org, yfriedman+watch_chromium.org, jshin+watch_chromium.org, jbudorick+watch_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

gn format //build A starting point for doing all of src, and adding a PRESUBMIT. Includes https://codereview.chromium.org/772663002/ and https://codereview.chromium.org/770053002/. I haven't pushed new binaries yet. Generated via: > cd build > git ls-files *.gn *.gni | sed -e "s/^/@..\\\\out\\\\Debug\\\\gn format --in-place /" >x.bat && x.bat The only things that I don't love in the current output are: 1. Turning args = [ "--depfile", rebase_path(depfile, root_build_dir), "--android-sdk-tools", rebased_android_sdk_build_tools, "--dex-path", rebased_output, ] into: args = [ "--depfile", rebase_path(depfile, root_build_dir), "--android-sdk-tools", rebased_android_sdk_build_tools, "--dex-path", rebased_output, ] The heuristic for this isn't trivial though, and it also affects e.g. '-Xclang' in cflags, as well as assignments to temporaries that are later assigned to args. 2. Turning single line if (defined(invoker.inputs)) { inputs = invoker.inputs } into if (defined(invoker.inputs)) { inputs = invoker.inputs } This could be argued to be an improvement, but as it's very boilerplate-y perhaps an exception to allow single line in this case is worthwhile. I think there was discussion of new syntax for this case too, something like "inputs ?= invoker.inputs" maybe. In both cases, I think it's worthwhile to get formatting turned on, and then go back and special case these if we decide it's worthwhile. R=brettw@chromium.org BUG=348474 Committed: https://crrev.com/b199254f481c5db36d56e83fce40594b06d2b81f Cr-Commit-Position: refs/heads/master@{#306305}

Patch Set 1 #

Patch Set 2 : after paren improvement #

Patch Set 3 : . #

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1749 lines, -1072 lines) Patch
M build/android/gyp/test/BUILD.gn View 1 chunk +3 lines, -1 line 0 comments Download
M build/compiled_action.gni View 2 chunks +14 lines, -12 lines 0 comments Download
M build/config/BUILD.gn View 1 2 3 5 chunks +6 lines, -9 lines 0 comments Download
M build/config/BUILDCONFIG.gn View 13 chunks +327 lines, -123 lines 0 comments Download
M build/config/allocator.gni View 1 chunk +1 line, -1 line 0 comments Download
M build/config/android/BUILD.gn View 1 chunk +5 lines, -3 lines 0 comments Download
M build/config/android/config.gni View 6 chunks +26 lines, -16 lines 0 comments Download
M build/config/android/internal_rules.gni View 1 2 40 chunks +275 lines, -182 lines 0 comments Download
M build/config/android/rules.gni View 51 chunks +358 lines, -192 lines 0 comments Download
M build/config/arm.gni View 2 chunks +3 lines, -5 lines 0 comments Download
M build/config/clang/BUILD.gn View 1 chunk +10 lines, -7 lines 0 comments Download
M build/config/compiler/BUILD.gn View 1 28 chunks +57 lines, -84 lines 0 comments Download
M build/config/features.gni View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M build/config/gcc/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M build/config/gcc/gcc_version.gni View 1 chunk +12 lines, -2 lines 0 comments Download
M build/config/ios/BUILD.gn View 1 chunk +4 lines, -1 line 0 comments Download
M build/config/ios/ios_sdk.gni View 1 chunk +1 line, -1 line 0 comments Download
M build/config/linux/BUILD.gn View 5 chunks +21 lines, -10 lines 0 comments Download
M build/config/linux/pkg_config.gni View 1 1 chunk +11 lines, -3 lines 0 comments Download
M build/config/mac/BUILD.gn View 3 chunks +6 lines, -5 lines 0 comments Download
M build/config/mac/mac_sdk.gni View 1 chunk +6 lines, -1 line 0 comments Download
M build/config/sanitizers/BUILD.gn View 1 chunk +10 lines, -3 lines 0 comments Download
M build/config/win/BUILD.gn View 2 chunks +2 lines, -6 lines 0 comments Download
M build/go/rules.gni View 2 chunks +27 lines, -23 lines 0 comments Download
M build/json_schema_api.gni View 5 chunks +27 lines, -23 lines 0 comments Download
M build/secondary/testing/BUILD.gn View 1 chunk +3 lines, -1 line 0 comments Download
M build/secondary/testing/gmock/BUILD.gn View 2 chunks +7 lines, -2 lines 0 comments Download
M build/secondary/testing/gtest/BUILD.gn View 3 chunks +8 lines, -3 lines 0 comments Download
M build/secondary/third_party/android_tools/BUILD.gn View 3 chunks +16 lines, -11 lines 0 comments Download
M build/secondary/third_party/cacheinvalidation/src/google/cacheinvalidation/BUILD.gn View 1 chunk +0 lines, -1 line 0 comments Download
M build/secondary/third_party/freetype/BUILD.gn View 1 chunk +1 line, -3 lines 0 comments Download
M build/secondary/third_party/icu/BUILD.gn View 6 chunks +21 lines, -12 lines 0 comments Download
M build/secondary/third_party/leveldatabase/BUILD.gn View 2 chunks +2 lines, -1 line 0 comments Download
M build/secondary/third_party/libjpeg_turbo/BUILD.gn View 4 chunks +84 lines, -92 lines 0 comments Download
M build/secondary/third_party/libsrtp/BUILD.gn View 16 chunks +44 lines, -15 lines 0 comments Download
M build/secondary/third_party/nss/BUILD.gn View 13 chunks +27 lines, -34 lines 0 comments Download
M build/secondary/third_party/openmax_dl/dl/BUILD.gn View 11 chunks +18 lines, -21 lines 0 comments Download
M build/secondary/third_party/sfntly/BUILD.gn View 1 chunk +3 lines, -1 line 0 comments Download
M build/secondary/tools/grit/BUILD.gn View 2 chunks +4 lines, -2 lines 0 comments Download
M build/secondary/tools/grit/grit_rule.gni View 1 2 3 5 chunks +150 lines, -53 lines 0 comments Download
M build/toolchain/android/BUILD.gn View 1 2 chunks +6 lines, -4 lines 0 comments Download
M build/toolchain/gcc_toolchain.gni View 5 chunks +26 lines, -21 lines 0 comments Download
M build/toolchain/mac/BUILD.gn View 5 chunks +39 lines, -32 lines 0 comments Download
M build/toolchain/nacl/BUILD.gn View 2 chunks +10 lines, -4 lines 0 comments Download
M build/toolchain/win/BUILD.gn View 8 chunks +43 lines, -32 lines 0 comments Download
M build/toolchain/win/midl.gni View 3 chunks +15 lines, -8 lines 0 comments Download
M build/util/BUILD.gn View 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
scottmg
6 years ago (2014-12-01 23:19:51 UTC) #1
brettw
lgtm sweet!
6 years ago (2014-12-01 23:34:34 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/766573003/60001
6 years ago (2014-12-02 00:16:32 UTC) #4
commit-bot: I haz the power
Committed patchset #4 (id:60001)
6 years ago (2014-12-02 00:25:30 UTC) #5
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/b199254f481c5db36d56e83fce40594b06d2b81f Cr-Commit-Position: refs/heads/master@{#306305}
6 years ago (2014-12-02 00:26:05 UTC) #6
tfarina
6 years ago (2014-12-02 01:37:38 UTC) #7
Message was sent while issue was closed.
I think 2 is wonderful! Reminds me Go (and I think it avoids bugs in the long
term). Cheers!

Powered by Google App Engine
This is Rietveld 408576698