Skip to content

cyclic dependency rule incorrect #55

@hohwille

Description

@hohwille
Error:  Failures: 
Error:    Architecture Violation [Priority: HIGH] - Rule 'slices matching '..(*).(common|dataaccess|service|batch|logic|client)..' should be free of cycles, because cyclic dependencies should be prevented.' was violated (1 times):
Cycle detected: violation slice -> 
                violation slice
  1. Dependencies of violation slice
    - Class <com.devonfw.sample.archunit.violation.common.ViolationRepository> has generic interface <org.springframework.data.jpa.repository.JpaRepository<com.devonfw.sample.archunit.violation.dataaccess.ViolationEntity, java.lang.Long>> with type argument depending on <com.devonfw.sample.archunit.violation.dataaccess.ViolationEntity> in (ViolationRepository.java:0)
    - Class <com.devonfw.sample.archunit.violation.common.WrongNameRepository> has generic interface <org.springframework.data.jpa.repository.JpaRepository<com.devonfw.sample.archunit.violation.dataaccess.ViolationEntity, java.lang.Long>> with type argument depending on <com.devonfw.sample.archunit.violation.dataaccess.ViolationEntity> in (WrongNameRepository.java:0)

A component A may always depend on itself (A -> A). Therefore the cyclic dependency check is incorrect and has to be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions