Hi there, I've noticed a behavioral change between...
# koin
h
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.
a
already fixed in 3.2.3 I believe, for the
createdAtStart
h
Thanks for the feedback. However, this patch-release does not seem yet released on maven-central -> https://mvnrepository.com/artifact/io.insert-koin/koin-core-jvm or https://mvnrepository.com/artifact/io.insert-koin/koin-core
a
perhaps more 3.2.2, did you try? 🤔
h
Indeed, it works fine with v3.2.2 which is also on central. Thanks for your help. Greatly appreciated!