vulcanize_gn.py: Don't write twice to output files |
||
Issue descriptionWhen a file is declared as an output file (see example [1]) of a GN rule, its timestamp determines whether the rule needs to re-run or not. Writing twice to the same file confuses the build system. Concrete example 1) Add an intentional syntax error after a JS file is processed by crisper, but before passed to Uglify (specifically after line at [2]) 2) Execute the following command from within your out/<...> folder ninja -d explain chrome/browser/resources/settings:vulcanize_app 3) Observer syntax error thrown in the console 4) Re-run same command Expected: vulcanize_gn.py is re-executed. Actual: vulcanize_gn.py is not executed, because the build system things that all outputs exist and they have a later timestamp than previous invocation of the same target. [1] https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/BUILD.gn?l=16 [2] https://cs.chromium.org/chromium/src/chrome/browser/resources/vulcanize_gn.py?l=165
,
Jun 3 2017
,
Jun 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4309919f5a61e0701e073f21ed312e4d14cfc322 commit 4309919f5a61e0701e073f21ed312e4d14cfc322 Author: dpapad <dpapad@chromium.org> Date: Tue Jun 06 20:33:48 2017 vulcanize_gn.py: Stop writing twice to the declared GN output file. This confuses the build system when an error happens after the 1st write and before the script completely finishes. BUG= 729191 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2915393002 Cr-Commit-Position: refs/heads/master@{#477390} [modify] https://crrev.com/4309919f5a61e0701e073f21ed312e4d14cfc322/chrome/browser/resources/vulcanize_gn.py [modify] https://crrev.com/4309919f5a61e0701e073f21ed312e4d14cfc322/chrome/browser/resources/vulcanize_gn_test.py
,
Jun 6 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by dpa...@chromium.org
, Jun 2 2017