GN feature request: JSON export |
||
Issue descriptionVarious people and projects have wanted dependency tree information out of GN programatically. This does not block anything from the GN team's perspective, but is a frequently requested feature. From a user perspective, I'm thinking of adding a flag to "gn desc" to control formatting: gn desc --format=json out/foo //base:base Would dump the summary of base in JSON format to stdout. "gn desc" also supports wildcards, so to dump all projects would be: gn desc --format=json out/foo "//*" Implementation-wise, I'm thinking all of the computation code in command_deps would be changed to fill base::Values instead of print to stdout. There is already a serializer from base::Value to JSON. For the current behavior, we write a simple JSON-to-indented text output function there. This way the code paths are all the same for the different output formats. The only interesting parts are deciding how to implement the more complex things which are --blame (lots of annotations for various groups) and the --tree mode of deps (indentation). It could be we just serialize to strings that "look right" and assume people won't care about this information in JSON format.
,
Jun 30 2016
With latest patchset --format=json should work
,
Aug 17 2016
This is done |
||
►
Sign in to add a comment |
||
Comment 1 by matej.kn...@gmail.com
, Jun 30 2016