You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Unscoped component, or component with some another scope
interface Component(modules = [FooModule::class]) {
...
}
object FooModule {
@Foo // Some scope here
fun provideFoo() : Foo{
...
}
}
This compiles fine and scope will work for Foo, however it's confusing because this scope is not attached to the current component
The text was updated successfully, but these errors were encountered:
It's possible to create component which provides dependencies with wrong scopes, because there are no such checks here:
https://github.com/daugeldauge/kinzhal/blob/master/kinzhal-processor/src/jvmMain/kotlin/com/daugeldauge/kinzhal/processor/KinzhalSymbolProcessor.kt#L12
https://github.com/daugeldauge/kinzhal/blob/64f84c2dd0c251a89f3c66703858e5b627dddf9d/kinzhal-processor/src/jvmMain/kotlin/com/daugeldauge/kinzhal/processor/generation/FactoryGenerator.kt#L29C4-L29C4
Example:
This compiles fine and scope will work for
Foo
, however it's confusing because this scope is not attached to the current componentThe text was updated successfully, but these errors were encountered: