PoisonedYouth
09/21/2023, 7:09 AMKonsist.scopeFromProduction()
.assertArchitecture {
val domain = Layer("domain", "com.poisonedyouth.example.domain..")
val adapter = Layer("adapter", "com.poisonedyouth.example.adapter..")
val port = Layer("port", "com.poisonedyouth.example.port..")
val common = Layer("common", "com.poisonedyouth.example.common..")
port.dependsOn(domain)
adapter.dependsOn(port)
adapter.dependsOn(common)
domain.dependsOnNothing()
}
The result when running the test:
java.util.NoSuchElementException: List is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.last(_Collections.kt:418)
at com.lemonappdev.konsist.core.architecture.DependencyRulesCore.checkCircularDependenciesHelper(DependencyRulesCore.kt:126)
at com.lemonappdev.konsist.core.architecture.DependencyRulesCore.checkCircularDependencies(DependencyRulesCore.kt:79)
at com.lemonappdev.konsist.core.architecture.DependencyRulesCore.dependsOn(DependencyRulesCore.kt:17)
I think a more clear exception message will help for searching for the problem.adapter.dependsOn(port)
adapter.dependsOn(common)
this does not work. Using the below is working as expected:
adapter.dependsOn(common, port)
igor.wojda
09/21/2023, 7:40 PMPoisonedYouth
09/22/2023, 6:13 AMigor.wojda
09/22/2023, 11:59 AMPoisonedYouth
09/22/2023, 2:02 PMigor.wojda
09/22/2023, 9:02 PMv0.12.2
https://github.com/LemonAppDev/konsist/releases/tag/v0.12.2PoisonedYouth
09/25/2023, 2:57 PM