Closed s0nicyouth closed 1 year ago
I've tested your branch with this project: https://github.com/cyc1ingsir/kmapper-examples and this mapper defintion: https://github.com/cyc1ingsir/kmapper-examples/blob/main/src/main/kotlin/com/syouth/kmapper/testload/mappers/recursiveTest/RecursiveTestMapper.kt#L27-L32
This now produces a readable error message:
./gradlew build
> Task :kspKotlin FAILED
e: [ksp] java.lang.IllegalStateException: Cyclic definition found: RecDtoPartB->List<AtoBRelationDto>->AtoBRelationDto->RecDtoPartA->List<AtoBRelationDto>
at com.syouth.kmapper.processor.strategies.CheckCycleStrategy.invoke(CheckCycleStrategy.kt:11
:+1:
@cyc1ingsir The PR adds cycle detection to the mapper. Could you please take a look at it and possibly test if it fits your needs.