New issue
Advanced search Search tips

Issue 781054 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

git cl format doesn't work on BUILD.gn file

Project Member Reported by jzw@chromium.org, Nov 2 2017

Issue description

Developing //ios/web_view on Mac OSX.

What steps will reproduce the problem?
(1) Edit BUILD.gn file and purposely not alphabetize some list.
(2) Run "git cl format ."

What is the expected result?
BUILD.gn file is fixed up.

What happens instead?
No changes occur in BUILD.gn files

 
Cc: sdefresne@chromium.org
Components: -Infra>SDK Build
Sylvain, would you mind taking a look?
Status: WontFix (was: Untriaged)
I cannot reproduce locally:

  $ emacs ios/web_view/BUILD.gn
  # Here I just randomly change formatting of the file.
  $ git cl format
  Wrote formatted to '/Users/sdefresne/Developer/chromium/src/ios/web_view/BUILD.gn'.

Note that the file will not be reformated if it presents errors, and that only some lists are sorted (those assigned to "sources", "deps" and related attributes).

Closing as WontFix as I cannot reproduce.
Sylvain, this was very specific instance where "git cl format" did not work for John:
https://chromium-review.googlesource.com/c/chromium/src/+/747093/3/ios/web_view/BUILD.gn


Then it is by design. As I said, only "sources"/"deps" lists are sorted. Not global variables.
The reason list are not sorted by default is that order my have meaning (for example if they are assigned to "args") and the formatter cannot see how a global variable is used (especially for a variable that is exported).

Sign in to add a comment