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

Issue 136723008: Remove some appending behavior from GN. (Closed)

Created:
6 years, 11 months ago by brettw
Modified:
6 years, 11 months ago
Reviewers:
scottmg
CC:
chromium-reviews
Visibility:
Public.

Description

Remove some appending behavior from GN. Remove operator += and -= to append/remove a non-list to/from a list. Now you will have to wrap a single item in [] if you want to add or remove it. This makes the syntax more uniform since people were doing it randomly with and without []. This removes the error of assigning to an unused variable. This ended up being too much of a bother, and causing errors in cases were you wouldn't expect it. R=scottmg@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247202

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -51 lines) Patch
M tools/gn/operators.cc View 1 7 chunks +42 lines, -48 lines 0 comments Download
M tools/gn/operators_unittest.cc View 1 3 chunks +70 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
brettw
6 years, 11 months ago (2014-01-15 00:27:43 UTC) #1
scottmg
https://codereview.chromium.org/136723008/diff/1/tools/gn/operators.cc File tools/gn/operators.cc (right): https://codereview.chromium.org/136723008/diff/1/tools/gn/operators.cc#newcode266 tools/gn/operators.cc:266: if (!right.type() != Value::LIST) { is !right.type() what you ...
6 years, 11 months ago (2014-01-15 00:32:07 UTC) #2
brettw
Now with more tests.
6 years, 11 months ago (2014-01-15 23:19:55 UTC) #3
scottmg
lgtm
6 years, 11 months ago (2014-01-15 23:22:01 UTC) #4
brettw
6 years, 11 months ago (2014-01-27 07:00:08 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 manually as r247202 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698