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

Issue 683058 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Blocking:
issue webrtc:6412



Sign in to add a comment

Export info about templates in 'gn desc'

Project Member Reported by mbonadei@chromium.org, Jan 20 2017

Issue description

I am using the "gn desc --format=json" command but it seems that there is not way to find a template name in the output of the command.

For example, if I have a template:

template("foo") {
  # ...
}

And I use it to define the following target:

foo("bar") {
  # ...
}

If I run "gn desc --format=json out/default" there is no way to know that "bar" is a template invocation (the type of "bar" in the json output is not template) and it is also impossible to retrieve the name of the template.

In a discussion on the gn-dev mailing list we were thinking to add a "template" field where a list of templates can be shown (this because templates can be nested).

{
   "bar": {
      "deps": [ ... ],
      "public": "*",
      "testonly": false,
      "toolchain": "...",
      "type": "group",
      "visibility": [ "*" ],
      "template": ["foo"]
   }
}

Other details can be found at: https://groups.google.com/a/chromium.org/forum/#!topic/gn-dev/Vo3nM0K8z0Y.

 
Blocking: webrtc:6412
Labels: Build-Tools-GN Pri-2 Type-Feature
Status: Assigned (was: Untriaged)
I'd like to add that it's not necessary we limit this to templates. Just knowing the "original target type" would be sufficient for the needs we have.

The background is that we're writing a converter from GN to Bazel BUILD files and we need this in order to convert to targets like android_library: https://bazel.build/versions/master/docs/be/android.html#android_library

I'm setting this to Assigned to avoid it showing up in Triage queries.
Cc: s...@chromium.org
slan: fyi ^^

Comment 3 by slan@google.com, Jan 24 2017

Ack - thanks Dirk.

Henrik, do you have a general tracking bug for your GN -> Bazel converter? Chromecast is interested in the same thing, and I have some internal resources that might be of interest to the effort.

Thanks
Yes, we have https://bugs.chromium.org/p/webrtc/issues/detail?id=6412 tracking it, but most of the work has been done internally (since that's where we currently use the tool). We aim to open source it at some point (Q1/Q2). 
Cc: brettw@chromium.org
Owner: ----
Status: Available (was: Assigned)
Hmm. I may have missed that this got assigned to me. I think I don't really have the time to work on this these days. Maybe we should reassign this to brettw@ if this is urgent, or find someone else who might like to take a stab at it?
Labels: OS-All
Project Member

Comment 7 by sheriffbot@chromium.org, Mar 7 2018

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

Sign in to add a comment