Hi there, I've noticed a behavioral change between 3.1.1 and 3.2.1 (which is also present in 3.3.0). It seems that objected are not loaded eagerly anymore. Consider the following example:
Copy code
import org.koin.dsl.koinApplication
import org.koin.dsl.module
data class Tester(val id:String, val created :Long ){
init{
println("creating $this")
}
}
fun main() {
val myModule= module(createdAtStart = true) {
single(createdAtStart = true){
Tester("A", System.nanoTime())
}
}
val koinApplication = koinApplication {}
val koin = koinApplication.koin
koin.loadModules(modules = listOf(myModule))
println("everything loaded?")
println(koin.get<Tester>())
}
The print order changes between the mentioned versions. To me this qualifies as a bug.