From 2e7d6525fcb82302271f885a7a6526f0727a5643 Mon Sep 17 00:00:00 2001 From: Daniel Noland Date: Thu, 31 Jul 2025 20:18:08 -0600 Subject: [PATCH 1/2] feat: auto generate dependency graph A dependency graph (e.g. the one on our README.md) is great, but it is quite easy for it to get out of date. The just recipe provided in this commit generates the depgraph automatically and can be re-run at any time. Signed-off-by: Daniel Noland --- justfile | 8 + workspace-deps.svg | 402 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 410 insertions(+) create mode 100644 workspace-deps.svg diff --git a/justfile b/justfile index ee68a48ef..8ac29140c 100644 --- a/justfile +++ b/justfile @@ -505,3 +505,11 @@ coverage *args: \ (cargo "llvm-cov" "report" "--html" "--output-dir=./target/nextest/coverage" "--profile=fuzz") \ (cargo "llvm-cov" "report" "--json" "--output-path=./target/nextest/coverage/report.json" "--profile=fuzz") \ (cargo "llvm-cov" "report" "--codecov" "--output-path=./target/nextest/coverage/codecov.json" "--profile=fuzz") + + +# regenerate the dependency graph for the project +[script] +depgraph: + just cargo depgraph --exclude dataplane-test-utils,dataplane-dpdk-sysroot-helper --workspace-only \ + | sed 's/dataplane-//g' \ + | dot -Grankdir=TD -Gsplines=polyline -Granksep=1.5 -Tsvg > workspace-deps.svg diff --git a/workspace-deps.svg b/workspace-deps.svg new file mode 100644 index 000000000..c538ad407 --- /dev/null +++ b/workspace-deps.svg @@ -0,0 +1,402 @@ + + + + + + + + + +0 + +cli + + + +1 + +config + + + +2 + +lpm + + + +1->2 + + + + + +3 + +net + + + +1->3 + + + + + +4 + +pipeline + + + +4->3 + + + + + +5 + +id + + + +4->5 + + + + + +6 + +dataplane + + + +6->3 + + + + + +6->4 + + + + + +6->5 + + + + + +7 + +dpdk + + + +6->7 + + + + + +10 + +mgmt + + + +6->10 + + + + + +13 + +nat + + + +6->13 + + + + + +14 + +routing + + + +6->14 + + + + + +15 + +pkt-meta + + + +6->15 + + + + + +16 + +stats + + + +6->16 + + + + + +17 + +vpcmap + + + +6->17 + + + + + +7->3 + + + + + +8 + +dpdk-sys + + + +7->8 + + + + + +9 + +errno + + + +7->9 + + + + + +10->1 + + + + + +10->2 + + + + + +10->3 + + + + + +10->5 + + + + + +11 + +interface-manager + + + +10->11 + + + + + +12 + +rekon + + + +10->12 + + + + + +10->13 + + + + + +10->14 + + + + + +10->15 + + + + + +10->16 + + + + + +10->17 + + + + + +11->3 + + + + + +11->12 + + + + + +13->1 + + + + + +13->2 + + + + + +13->3 + + + + + +13->4 + + + + + +13->14 + + + + + +14->0 + + + + + +14->1 + + + + + +14->2 + + + + + +14->3 + + + + + +15->1 + + + + + +15->2 + + + + + +15->3 + + + + + +15->4 + + + + + +16->3 + + + + + +16->4 + + + + + +16->17 + + + + + +17->3 + + + + + From 675ea8e7d568b01092872f1eeb44aa2075916c94 Mon Sep 17 00:00:00 2001 From: Daniel Noland Date: Thu, 31 Jul 2025 20:24:14 -0600 Subject: [PATCH 2/2] fix: add full workspace dep graph This is straightforward to generate and is useful to understand the full layout of the repository. Hopefully, it helps us keep our documentation up to date. Signed-off-by: Daniel Noland --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 848686b40..ef0a29ca9 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,19 @@ depend on `mgmt`. │ │ └───────────────────────────┘ ``` - + +>[!NOTE] +> This graph is incomplete. It simply illustrates the tier concept. + +
+ +![depgraph](./workspace-deps.svg) + +
+Full workspace dependency graph. Note that tier-1 packages (like net) never depend on tier-2 packages (like nat). +
+ +