Koin Annotations is available: <https://medium.com...
# koin
a
😍 3
👍 3
k
out of curiosity, why @Single instead of the more common @ Singleton annotation? Rest looks great...less boilerplate w/ minimal build speed hit 🙂
a
you have the
@Singleton
available. It’s just to keep the same “semantic”
👍 2
r
Just tried this out. @arnaud.giuliani great stuff!
Improving Developer Experience 👍
One capacity that opens this annotations approach, is the possibility to analyze everything at compilation and prepare more content for you
Do you have an issue/plan/roadmap for the above?
I suspect the dynamic structure of
startKoin{ }
has to be changed, but theoretically having something like
Copy code
@KoinStarter(includes = myModules)
fun initKoin()
could work? Where the compiler just checks that the
myModules
graph is complete? (all dependencies have bean definitions) Though probably having arguments/lambdas complicates maintaining the nice modular structure of Koin, possible solutions: • Keep verification at the end consumer (
base/app
module, like Dagger 😕 ) • Have something like
@Transient
where these dependencies could be ignored? Maybe having a thread for a possible API design would be nice
a
apart of having deep static analysis, even dagger won’t be able to see dynamic modules loading behavior
but yes, first approach would be to help flag all graph from annotated classes
👍 1
with the “includes” features, we can follow links to other modules then