Export info about templates in 'gn desc' |
|||||
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.
,
Jan 23 2017
slan: fyi ^^
,
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
,
Jan 24 2017
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).
,
Feb 25 2017
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?
,
Feb 25 2017
,
Mar 7 2018
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 |
|||||
Comment 1 by kjellander@chromium.org
, Jan 20 2017Labels: Build-Tools-GN Pri-2 Type-Feature
Status: Assigned (was: Untriaged)