conandeps: replace kind/level columns with a "via" shortest-path column

Show how each indirect dependency is reached ("libfoo -> libbar") instead
of a bare hop count, "-" for direct dependencies, and "(+N)" when other
packages also require it directly. Rows sort direct-first then by path so
a branch's transitive dependencies stay together.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
This commit is contained in:
Ole-Morten Duesund 2026-08-25 15:39:03 +02:00
commit 4399d90925
4 changed files with 83 additions and 48 deletions

View file

@ -92,12 +92,12 @@ profile: arch=x86_64, compiler=gcc, compiler.libcxx=libstdc++11, compiler.versio
Dependencies (4) and binary availability
package kind level ctx Release Debug RelWithDebInfo
-----------------------------------------------------------------
MyDepA/1.0 direct 1 host knor knor knor
MyDepB/1.0 direct 1 host knor knor knor
boost/1.8 indirect 2 host knor knor knor
Zigma/1.0 indirect 2 host knor knor MISSING
package via ctx Release Debug RelWithDebInfo
----------------------------------------------------------------------
MyDepA/1.0 - host knor knor knor
MyDepB/1.0 - host knor knor knor
boost/1.8 MyDepA (+1) host knor knor knor
Zigma/1.0 MyDepB host knor knor MISSING
Missing binaries (1)
@ -127,11 +127,13 @@ environment variable turns that off, and redirecting stdout to a file never
produces colour codes unless you pass `--color always`. The HTML report uses
the same colour coding.
Reading the table: rows are sorted with direct dependencies first
(alphabetically), then indirect ones by increasing level of indirection. The
`level` column is the number of hops from your conanfile: 1 is direct, 2 is
required by a direct dependency, 3 by one of those, and so on (shortest path
counts). The HTML report has the same column.
Reading the table: the `via` column is the shortest path from your conanfile
to the package `-` for a direct dependency, `MyDepB` for something MyDepB
requires, `MyDepB -> Zigma` for something Zigma requires, and so on. `(+N)`
means N other packages also require it directly (boost above is pulled in by
both MyDepA and Zigma); the dependency hierarchy section shows every path.
Rows are sorted direct-first, then by path, so a branch's transitive
dependencies stay together.
* `knor` (a remote name) the remote has a binary for the package_id your