noCycle

fun TegralDiCheckDsl.noCycle()

Checks that no cyclic dependencies are present within the modules.

A cyclic dependency is a scenario where a class Foo depends on itself, either directly (injects itself into itself) or indirectly (For example, Foo depends on Bar, which in turn depends on Foo).

Cyclic dependencies are generally well-supported within Tegral DI as long as injections are not done eagerly (see InjectionEnvironment for more information). However, they are generally symptoms of badly design systems.

Note that this check ignores whether classes are present within a module or not: use the complete check for this.