Commit graph

11 commits

Author SHA1 Message Date
Ole-Morten Duesund
baba4e0205 tests: pin override and MISSING tag colours in the text tree
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
2026-08-25 16:06:54 +02:00
Ole-Morten Duesund
f018b4c8aa conandeps: colour tree tags in HTML and text
The tree builder now emits typed tags (path, override, missing, ...) and
both renderers colour by kind: <span class> in the HTML <pre> block, ANSI
in the terminal (path dim, override yellow, missing red). Previously the
HTML tree was one escaped string and only MISSING was coloured in text.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
2026-08-25 15:49:59 +02:00
Ole-Morten Duesund
a99ccd5de8 tests: pin that the HTML tree carries branch paths like the text tree
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
2026-08-25 15:48:22 +02:00
Ole-Morten Duesund
a7db279fb0 conandeps: spell out each branch's path on indirect nodes in the tree
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
2026-08-25 15:45:48 +02:00
Ole-Morten Duesund
4b084f8bae conandeps: list every parent path in the via column
A package required by several others now gets one line per direct parent
(shortest path to that parent, shortest first) instead of a "(+N)" count.
The text table helper supports multi-line cells; HTML uses <br>.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
2026-08-25 15:42:22 +02:00
Ole-Morten Duesund
4399d90925 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
2026-08-25 15:39:03 +02:00
Ole-Morten Duesund
b3b6fc89a3 conandeps: dedicated "level" column for the level of indirection
Show the hop count from the consumer as its own numeric column in both the
text and the HTML dependency table instead of folding it into the kind
cell as "indirect (N)".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
2026-08-25 15:31:30 +02:00
Ole-Morten Duesund
d44abc43ef conandeps: sort dependencies by level of indirection
Record each package's shortest distance from the consumer while collecting
the graph (1 = direct) and order the dependency table direct-first, then by
increasing depth, alphabetically within a level; the kind column now reads
"indirect (N)". Fixture gains a depth-3 package (libdeep under libbar) and
a test pins the ordering.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
2026-08-25 15:29:46 +02:00
Ole-Morten Duesund
857500f20e conandeps: render missing binaries and overrides as colour-coded tables
All three sections (dependencies, missing binaries, overrides) now use the
same column-aligned table layout in both the text and the HTML report. The
text report gets ANSI colour on a terminal (green remote, red missing,
yellow cache-only/overridden) via --color auto|always|never, honouring
NO_COLOR; the table helper aligns on visible width so colour codes never
break columns. Every state is still spelled out in words so nothing is
conveyed by colour alone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
2026-08-25 15:19:22 +02:00
Ole-Morten Duesund
1724cb2637 conandeps: always show the binary's source; cache-only binaries are not available
The tool's question is "does the remote have this binary?", so local cache
state must not mask the answer. Conan reports Cache for a locally present
binary without consulting the remote; for those nodes we now run a package
search on the remote(s) and only count the binary as available if the same
package_id is found there. Binaries that exist only in the local cache are
rendered as "not available", listed under missing binaries with a note, and
make the exit status 1.

Every available cell now names the remote that has the binary instead of a
bare "ok". Adds a test that builds a package locally without uploading it
and checks it is reported as cache-only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
2026-08-25 15:14:54 +02:00
Ole-Morten Duesund
a11e9fb34e Add conandeps: dependency, binary-availability and override report for Conan 1.66
conandeps.py lists direct and indirect dependencies of a conanfile.py,
checks whether Release/Debug/RelWithDebInfo binaries exist on a remote for
the exact profile, and reports explicit (override=True) and implicit
requirement overrides both as a list and on the edges of the dependency
tree. Text output by default, optional self-contained HTML via --html.

The graph is built once per build type through Conan's own info API and
each node's binary status is read back, so package_id modes and options
are honoured like a real install. Overrides are parsed from Conan's WARN
output since 1.x does not record them on the graph.

Development runs inside a pinned podman container (Containerfile, dev.sh)
with Conan 1.66 on Python 3.11. Tests start a throw-away conan_server and
verify missing-binary and override detection end to end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYNdaGDrpaqDyT8QtrTQbM
2026-08-25 14:48:28 +02:00