Something I’m missing now and have to write on my ...
# kodein
m
Something I’m missing now and have to write on my own. A scoped builder 🙂
Copy code
val kodein = Kodein.scoped(myScope) {
   bind() from singleton { context.createFoo() }
}
If there is already a way that would be great! If you think it’s worth adding I’ll open an issue.
r
If I understand what you are looking for, is a way of scoping everything onto the same scope once?
m
Yes. So I can have my own DSL that just takes
Kodein.ScopedBuilder<T>. () -> Unit
for example. No need for “consumers” to know about how scoping is implemented.
But I’m thinking about eventually wrapping the entire Kodein DSL now anyway 😄
r
Indeed we already had though about it, but didn’t find the time to implement such a thing. PR are welcome anyway 🙂. Otherwise fill-in an issue, and we should jump on it as soon as we are done with hot stuffs …
👍 1
m
Cool! What’s the hot stuff right now? 🙂
r
Moving the whole API… from
Kodein
to
DI
as we will soon have more Kodein libraries, so the class name
Kodein
won’t fit anymore.
m
👌
r
+ rewamping the type management to bring more safety
m
Including using
typeOf()
?
r
+ KMP stuff like a nice API for Swift etc
yep, using
typeOf()
for anything but JVM, as its not fully compatible yet
👍 1
+ that will allow us to deprecate libs like
generic-jvm
/
erased
to the benefit of one unique KMP lib
m
yeah wohoo 🙂 It’s so annoying always having to import both packages
r
7.0
its just around the corner. Unfortunately we had to broke some API compatibility because of the renaming 😢
m
Move fast an break things! I guess you still won’t come even close to how much Kotlin is breaking with almost every update 😉
(although that’s mostly bugs)