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

Issue 1496653002: Sort "deps" and "public_deps" when running the "gn format" command. (Closed)

Created:
5 years ago by sdefresne
Modified:
5 years ago
CC:
chromium-reviews, Dirk Pranke
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Sort "deps" and "public_deps" when running the "gn format" command. The "deps" and "public_deps" are sorted using the following order: 1. litteral strings a. local targets, e.g. ":a", b. relative targets, e.g. "a" or "../a", c. absolute targets, e.g. "//a", 2. other values, e.g. variable reference. In each group, values are sorted alphabetically. BUG=554928 Committed: https://crrev.com/b502732dcdb76fae1e8c2f8ddc63a019e9a9ecdd Cr-Commit-Position: refs/heads/master@{#362943}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Tweak order according to dpranke's comment #

Total comments: 5

Patch Set 3 : Address comments & add some test cases #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -13 lines) Patch
M tools/gn/format_test_data/063.gn View 1 2 1 chunk +24 lines, -6 lines 0 comments Download
M tools/gn/format_test_data/063.golden View 1 2 1 chunk +24 lines, -6 lines 0 comments Download
M tools/gn/parse_tree.cc View 1 2 2 chunks +22 lines, -1 line 0 comments Download

Messages

Total messages: 23 (8 generated)
sdefresne
Please take a look.
5 years ago (2015-12-02 18:43:58 UTC) #2
sdefresne
Note: CL applying the sort order is at https://codereview.chromium.org/1496653002.
5 years ago (2015-12-02 18:44:58 UTC) #3
sdefresne
Copy-n-paste fail, correct link is https://codereview.chromium.org/1497543003.
5 years ago (2015-12-02 18:45:21 UTC) #4
Dirk Pranke
Brett, Scott, thoughts? https://codereview.chromium.org/1496653002/diff/1/tools/gn/format_test_data/063.gn File tools/gn/format_test_data/063.gn (right): https://codereview.chromium.org/1496653002/diff/1/tools/gn/format_test_data/063.gn#newcode9 tools/gn/format_test_data/063.gn:9: a, This is definitely not right. ...
5 years ago (2015-12-02 18:53:28 UTC) #7
sdefresne
On 2015/12/02 at 18:53:28, dpranke wrote: > Brett, Scott, thoughts? > > https://codereview.chromium.org/1496653002/diff/1/tools/gn/format_test_data/063.gn > File ...
5 years ago (2015-12-02 19:57:38 UTC) #9
brettw
lgtm
5 years ago (2015-12-02 20:16:38 UTC) #10
tfarina
https://codereview.chromium.org/1496653002/diff/20001/tools/gn/parse_tree.cc File tools/gn/parse_tree.cc (right): https://codereview.chromium.org/1496653002/diff/20001/tools/gn/parse_tree.cc#newcode20 tools/gn/parse_tree.cc:20: kDepsCategoryLocal = 0, my understanding from the style-guide is ...
5 years ago (2015-12-02 20:19:32 UTC) #12
Dirk Pranke
lgtm
5 years ago (2015-12-02 21:27:02 UTC) #13
scottmg
lgtm https://codereview.chromium.org/1496653002/diff/20001/tools/gn/parse_tree.cc File tools/gn/parse_tree.cc (right): https://codereview.chromium.org/1496653002/diff/20001/tools/gn/parse_tree.cc#newcode20 tools/gn/parse_tree.cc:20: kDepsCategoryLocal = 0, nit; Drop the " = ...
5 years ago (2015-12-02 22:12:12 UTC) #14
sdefresne
Thank you for the reviews. https://codereview.chromium.org/1496653002/diff/20001/tools/gn/parse_tree.cc File tools/gn/parse_tree.cc (right): https://codereview.chromium.org/1496653002/diff/20001/tools/gn/parse_tree.cc#newcode20 tools/gn/parse_tree.cc:20: kDepsCategoryLocal = 0, On ...
5 years ago (2015-12-03 09:30:00 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1496653002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1496653002/40001
5 years ago (2015-12-03 09:30:20 UTC) #18
sdefresne
tfarina: will you be taking care of deployment of a new version of gn with ...
5 years ago (2015-12-03 09:32:33 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-12-03 10:22:25 UTC) #20
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/b502732dcdb76fae1e8c2f8ddc63a019e9a9ecdd Cr-Commit-Position: refs/heads/master@{#362943}
5 years ago (2015-12-03 10:23:52 UTC) #22
tfarina
5 years ago (2015-12-03 12:08:08 UTC) #23
Message was sent while issue was closed.
On 2015/12/03 09:32:33, sdefresne wrote:
> tfarina: will you be taking care of deployment of a new version of gn with
> that fixed ordering of deps? If so, could you send the followup CL
> https://codereview.chromium.org/1497543003/ to the CQ once this is done (I
> can't now because the ordering is considered broken by PRESUBMIT check).
> 
Sorry, I forgot to wait for that change to land before pushing another gn
binary. Looks like it didn't make into the binary I pushed yesterday. I will
have to do another push, so this change gets in. But yeah, I will look into
that.

Powered by Google App Engine
This is Rietveld 408576698