ddeps 1.2.0
Source review support tool.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
DDeps
Source review support tool
A tool to create a module dependency graph for the D language. The feature is that you can record snapshots in two versions and compare them to visualize the differences.
Screenshot (Example)
basic
no core, no std
exclude rx.subject
Requirements
- dub
- Graphviz (for DOT/SVG output)
- Mermaid-capable viewer/editor (only when using
--format=mermaid)
Settings
For library (example)
"configurations": [
{
"name": "default"
},
{
"name": "diff",
"postGenerateCommands": [
"dub build -c makedeps",
"dub fetch ddeps",
"dub run ddeps -- --focus=rx -o deps.dot",
"dot -Tsvg -odeps.svg deps.dot"
]
},
{
"name": "diff-update",
"postGenerateCommands": [
"dub fetch ddeps",
"dub run ddeps -- --update"
]
},
{
"name": "makedeps",
"dflags": ["-deps=deps.txt"]
}
]
For executable
"configurations": [
{
"name": "default"
},
{
"name": "diff",
"postGenerateCommands": [
"dub build -c makedeps",
"dub fetch ddeps",
"dub run ddeps -- -o deps.dot",
"dot -Tsvg -odeps.svg deps.dot"
]
},
{
"name": "diff-update",
"postGenerateCommands": [
"dub fetch ddeps",
"dub run ddeps -- --update"
]
},
{
"name": "makedeps",
"dflags": ["-deps=deps.txt"]
}
]
For Mermaid output (example)
Use the same configurations but swap the post command to emit Mermaid instead of DOT/SVG:
{
"name": "diff-mermaid",
"postGenerateCommands": [
"dub build -c makedeps",
"dub fetch ddeps",
"dub run ddeps -- --format=mermaid --output=deps.mmd"
]
}
Usage
At first
create lock file
dub build -c makedeps
dub build -c diff-update
Basic
- Modify source
- Update diff
dub build -c diff
- Do review with the dependency graph diff
- Open the
deps.svgin browser, or generate Mermaid withdub run ddeps -- --format=mermaid --output=deps.mmdand view it in a Mermaid-enabled editor.
- Open the
Compare 2 versions
- checkout a target version
git reset --hard XXXorgit checkout XXXXX
- reset to source version
git reset --hard HEAD~10(e.g. 10 versions ago)
- create
deps-lock.txtdub build -c makedepsdub build -c diff-update- if
dub.json/dub.sdlhas not configure then add these.
- reset to target version
git reset --hard ORIG_HEAD
- make diff
dub build -c diff
- open
deps.svg(or produce Mermaid:dub run ddeps -- --format=mermaid --output=deps.mmd)
Arguments
| name | Usage | description | default |
|:-----|:------------|:--|:--|
| input | -i XXX or --input=XXX | deps file name | deps.txt |
| output | -o XXX or --output=XXX | destination file name | write to stdout |
| update | -u or --update | update lock file | false |
| lock | -l XXX or --lock=XXX | lock file name | deps-lock.txt |
| focus | -f XXX or --focus=XXX | filtering target by name | app |
| depth | -d N or --depth=N | search depth | 1 |
| exclude | -e XXX [-e YYY] or --exclude=XXX [--exclude=YYY] | exclude module names | object |
| format | --format=dot|mermaid | output format | dot |
| help | --help | show help | |
Mermaid output
You can render the diff as a Mermaid graph (useful in Markdown viewers that support Mermaid):
dub run ddeps -- --format=mermaid --output=deps.mmd
Open deps.mmd in a Mermaid-capable viewer/editor to inspect the graph. Added nodes/edges are green, removed are red, kept are neutral. Graphviz is not required for Mermaid output.
- 1.2.0 released 2 months ago
- lempiji/ddeps
- MIT
- Authors:
- Dependencies:
- none
- Versions:
-
Show all 8 versions1.3.0 2026-Feb-07 1.2.0 2026-Jan-31 1.1.1 2019-Apr-27 1.1.0 2019-Apr-27 1.0.1 2019-Apr-27 - Download Stats:
-
-
0 downloads today
-
2 downloads this week
-
7 downloads this month
-
84 downloads total
-
- Score:
- 1.6
- Short URL:
- ddeps.dub.pm