"gn desc" doesn't print errors |
||||
Issue descriptionIf an error (like an undefined identifier) happens when running "gn desc", it isn't printed and GN exits with no output. We should print the error message and audit other commands to make sure they do the same.
,
Nov 10 2017
,
May 1 2018
,
May 1 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9e71c94d75e6c6e8fecbb601ddde8d3f35c4fba1 commit 9e71c94d75e6c6e8fecbb601ddde8d3f35c4fba1 Author: Eli Ribble <eliribble@chromium.org> Date: Tue May 01 21:42:04 2018 Show error with gn desc when no matches are made This tells the user that they input a value that matches nothing so that they know they need to correct the input and try again rather than showing no output and acting like the command worked correctly Bug: 646012 Change-Id: I9e796a4a09216dde8939e4a60b255f8beff0c52b Reviewed-on: https://chromium-review.googlesource.com/1037910 Reviewed-by: Dirk Pranke <dpranke@chromium.org> Commit-Queue: Eli Ribble <eliribble@chromium.org> Cr-Commit-Position: refs/heads/master@{#555188} [modify] https://crrev.com/9e71c94d75e6c6e8fecbb601ddde8d3f35c4fba1/tools/gn/command_desc.cc
,
May 1 2018
,
May 2 2018
From Oleh Prypin: "I don't know about this change. It breaks our tools, but even disregarding that, having empty output for `gn desc ... runtime_deps` is perfectly valid and should not be an error." I disagree that it's perfectly valid primarily on the grounds that "gn desc <valid-out-directory> this-is-not-a-valid-target" should inform the user that this-is-not-a-valid-target isn't valid because it helps catch very normal typos. Is there a use-case where you are seeing an error response from this tool when you shouldn't? IE, when you've provided a valid target or configuration and the tool is telling you it is not valid? Could you describe your automation tools more so we can understand what your use case is? Could we add some kind of flag to silence the errors in your situation? |
||||
►
Sign in to add a comment |
||||
Comment 1 by sheriffbot@chromium.org
, Sep 13 2017Status: Untriaged (was: Available)