Hi there :wave: I recently updated to version `7.1...
# kodein
g
Hi there 👋 I recently updated to version
7.10.0
and it looks like the API for dependency injection changed and now I'm getting errors on the
instance
methods. What is the new way of doing this? (I might have missed it in the docs!)
Reverting to v7.9.0 gets rid of the issue btw
Also it seems to compile with android studio 🤨
r
This is a weird error. This API is stable since few years now. Do you have specific imports ?
g
Exact same import as i have on v7.9.0 and with 7.10.0 it errors out but compiles okay it seems. If i open the definition of “instance” it does seem a bit different in 7.10.0 though
Also, tried the usual invalidate and restart etc on android studio
r
Ok, tried your project. In fact, updating from 7.9.0 to 7.10.0 your code seems no to resolve
DirectDIAware.instance
, so falling back on
DI.Builder.instance
. We’ve enabled
enableGranularSourceSetsMetadata
option, maybe this is why something changed
I just confirmed it locally. Thanks for reporting the issue. I will look into it.
g
Ah cool, maybe that's it! No worries, let me know if I can do/test anything else 👍
r
However, le whole project is compiling as expected. This means that it is Android Studio that failed to grab the correct reference from Kodein-DI. My guess is that KMM plugin fails to grab the reference from HMPP built library something like this https://youtrack.jetbrains.com/issue/KT-48148
HMPP should is enable by default starting from Kotlin 1.6.20, let’s hope this will be fixed then
🙏 1