KatachiKonsistScopeIncompleteException

Konsist did not hand back every file katachi asked it to parse.

The scope is built by parsing an exact set of absolute file paths, one by one. If a file is gone by the time it is parsed, or Konsist reports it under a path that does not compare equal — a separator, a symlink, a case difference — it drops out of the scope, the block sees fewer declarations than it should, and the constraint passes for the wrong reason. Counting is what makes that loud instead of silent.

This is katachi's bug, not the caller's. Nothing a definition can say causes it, which is why the base is KatachiInternalException and why the message asks for a report.

Example 1: recognise it as a katachi bug rather than a failed rule

val failure = shouldThrow<KatachiArchitectureAssertionError> {
projectArchitecture.assert(FileConstraintCheck())
}
failure.violations.filterIsInstance<UncheckedFileConstraint>()
.single().cause.shouldBeInstanceOf<KatachiKonsistScopeIncompleteException>()

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
val given: Int

How many files katachi asked Konsist for.

Link copied to clipboard
open val message: String?
Link copied to clipboard

How many of them came back in the scope.