gn clean is broken |
||
Issue description% gn gen out/Default % gn clean out/Default % ninja -C out/Default ninja: Entering directory `out/default' ninja: no work to do. % ninja -C out/default gn ninja: Entering directory `out/default' ninja: error: unknown target 'gn' % The build.ninja file is being incorrectly preserved when we clean the rest of the files. I think this broke when we added the ninja_required_version rule.
,
Aug 18 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7a152fc8b6727dfbf1616043f314d99079605e45 commit 7a152fc8b6727dfbf1616043f314d99079605e45 Author: Dirk Pranke <dpranke@chromium.org> Date: Fri Aug 18 21:08:57 2017 Fix `gn clean`. The way `gn clean` preserves enough of the toplevel build.ninja file in order to be able to recreate itself is kind of hacky; it looks for a certain number of blank lines and then discards the rest. When we added the `ninja_required_version` field to the file, that added a blank line, but we didn't bump the number of blank lines to look for by one. This meant that we discarded the rule that would actually regenerate ninja. As a result, `gn clean` would break ninja's ability to regenerate the file. This CL fixes that. R: brettw@chromium.org Bug: 757035 Change-Id: Ie200c5705d93a9327741f52b194a35c31b66ecce Reviewed-on: https://chromium-review.googlesource.com/621589 Reviewed-by: Brett Wilson <brettw@chromium.org> Commit-Queue: Dirk Pranke <dpranke@chromium.org> Cr-Commit-Position: refs/heads/master@{#495682} [modify] https://crrev.com/7a152fc8b6727dfbf1616043f314d99079605e45/tools/gn/command_clean.cc
,
Sep 1 2017
This was fixed. |
||
►
Sign in to add a comment |
||
Comment 1 by dpranke@chromium.org
, Aug 18 2017Status: Started (was: Untriaged)