From 43da36948bdb0a230823f173d9a3e339e0ce2811 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 6 Oct 2023 13:14:39 -0700 Subject: [PATCH] Add a crate-dep-graph script for showing the crate dependency graph --- script/crate-dep-graph | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 script/crate-dep-graph diff --git a/script/crate-dep-graph b/script/crate-dep-graph new file mode 100755 index 0000000000..25285cc097 --- /dev/null +++ b/script/crate-dep-graph @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +if [[ -x cargo-depgraph ]]; then + cargo install cargo-depgraph +fi + +graph_file=target/crate-graph.html + +cargo depgraph \ + --workspace-only \ + --offline \ + --root=zed,cli,collab \ + --dedup-transitive-deps \ + | dot -Tsvg > $graph_file + +echo "open $graph_file" +open $graph_file