InsertKoinIO / koin

Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
https://insert-koin.io
Apache License 2.0
9.09k stars 719 forks source link

Scope has no source by default #2059

Open StenSoft opened 2 days ago

StenSoft commented 2 days ago

When creating a scope with T.newScope(), the scope has no source by default because T.createScope()'s source defaults to null instead of this.

https://github.com/InsertKoinIO/koin/blob/main/projects/android/koin-android/src/main/java/org/koin/android/scope/ComponentCallbacksExt.kt#L25

If this is intentional then:

  1. This needs to be documented
  2. newScope needs to be able to pass source