depend ~devel
Dependency Tool for D
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:
Dependency Tool for D
The depend
tool helps to visualize import dependencies.
Moreover, it allows to check them against a UML model of target dependencies.
Example
Using the depend
tool on the code of the popular vibe.d repository gives an overview of the package dependencies:
package diagram
Usage
Use dub
to build the depend
tool:
dub build --build=release
Run the depend
tool like you run dmd
(most arguments are just passed to dmd
).
For example, run the depend
tool on its own code:
depend src/*.d
Consider switching to module dependencies instead of package dependencies:
depend --detail src/*.d
The output is a package diagram in the PlantUML language:
@startuml
package deps {}
package graph {}
package main {}
package uml {}
main ..> deps
main ..> uml
uml ..> graph
@enduml
Copy and paste the output to the PlantUML server for visualization:
For checking, specify the target dependencies in the PlantUML language.
For example, create a text file target.uml
.
Use the depend
tool to check the import dependencies against the target dependencies:
depend --detail src/*.d --check target.uml
Then, the check will complain about violations:
error: unintended dependency main -> deps
error: unintended dependency main -> graph
error: unintended dependency main -> uml
error: unintended dependency uml -> graph
You will also get warnings about cyclic dependencies.
Alternatively, run dmd
up front and pass the extracted dependencies explicitly:
dmd -deps=dependencies ...
depend --deps dependencies
- Registered by Mario Kröplin
- ~devel released 6 years ago
- funkwerk-mobility/depend
- BSL-1.0
- Copyright © 2018, Mario Kröplin
- Authors:
- Dependencies:
- none
- Versions:
-
0.4.0 2021-Jan-05 0.3.1 2019-Aug-19 0.3.0 2019-Aug-18 0.2.0 2018-Jul-06 0.1.0 2018-Jun-03 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
191 downloads total
-
- Score:
- 0.9
- Short URL:
- depend.dub.pm