Hello! I created two issues with some proposals to...
# koin-contributors
a
Hello! I created two issues with some proposals to Koin. Can you provide some feedback, please. Issue one and issue two.
a
yes, can be good to make
bind
DSL stronger 👍
a
Making
bind
overload with
KClass
parameter type safe is not backward-compatible, so it can be done in 3.x release
But
bind
overload without
KClass
parameter can't be made type-safe without extra verbocity in its usage 😟
👍 1
a
let’s check that
a
After some investigation I found, that checking
KClass
of
BeanDefinition
can be done to ensure type safety, but kotlin's reflection is not available in
commonMain
module.
a
yeah, I would avoid kotlin-reflection in main
👍 1
a
I created MR to make all other
bind
methods safe. IMHO,
bind
without params may be deprecated, until checking supertype of
KClass
will be available without reflection
a
yep, thanks
a
I have added type check for
BeanDefinition.secondaryTypes
in
checkModules
, so types of
bind
without params now may be checked at compile time by
CheckModulesTest
.
a
checkModules is not covering enough. I believe the key will be around plugin compiler analysis
👍 1
a
yes, but such
checkModules
is useful now, when plugin compiler is not available yet
a
for now yes
f
@Alexander Zhdanov hey, I just had a look at your
@inject
ticket. I've been keen on having that too. I'm thirsty to use ksp (as in #ksp channel) to enhance
checkModules
first though, through code generation. I see them as related because one of the ways to do @inject would be generate the graph and code at compile time. Not a small change though.
a
let’s open a thread on #koin-dev 👍 would be great to start this topic