本文档翻译自:https://docs.conan.io/en/latest/reference/commands/output/user.html
:::success
Warning
这是一项实验性功能,可能会在将来的发行版中进行重大更改。
:::
conan info
提供了--json
参数来生成包含命令输出的文件。
根据其他参数,有几种可能的输出:
Build order
:::success
Warning
不建议使用conan info --build-order
命令,而建议使用conan graph构建顺序。
:::
用参数—build-order打印的构建顺序可以格式化为JSON。 它将显示一个列表列表,其中每个嵌套列表中的引用都可以并行构建。
build_order.json¶
{
"groups":[
[
"liba/0.1@lasote/stable",
"libe/0.1@lasote/stable",
"libf/0.1@lasote/stable"
],
[
"libb/0.1@lasote/stable",
"libc/0.1@lasote/stable"
]
]
}
Nodes to build
当使用参数—build调用时,它将根据构建策略检索要构建的节点列表。 输出将只是参考列表。
nodes_to_build.json¶
[
"h0/0.1@lu/st",
"h1a/0.1@lu/st",
"h1c/0.1@lu/st",
"h2a/0.1@lu/st",
"h2c/0.1@lu/st"
]
Info output
通过引用或路径的柯南信息调用的输出给出了有关其构建图中涉及的所有节点的信息; 生成的JSON文件将包含一个列表,其中包含每个节点的信息。
info.json¶
[
{
"reference":"liba/0.1@lasote/stable",
"is_ref":true,
"display_name":"liba/0.1@lasote/stable",
"id":"8da7d879f40d12efabc9a1f26ab12f1b6cafb6ad",
"build_id":null,
"url":"myurl",
"license":[
"MIT"
],
"description": "project A",
"recipe":"No remote",
"binary":"Missing",
"creation_date":"2019-01-29 17:22:41",
"required_by":[
"libc/0.1@lasote/stable",
"libb/0.1@lasote/stable"
]
},
{
"reference":"libb/0.1@lasote/stable",
"is_ref":true,
"display_name":"libb/0.1@lasote/stable",
"id":"c4ec2bf350e2a02405029ab366535e26372a4f63",
"build_id":null,
"url":"myurl",
"license":[
"MIT"
],
"description": "project C",
"recipe":"No remote",
"binary":"Missing",
"creation_date":"2019-01-29 17:22:41",
"required_by":[
"conanfile.py (libd/0.1@None/None)"
],
"requires":[
"liba/0.1@lasote/stable",
"libe/0.1@lasote/stable"
]
},
{ "...": "..."}
]
:::info
Note
由于这被标记为实验性的,因此某些字段可能会被删除或添加。
:::