New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 646012 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 15 days ago
Closed: May 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

"gn desc" doesn't print errors

Project Member Reported by brettw@chromium.org, Sep 12 2016

Issue description

If 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.
 
Project Member

Comment 1 by sheriffbot@chromium.org, Sep 13 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: Build
Owner: eliribble@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, 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

Status: Fixed (was: Untriaged)
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