[Qbs] Get rid of extra product type statements when generating graphviz dependency graphs using qbs

qbs at mein-briefkasten.net qbs at mein-briefkasten.net
Mon Dec 12 11:34:08 CET 2022


Hi again, 

thanks for the quick answer.


> On 12. Dec 2022, at 10:40, Christian Kandeler via Qbs <qbs at qt-project.org> wrote:
> 
> On 12/11/22 19:08, qbs at mein-briefkasten.net wrote:
>> Just "Depends { name: "depgraph” }” was not enough, I had to extend the type of
>> every lib to get all dependencies show up in the graph, i.e.
> 
> Yes, and the reason is explained here: https://doc.qt.io/qbs/qml-qbslanguageitems-rule.html#rules-and-product-types
> 
>> Depends { name: "depgraph" }
>> type: base.concat(["dot-fragment”])
> 
> You want https://doc.qt.io/qbs/qml-qbslanguageitems-module.html#additionalProductTypes-prop.
> 
>> The leanest way from a qbs user perspective would be to just do a
>> -----
>> CppApplication {
>> name: “app”
>> ...
>> }
>> 
>> DotDependencyGraph {
>> name: “app-dependency-graph”
>> Depends { name:  “app” }
>> }
>> -----
>> So no need to add a Depends to every related product and just pull the
>> dependencies via the single app dependency, but no idea if this would be
>> possible and how to do it.
> 
> It's just a matter of how you write your rule, no? You have access to the dependency tree of products via product.dependencies.

As it turns out product.dependencies is just what I was looking for in the first place. This is of great help.
Is there any documentation about what properties I can expect in product (and are stable to stay there over version changes)?

Cheers,
Max

> 
> 
> Christian
> 
> _______________________________________________
> Qbs mailing list
> Qbs at qt-project.org
> https://lists.qt-project.org/listinfo/qbs



More information about the Qbs mailing list