SnapshotAnalyzer
Records an architecture as a committable snapshot, and compares two of them.
A branch can change the dependency graph without that being visible in the diff. Committing a snapshot and comparing against it makes the change reviewable - "this pull request adds a dependency from the domain layer to the UI layer" becomes a line in the review.
The snapshot is small and sorted so it diffs line by line, and both functions are pure: the same graph always produces the same file, and the same pair always produces the same report.
Functions
Link copied to clipboard
fun capture(graph: ModuleDependencyGraph, layers: List<LayerSpec> = emptyList(), aalekhVersion: String = ""): ArchitectureSnapshot
Records graph as a snapshot.
Link copied to clipboard
Compares a recorded snapshot with the current one.