depend 0.0.1

Dependency Tool for D


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Dependency Tool for D

This tool checks actual import dependencies against a UML model of target dependencies.

Usage

Run dmd with the switch --deps to extract the actual dependencies. For example:

dmd -deps=dependencies -c src/depend.d -of/dev/null

Use the depend tool together with the Graphviz programs for a visualization of the module dependencies:

src/depend.d --dot dependencies | dot -Tsvg -odependencies.svg

For best results, remove the transitive dependencies:

src/depend.d --dot dependencies | tred | dot -Tsvg -odependencies.svg

Consider switching to package dependencies instead of module dependencies:

src/depend.d --packages --dot dependencies | tred | dot -Tsvg -odependencies.svg

Or filter dependencies of source files matching a regular expression:

src/depend.d --filter 'src|test' --dot dependencies | tred | dot -Tsvg -odependencies.svg

Then, specify the target dependencies as a PlantUML model. For example, create a text file model.uml:

package model {}
package view {}
package controller {}

controller ..> view
controller ..> model
view .> model

Finally, use the depend tool for checking actual dependencies against the target dependencies:

src/depend.d --target model.uml dependencies

The tool complains about violations:

error: unintended dependency model -> controller
Authors:
Mario Kröplin
Dependencies:
none
Versions:
0.0.1 2015-Apr-30
~master 2017-Aug-16
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 123 downloads total