-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
8,952 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.dub | ||
docs.json | ||
__dummy.html | ||
docs/ | ||
/graphviz | ||
graphviz.so | ||
graphviz.dylib | ||
graphviz.dll | ||
graphviz.a | ||
graphviz.lib | ||
graphviz-test-* | ||
*.exe | ||
*.o | ||
*.obj | ||
*.lst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# DDeps | ||
|
||
Source review support tool. | ||
|
||
A tool for creating module dependency graphs. And visualize the differences between the two snapshots. | ||
|
||
# Screenshot (Example) | ||
![rx](https://github.com/lempiji/ddeps/blob/master/rx-deps.png) | ||
|
||
# Requirements | ||
1. dub | ||
2. Graphviz (for visualize) | ||
|
||
# Settings | ||
|
||
## For library (example) | ||
```json | ||
"configurations": [ | ||
{ | ||
"name": "default" | ||
}, | ||
{ | ||
"name": "diff", | ||
"postGenerateCommands": [ | ||
"dub build -c makedeps", | ||
"ddeps --focus=rx --out=deps.dot", | ||
"dot -Tsvg -odeps.svg deps.dot" | ||
] | ||
}, | ||
{ | ||
"name": "diff-update", | ||
"postGenerateCommands": [ | ||
"ddeps --focus=rx --update" | ||
] | ||
}, | ||
{ | ||
"name": "makedeps", | ||
"dflags": ["-deps=deps.txt"] | ||
} | ||
] | ||
``` | ||
|
||
## For executable | ||
```json | ||
"configurations": [ | ||
{ | ||
"name": "default" | ||
}, | ||
{ | ||
"name": "diff", | ||
"postGenerateCommands": [ | ||
"dub build -c makedeps", | ||
"ddeps --out=deps.dot", | ||
"dot -Tsvg -odeps.svg deps.dot" | ||
] | ||
}, | ||
{ | ||
"name": "diff-update", | ||
"postGenerateCommands": [ | ||
"ddeps --update" | ||
] | ||
}, | ||
{ | ||
"name": "makedeps", | ||
"dflags": ["-deps=deps.txt"] | ||
} | ||
] | ||
``` | ||
|
||
# Usage | ||
|
||
## At first | ||
create lock file | ||
|
||
```bash | ||
dub build -c makedeps | ||
dub build -c diff-update | ||
``` | ||
|
||
## Basic | ||
1. Modify source | ||
2. Update diff | ||
- `dub build -c diff` | ||
3. Do review with the dependency graph diff | ||
- Open the `deps.svg` in browser | ||
|
||
## Compare 2 versions | ||
|
||
1. checkout a target version | ||
- `git reset --hard XXX` or `git checkout XXXXX` | ||
2. reset to source version | ||
- `git reset --hard HEAD~10` (e.g. 10 versions ago) | ||
3. create `deps-lock.txt` | ||
- `dub build -c makedeps` | ||
- `dub build -c diff-update` | ||
- if `dub.json` / `dub.sdl` has not configure then add these. | ||
4. reset to target version | ||
- `git reset --hard ORIG_HEAD` | ||
5. make diff | ||
- `dub build -c diff` | ||
6. open `deps.svg` | ||
|
||
|
||
# Arguments | ||
|
||
| name | Usage | description | default | | ||
|:-----|:------------|:--|:--| | ||
| input | `-i` or `--input` | 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` or `--lock` | lock file name | `deps-lock.txt` | | ||
| focus | `--focus=XXX` | filtering target by name | `app` | | ||
| depth | `-d` or `--depth` | update lock file | false | | ||
| help | `--help` | show help | | |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
digraph { | ||
{ | ||
"app" | ||
"core.bitop" | ||
"core.checkedint" | ||
"core.exception" | ||
"core.internal.traits" | ||
"core.memory" | ||
"core.stdc.string" | ||
"std.algorithm" | ||
"std.algorithm.comparison" | ||
"std.algorithm.iteration" | ||
"std.algorithm.mutation" | ||
"std.algorithm.searching" | ||
"std.array" | ||
"std.ascii" | ||
"std.container.rbtree" | ||
"std.conv" | ||
"std.encoding" | ||
"std.exception" | ||
"std.file" | ||
"std.format" | ||
"std.functional" | ||
"std.getopt" | ||
"std.internal.memory" | ||
"std.internal.unicode_tables" | ||
"std.meta" | ||
"std.range" | ||
"std.range.primitives" | ||
"std.stdio" | ||
"std.system" | ||
"std.traits" | ||
"std.typecons" | ||
"std.uni" | ||
"std.utf" | ||
} | ||
"app" -> "core.bitop"; | ||
"app" -> "core.checkedint"; | ||
"app" -> "core.exception"; | ||
"app" -> "core.internal.traits"; | ||
"app" -> "core.memory"; | ||
"app" -> "core.stdc.string"; | ||
"app" -> "std.algorithm"; | ||
"app" -> "std.algorithm.comparison"; | ||
"app" -> "std.algorithm.iteration"; | ||
"app" -> "std.algorithm.mutation"; | ||
"app" -> "std.algorithm.searching"; | ||
"app" -> "std.array"; | ||
"app" -> "std.ascii"; | ||
"app" -> "std.container.rbtree"; | ||
"app" -> "std.conv"; | ||
"app" -> "std.encoding"; | ||
"app" -> "std.exception"; | ||
"app" -> "std.file"; | ||
"app" -> "std.format"; | ||
"app" -> "std.functional"; | ||
"app" -> "std.getopt"; | ||
"app" -> "std.internal.memory"; | ||
"app" -> "std.internal.unicode_tables"; | ||
"app" -> "std.meta"; | ||
"app" -> "std.range"; | ||
"app" -> "std.range.primitives"; | ||
"app" -> "std.stdio"; | ||
"app" -> "std.system"; | ||
"app" -> "std.traits"; | ||
"app" -> "std.typecons"; | ||
"app" -> "std.uni"; | ||
"app" -> "std.utf"; | ||
} |
Oops, something went wrong.