Re: [PATCH v2 0/7] record and rework component dependencies

Ferruh Yigit
2024-08-02T17:18:41Z

On 8/2/2024 1:44 PM, Bruce Richardson wrote:
> As part of the meson build, we can record the dependencies for each
> component as we process it, logging them to a file. This file can be
> used as input to a number of other scripts and tools, for example, to
> graph the dependencies, or to allow higher-level build-config tools to
> automatically enable component requirements, etc.
>
> The first patch of this set generates the basic dependency tree. The
> second patch does some processing of that dependency tree to identify
> cases where dependencies are being unnecessarily specified. Reducing
> these makes it easier to have readable dependency graphs in future,
> without affecting the build.
>
> The following 4 patches are based on the output of the second patch, and
> greatly cut down the number of direct dependency links between
> components. Even with the cut-down dependencies, the full dependency
> graph is nigh-unreadable, so the final patch adds a new script to
> generate dependency tree subgraphs, creating dot files for e.g. the
> dependencies of a particular component, or a component class such as
> mempool drivers.
>
> Bruce Richardson (7):
> build: output a dependency log in build directory
> devtools: add script to flag unneeded dependencies
> build: remove kvargs from driver class dependencies
> build: reduce library dependencies
> build: reduce driver dependencies
> build: reduce app dependencies
> devtools: add script to generate DPDK dependency graphs
>

Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>

Thanks for the update, output is now easier to consume with the help of
the 'devtools/draw-dependency-graphs.py' script.
A detail but script is not actually drawing graph, but parsing .dot
file, name is a little misleading.

Also for the patches that are converting explicit dependency to implicit
dependency, I can see the benefit for the meson and graph. But also
there is a value of keeping explicit dependency, it was an easy way to
document dependencies of component for developers.
So, I am not really sure which one is better.