gn format produces broken output |
|||
Issue descriptionwhen you run git cl format on BUILD.gn in V8, it'll sort all sources = [] blocks. However, the actions like js2c depend on the exact order of files in sources = [] i.e. prologue.js has to be the first file. maybe don't sort sources blocks for actions? Or is there a way to annotate them so they're not sorted?
,
Mar 4 2016
I'm ambivalent about whether we should just not sort sources for actions. I can add support for an annotation.
,
Mar 4 2016
I don't think you can really know. Most of our actions are run via a template and you don't know what they'll end up in. On the other side, some things like components are also templates and you couldn't know that it's not an action.
,
Mar 5 2016
I started adding a "# NOSORT", but Nico had a reasonable idea -- we could break up sources blocks instead, i.e. sources = [] sources += [a.js] sources += [b.js] when order is required. Does that seem workable since it's a pretty unusual case?
,
Mar 5 2016
https://codereview.chromium.org/1766163002 adds a "# NOSORT" annotation.
,
Mar 5 2016
# NOSORT seems cleaner than breaking things up to me ...
,
Mar 11 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/aa7f7d038156bdf3f317773b784b4a308efd0132 commit aa7f7d038156bdf3f317773b784b4a308efd0132 Author: scottmg <scottmg@chromium.org> Date: Fri Mar 11 19:50:11 2016 gn format: Support # NOSORT to disable sorting of blocks R=brettw@chromium.org BUG= 591953 Review URL: https://codereview.chromium.org/1766163002 Cr-Commit-Position: refs/heads/master@{#380709} [modify] https://crrev.com/aa7f7d038156bdf3f317773b784b4a308efd0132/tools/gn/command_format.cc [modify] https://crrev.com/aa7f7d038156bdf3f317773b784b4a308efd0132/tools/gn/command_format_unittest.cc [add] https://crrev.com/aa7f7d038156bdf3f317773b784b4a308efd0132/tools/gn/format_test_data/066.gn [add] https://crrev.com/aa7f7d038156bdf3f317773b784b4a308efd0132/tools/gn/format_test_data/066.golden
,
Mar 11 2016
Needs a roll to be applied in v8/chrome. |
|||
►
Sign in to add a comment |
|||
Comment 1 by dpranke@chromium.org
, Mar 4 2016