diff --git a/scripts/graph.sh b/scripts/graph.sh index a3f94344c66..25a296b40c0 100755 --- a/scripts/graph.sh +++ b/scripts/graph.sh @@ -1,5 +1,9 @@ #!/bin/bash # Generates visualizations of the internal package dependency graph. +# Also generates visualizations of the transitive reduction (tred) of +# that graph, which is the minimal graph with the same *transitive* +# dependencies. Much more legible by itelf. Seeing the two side by side +# often helps to understand the full picture. set -ueo pipefail DIR=$(dirname -- "${BASH_SOURCE[0]}") { @@ -25,6 +29,10 @@ dot -Tpng < packages-graph.dot > "$DIR"/../packages-graph.png dot -Tsvg < packages-graph.dot > "$DIR"/../packages-graph.svg +tred < packages-graph.dot > packages-graph-tred.dot +dot -Tpng < packages-graph-tred.dot > "$DIR"/../packages-graph-tred.png +dot -Tsvg < packages-graph-tred.dot > "$DIR"/../packages-graph-tred.svg + if acyclic packages-graph.dot | dot -Tcanon > packages-graph-sans-cycles.dot; then echo 1>&2 "No cycles in 'dependencies' of packages." else