I was wondering if anybody has some ideas/feedback...
# koin-contributors
w
I was wondering if anybody has some ideas/feedbacks regarding this. In our project we use the described code on top of Koin for more safety.
a
@tynn has also speak about that
avoid avoid having String/Typed Qualifier
but you can write TypeQualifiers with KClasses directly
w
Ok but in general I think it would be a good direction to make the API a little bit less loosely coupled, wouldn’t it? Right now it relies a lot on (late) RuntimeExceptions. The idea is that you use constants and safe types to ensure that the dependencies you receive at runtime are the same you designated at compile time and ensure that Koin fails at startup immediately if you did some configuration in the wrong way. It’s still not compile-time safety, but almost the same because assuming you run your application at least once you will find any configuration errors.
t
To achieve the same, it might be sufficient to just test the graph with
checkModules
.
👍 1