Second thing, slightly related. The typealias logi...
# kotlin-inject
p
Second thing, slightly related. The typealias logic is also confusing everyone. Also it seems that it’s abusing language features: https://kotlinlang.org/docs/type-aliases.html
Type aliases do not introduce new types. They are equivalent to the corresponding underlying types.
I think a dedicated Qualifier annotation would make things simpler to everyone.
e
That hurts I was particularly proud of those features 😉. But on a more serious note can you comment on issues about this with a detailed description about what issues/confusion you are running into? I'd like to better understand where the roadblocks are and if it's more than just "It's different than how dagger does it". Making assisted explicit has an issue here https://github.com/evant/kotlin-inject/issues/164, you can open a new one for the typealias thing.
Also, if you really want qualifiers, it technically supports them if you use
me.tatarka.inject.enableJavaxAnnotations=true
and create a
javax.inject.Qualifier
annotation. Kinda a hack but just letting you know.
p
Sorry for causing you pain 😉 Yes they are super smart and personally now that I have understood the concepts I can make use of them. I’ll add feedback to the ticket.
Kinda a hack but just letting you know.
You mean creating an expect annotation one in commonMain and actual typaliasing in the sourcesets? 🤯 😄
e
you could probably get away with just creating it in commonMain, unless you are pulling in something that depends on
javax.inject
then yeah expect/actual.
p
On Android that’s on the classpath
e
yeah fair
p
Btw I found a way to marry kotlin-inject with dagger 😁
e
interesting, maybe worth a blog post haha
p
Yes absolutely ^^
It generates a 666 LOC dagger module ^^