I'm trying to do my research in comparing <#C67HDJ...
# koin
a
I'm trying to do my research in comparing #C67HDJZ2N with #C5FT9Q36G, #C0B8ZTWE4 mostly (I've been told about #C0BLU9K96 too) This is for server only usage (which I think cuts out dagger hilt for me) so perhaps my usage is simpler than a lot of what some kotlin DI tools are doing So far, the consensus online is really mixed. However, one of the main sticking points I see debated is that #C67HDJZ2N is not compile time checked, as #C5FT9Q36G is However, I have tried out #C67HDJZ2N in a part of our codebase using the annotations + ksp compiler plugin. Does this not now mean koin can be considered compile time safe for the dependency graph? Or is it still required to check things that #C5FT9Q36G handles automatically In usage though, I do prefer the annotation setup Koin has vs Dagger. So I'd like to use koin if possible..
k
Hi @Adam Jarvis, yes...annotations is bringing the compile time safety aspect to Koin.
a
That’s great, thanks Another common item I’ve seen is that koin isn’t aligned with the Jakarta
@inject
annotations?
k
not sure what you mean by "they are not aligned"
a
@Kibet Theophilus https://javax-inject.github.io/javax-inject/ Basically, posts I’ve read have said apparently not using this means it’s hard to move away from koin in the future I’m coming from having only used spring boot as DI - other than that I’ve always hand wired everything I’m unsure of the pros / cons of following the JSR-330 spec
k
@Adam Jarvis I am not sure about this too, so I can't provide an answer.
a
Perhaps @arnaud.giuliani could answer 🙌
a
Koin Annotations does not support
@Inject
for now. You have more details here about current annotations: https://insert-koin.io/docs/reference/koin-annotations/definitions
a
Is there an accepted plan to allow it to recognize them in the future? I’d be happy to take a look at working on that as a feature for koin
a
You can open a featue request on Koin Annotations Github 👍
a
Yeah 😅 I meant, I’m happy to take a look at contributing and seeing if I could introduce it as a feature However before going down the rabbit hole, I wanted to check if you’d even accept that as a feature — Context: I like koin, and want to use it in my company. However one sticking point that worries some people is that it cannot be used with the
@inject
annotation set
👍 1
a
yeah. I would say that we need to identify what's expected behind
@inject
annotation as standard behavior. But shouldn't be complex to add it to current annotations