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

Issue 1318823008: Un-nest configs in GN files. (Closed)

Created:
5 years, 3 months ago by brettw
Modified:
5 years, 3 months ago
Reviewers:
Dirk Pranke, Nico
CC:
chromium-reviews, jzern, vikasa, urvang, skal, rouslan+spellwatch_chromium.org, rlp+watch_chromium.org, groby+spellwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Un-nest configs in GN files. People sometimes nest targets or configs, usually with the assumption that this limits the visibility of a config to within a target. But this nesting provides no visibility restrictions over declaring it outside of a block. Un-nest for clarity. Committed: https://crrev.com/4af2eac8e84692d94f88504ab6e0b244b88dddcb Cr-Commit-Position: refs/heads/master@{#346461}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -244 lines) Patch
M build/secondary/testing/gtest/BUILD.gn View 2 chunks +9 lines, -8 lines 0 comments Download
M sdch/BUILD.gn View 3 chunks +12 lines, -12 lines 0 comments Download
M third_party/brotli/BUILD.gn View 2 chunks +13 lines, -10 lines 0 comments Download
M third_party/cld_2/BUILD.gn View 1 2 chunks +12 lines, -8 lines 0 comments Download
M third_party/harfbuzz-ng/BUILD.gn View 1 3 chunks +34 lines, -31 lines 3 comments Download
M third_party/hunspell/BUILD.gn View 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/libpng/BUILD.gn View 2 chunks +9 lines, -8 lines 0 comments Download
M third_party/libusb/BUILD.gn View 2 chunks +11 lines, -9 lines 0 comments Download
M third_party/libwebp/BUILD.gn View 2 chunks +7 lines, -6 lines 0 comments Download
M third_party/libxml/BUILD.gn View 3 chunks +36 lines, -34 lines 0 comments Download
M third_party/libxslt/BUILD.gn View 2 chunks +17 lines, -14 lines 0 comments Download
M third_party/lzma_sdk/BUILD.gn View 2 chunks +13 lines, -12 lines 0 comments Download
M third_party/mesa/BUILD.gn View 2 chunks +9 lines, -9 lines 0 comments Download
M third_party/snappy/BUILD.gn View 2 chunks +12 lines, -9 lines 0 comments Download
M third_party/sqlite/BUILD.gn View 2 chunks +21 lines, -20 lines 0 comments Download
M third_party/usrsctp/BUILD.gn View 2 chunks +12 lines, -9 lines 0 comments Download
M third_party/yasm/BUILD.gn View 3 chunks +25 lines, -24 lines 0 comments Download
M third_party/zlib/BUILD.gn View 1 2 4 chunks +19 lines, -15 lines 0 comments Download

Messages

Total messages: 27 (7 generated)
brettw
5 years, 3 months ago (2015-08-31 19:04:59 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1318823008/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1318823008/20001
5 years, 3 months ago (2015-08-31 19:05:24 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/126703) linux_chromium_gn_chromeos_rel on ...
5 years, 3 months ago (2015-08-31 19:10:10 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1318823008/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1318823008/40001
5 years, 3 months ago (2015-08-31 19:31:46 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-08-31 20:08:25 UTC) #10
Dirk Pranke
lgtm
5 years, 3 months ago (2015-08-31 20:08:54 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1318823008/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1318823008/40001
5 years, 3 months ago (2015-08-31 20:35:31 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 3 months ago (2015-08-31 20:41:53 UTC) #14
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/4af2eac8e84692d94f88504ab6e0b244b88dddcb Cr-Commit-Position: refs/heads/master@{#346461}
5 years, 3 months ago (2015-08-31 20:43:06 UTC) #15
Nico
https://codereview.chromium.org/1318823008/diff/40001/third_party/harfbuzz-ng/BUILD.gn File third_party/harfbuzz-ng/BUILD.gn (right): https://codereview.chromium.org/1318823008/diff/40001/third_party/harfbuzz-ng/BUILD.gn#newcode180 third_party/harfbuzz-ng/BUILD.gn:180: ":harfbuzz_warnings", Not lgtm, this breaks things. ":harfbuzz_warnings" needs to ...
5 years, 3 months ago (2015-09-01 18:27:48 UTC) #17
Nico
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/1316843006/ by thakis@chromium.org. ...
5 years, 3 months ago (2015-09-01 18:28:35 UTC) #18
Dirk Pranke
https://codereview.chromium.org/1318823008/diff/40001/third_party/harfbuzz-ng/BUILD.gn File third_party/harfbuzz-ng/BUILD.gn (right): https://codereview.chromium.org/1318823008/diff/40001/third_party/harfbuzz-ng/BUILD.gn#newcode180 third_party/harfbuzz-ng/BUILD.gn:180: ":harfbuzz_warnings", On 2015/09/01 18:27:47, Nico wrote: > Not lgtm, ...
5 years, 3 months ago (2015-09-01 18:38:38 UTC) #19
Nico
https://codereview.chromium.org/1318823008/diff/40001/third_party/harfbuzz-ng/BUILD.gn File third_party/harfbuzz-ng/BUILD.gn (right): https://codereview.chromium.org/1318823008/diff/40001/third_party/harfbuzz-ng/BUILD.gn#newcode180 third_party/harfbuzz-ng/BUILD.gn:180: ":harfbuzz_warnings", On 2015/09/01 18:38:38, Dirk Pranke wrote: > On ...
5 years, 3 months ago (2015-09-01 18:42:00 UTC) #20
brettw
I'll fix this. If there is a case where ordering matters, please comment that in ...
5 years, 3 months ago (2015-09-01 21:05:49 UTC) #21
Nico
On 2015/09/01 21:05:49, brettw wrote: > I'll fix this. If there is a case where ...
5 years, 3 months ago (2015-09-01 21:09:19 UTC) #22
brettw
On 2015/09/01 21:09:19, Nico wrote: > Configs are order-dependent. If ordering has semantic meaning, sorting ...
5 years, 3 months ago (2015-09-01 21:11:31 UTC) #23
Nico
On 2015/09/01 21:11:31, brettw wrote: > On 2015/09/01 21:09:19, Nico wrote: > > Configs are ...
5 years, 3 months ago (2015-09-01 21:16:19 UTC) #24
brettw
On 2015/09/01 21:16:19, Nico wrote: > On 2015/09/01 21:11:31, brettw wrote: > > On 2015/09/01 ...
5 years, 3 months ago (2015-09-01 21:20:16 UTC) #25
Nico
On 2015/09/01 21:20:16, brettw wrote: > On 2015/09/01 21:16:19, Nico wrote: > > On 2015/09/01 ...
5 years, 3 months ago (2015-09-01 21:23:26 UTC) #26
brettw
5 years, 3 months ago (2015-09-01 21:30:36 UTC) #27
Message was sent while issue was closed.
On 2015/09/01 21:23:26, Nico wrote:
> On 2015/09/01 21:20:16, brettw wrote:
> > On 2015/09/01 21:16:19, Nico wrote:
> > > On 2015/09/01 21:11:31, brettw wrote:
> > > > On 2015/09/01 21:09:19, Nico wrote:
> > > > > Configs are order-dependent. If ordering has semantic meaning, sorting
> > > doesn't
> > > > > seem like a style thing. (Not just for warning flags, also for -I
flags.
> > > > > Compiler flags aren't commutative.)
> > > > 
> > > > Correct, but most ordering is not meaningful and people put them in
random
> > > > order. If you need ordering to work, then you're doing something unusual
> and
> > > > subtle and I think a comment is warranted.
> > > 
> > > Isn't this true for all "use config" use cases though? If I didn't need
> > > ordering, I'd just set cflags instead of using a config, no?
> > 
> > No, this use of configs only happens in a few places and you've probably
> written
> > half of them :) Most uses of configs are to share flags, like any config in
> > //build:
> >   configs += [ "//build/config:precompiled_headers" ]
> > or base does:
> >   configs += [ ":base_implementation" ]
> > because it wants to set BASE_IMPLEMENTATION for a handful of random targets
> that
> > all get linked into base.dll.
> 
> Ok, fair enough. If you want, I can add comments to all the warning configs
that
> I can find. (Else, I'm happy to review said change.)

I'll comment the ones I touch when I re-land this.


> (The "replace_default_config(chromium_code, no_chromium_code)" idea on that
> gn-dev thread would make all these warning configs unnecessary. Maybe I should
> give that a try after all?)

I'm still not sold on this given current usage. If we do this kind of thing, I
would prefer the syntax:
  configs.replace("//build/config/compiler:chromium_code",
"//build_config/compiler:no_chromium_code")
which will need some minor parser enhancements to support functions on objects.

Brett

Powered by Google App Engine
This is Rietveld 408576698