chore(scripts): cratemap.go should distinguish dev-dependencies from runtime deps #120
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Low (internal tooling)
Problem
scripts/cratemap.goreports[dev-dependencies]as ordinary local deps. Today it prints:which reads as a layering violation (data layer → Axum server crate). In reality
solitaire_server+axumare dev-only deps used bysolitaire_data/tests/sync_round_trip.rsto spin up the test router — the runtime dependency graph is clean.Since
cratemapexists precisely to audit crate boundaries, a false positive here is the worst failure mode: every future review trips over it.Suggested fix
Parse the section headers in
Cargo.toml([dependencies]vs[dev-dependencies]vs[target.'cfg(...)'.dependencies]) and either:local deps: solitaire_core, solitaire_sync (dev: solitaire_server), or-devflag.Found during scripted repo review, 2026-07-06 — cost real time chasing a phantom architecture violation.
Fixed in the local script (not committed — scripts/*.go are deliberately gitignored as local inspection tooling, see .gitignore:43, so there is no PR for this). cratemap now buckets [dev-dependencies]/[build-dependencies] into a separate
dev depsline, with duplicates collapsing onto the runtime line. The runtime graph now correctly shows solitaire_data -> {solitaire_core, solitaire_sync} with solitaire_server as dev-only.