Describe the bug
In versions prior 4.2.0 correctly scoped components are correctly loaded from scope upon which declare was called.
In 4.2.0 same component is tried to be created from _root_ scope.
Caused by: org.koin.core.error.NoDefinitionFoundException: No definition found for type 'net.my.app.MyClass' on scope '['_root_']'. Check your Modules configuration and add missing type and/or qualifier! (Fix with AI)
at org.koin.core.resolution.CoreResolverV2.resolveFromContext(CoreResolverV2.kt:160)
at org.koin.core.scope.Scope.resolveFromContext(Scope.kt:329)
at org.koin.core.scope.Scope.stackParametersCall(Scope.kt:292)
at org.koin.core.scope.Scope.resolveInstance(Scope.kt:278)
at org.koin.core.scope.Scope.resolve(Scope.kt:251)
The class is correctly scoped by dsl and it works fine in versions prior 4.2.0
To Reproduce
Steps to reproduce the behavior:
- Scope a class
- Call
getOrCreateScope("someId", named("MyScope"), call declare("someId")
- Upgrade to 4.2.0
- Run
Expected behavior
A compont should be loaded from correct scope instead from _root_ scope
Koin module and version:
4.2.0
Unfortunately can't provide snippet.
Describe the bug
In versions prior 4.2.0 correctly scoped components are correctly loaded from scope upon which declare was called.
In 4.2.0 same component is tried to be created from
_root_scope.The class is correctly scoped by dsl and it works fine in versions prior 4.2.0
To Reproduce
Steps to reproduce the behavior:
getOrCreateScope("someId", named("MyScope"), calldeclare("someId")Expected behavior
A compont should be loaded from correct scope instead from
_root_scopeKoin module and version:
4.2.0
Unfortunately can't provide snippet.