Bonjour I think that Koin introduces a caching pro...
# koin
j
Bonjour I think that Koin introduces a caching problem with Gradle in my project. In
src/main
I register things in Koin with the syntax
singleOf(::RegisterUser)
When I run tests I have errors like
'NoSuchMethodError void xxx.RegisterUser.<init>(xxx.FirstClass, xxx.SecondClass)'
The error goes away if I add a blank line somewhere in
src/main
therefore invalidating the cache. Does that sounds familiar?
a
Hi Jean-Michel, the constructor DSL trigger some weird behavior sometimes ... I will contact the Kotlin IDE team to check with them 👍
j
Thanks that would be great
In the meantime, would it help to mark the compileKotlin task as never up to date? Is fast in my project
a
you mean a workaround right?
j
Exactly
@arnaud.giuliani is there already a ticket on this issue? My coworkers want to migrate away from singleOf which I would rather avoid
a
Hello @jmfayard 👋 sorry, made the priority to release koin-android in 3.3.0. It’s something I need to check for koin-core 3.3.0 clearly 👍
I will investigate next week on it
can you extract a small sample project to reproduce?
would help to reproduce and communicate with Kotlin team
j
yes, will try to do so
a
thanks 🙏
are you using any particular Kotlin version?
current core is compiled against 1.6.21