https://kotlinlang.org logo
Title
m

Marco Gomiero

05/10/2023, 1:30 PM
Hey 👋 I have a question regarding Annotations and scoping. I have some modules defined like that, with a dependency that come from a specific scope. I haven’t found a way of doing it with Annotations :/ Is it possible to achieve? 🤔
val myModule = module {
    scope(named(scopeName)) {
        scoped { Foo() } 
    }

    viewModel {
        ViewModel(
            regularDeps = get(),
            foo = getScope(scopeName).get(),
        )
    }
}
a

arnaud.giuliani

05/10/2023, 4:12 PM
yes good question, not supported in current version 🤔
need to recheck all about Scope in Koin Annotations
m

Marco Gomiero

05/11/2023, 12:48 PM
Interesting! Thanks for the response. I would love to have the support in the future!
a

arnaud.giuliani

05/12/2023, 9:33 AM
clearly 🙂