DevSnicket Eunice is based on the premise that unidirectional dependencies can be beneficial to structure and modularity in software. Euince's approach isn't limited to direct dependencies, but includes indirect dependencies as well.
Fundamental to Eunince is the act of defining stacks. When its indended that an item is to be dependent upon another item, the first item is placed above the second item in a stack. When items are indended to be independent of each other they can be placed at the same level in a stack.
In some programming languages there are implied stacks, such as the order of functions in a file or the order of files in a project.
The approach of defining stacks can be applied at all scales of software and across boundaries, from individual files, functions or classes, to multiple, large codebases in different languages, frameworks and runtimes.
Eunice includes the stages shown below. Transitions are made between the stages using YAML. An explanation of the YAML and stages follows.
What's supported in the YAML is specified here.
Analyzers are implemented to create the YAML files (e.g. from source code in a specific language, or using a specific framework).
- create or add to stacks
- concatenate multiple sources of analysis from the file system*
- group items by their identifier
- order items by
- remove redundant prefix of parent identifier and separator
- remove self dependent items of a type
- replace identifiers using a regular expression
- sets the type of root items
- unstack independent items
(* not available in test harnesses)
To visualise and explorer what's in the YAML files, and to statistically measure how well they match the intended structure, a SVG renderer has been implemented. The renderer doesn't use lines between items to show dependencies and instead marks items with counts for each dependency type:
- matches stack (green down arrow)
- does not match stack (red up arrow)
- is not independent (red horizontal arrow).
Dependency counts appear for both sides of the dependency, the dependent item and the item depended upon. When there are multiple counts a summary of all counts is rendered at the bottom. .
Dependencies within an item are also summarised and rendered inside the item box, below the identifer text.
Items and sub-item can also be opened by clicking/tapping on their box. Opening an item will show its contents and breadcrumb links for where it is in the hierarchy.
root > grandparent
Supporting DevSnicket packages