Commit graph

2 commits

Author SHA1 Message Date
zefr0x
c96de69e80
Use ruff to enforce python code formatting (#37117)
Requires servo/servo#37045 for deps and config.

Testing: No need for tests to test tests.
Fixes: servo/servo#37041

---------

Signed-off-by: zefr0x <zer0-x.7ty50@aleeas.com>
2025-05-26 11:54:43 +00:00
Simon Sapin
d2041e5b47 Add a minimal alternative to cargo graph
I tried `cargo graph` and some of its successors,
but didn’t manage to make them produce what I wanted
(or in some cases make them work at all.)

This Python script reimplements similar functionality
based on parsing the (JSON) output of `cargo metadata`.

Graphviz graphs can become hard to read very quickly as the number of nodes grows.
Servo’s dependency graph is very large, so pruning as much as possible is important.
This only shows `path` dependencies (that have their source in this repo),
and can take a parameter to only show recursive dependencies of a given crate.

See https://github.com/servo/servo/issues/19422#issuecomment-617038366 for an example.

I find that `xdot` is best for visualization since it is interactive.

This script is not used by anything.
I am making this PR only so that we have it somewhere
in case it becomes useful again at some point.
2020-04-21 10:54:21 +02:00