evant / kotlin-inject

Dependency injection lib for kotlin
Apache License 2.0
1.29k stars 60 forks source link

Checking for cyclic dependencies #421

Open Monabr opened 3 months ago

Monabr commented 3 months ago

Hi. I am trying to setup graph and I notice that I can not start my app.

It compiles but fails to start at the device.

In logs I see cyclic error stack. I do not understand what is wrong.

So the question is: does this library have cyclic dependency check? If not - it is worth to add it.

It should not be compiled if graph have cyclic dependencies. The app should have runtime safety!

evant commented 3 months ago

It does have a cycle check but it really needs to be re-written. If you can post some sample code that causes this issue (and the generated code or a stacktrace if possible) that would be helpful!