[Qbs] Graphviz export/generator

Christian Gagneraud chgans at gmail.com
Tue Jul 23 02:38:23 CEST 2019


On Mon, 22 Jul 2019 at 21:25, Christian Kandeler
<Christian.Kandeler at qt.io> wrote:
>
> On Sun, 21 Jul 2019 15:32:37 +1200
> Christian Gagneraud <chgans at gmail.com> wrote:
>
> > Hi there,
> >
> > I would like to be able to export a (graphviz) graph of a project and
> > i'm thinking about writing a new ProjectGenerator plugin for that.
> > The first kind of graph would be a product dependency graph.
> >
> > Once i have access to the top level resolved project, AFAIU, the rest
> > should be easy. As i can access all resolved products, and resolved
> > products have a list of resolved product "dependencies".
> >
> > ProjectGenerator are executed after the project is resolved, good, but
> > the API doesn't give access to the TopLevelProjectPtr, which seems to
> > be my only available entry point.
> > Any idea on how to tackle that? What would be the less intrusive API
> > change that would allow RO access to build/graph dependency data from
> > the generator plugins?
>
> You could just cheat by adding a helper function to the Project class; that'd probably still be the cleanest.

OK, might go for that then.

> You might also be interested to know that we had something like that
> and it got removed: https://codereview.qt-project.org/c/qbs/qbs/+/38596
> So perhaps check it out for hints on what not to do.

Yes, that's the wrong granularity. That's why i want to plot the
inter-product dependencies, not source/artifacts dependencies.
And even with doing that the top graph might be too big.
CMake can generates a per-target graph (w/ forward/reverse deps) and
the whole thing, I might do something similar.
I might use env variables to communicate all options/customisations.

Any suggestion and/or wish list are welcome.

Thanks,
Chris

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


More information about the Qbs mailing list