I know, what I'll ask is weird, but there is some ...
# koin-contributors
p
I know, what I'll ask is weird, but there is some way to avoid Koin compile safety fails in compile time because of non-annotated dependencies? I'm bypassing like this:
Copy code
@Module
@ComponentScan("<http://br.com.custom.secret.app|br.com.custom.secret.app>")
class MyModule {

    @Factory
    fun getNonKoinAnnotatedAppLog(): AppLog {
        return GlobalContext.get().get<AppLog>()
    }

    @Factory
    fun getNonKoinAnnotatedGson(): Gson {
        return GlobalContext.get().get<Gson>()
    }

}
u
In all likelihood probably not, simply because during compile time, you'd have to find all of the non-annotated modules, verify if they have the definition you need as well of all it's required dependencies, which is going to be pretty tricky to do with KSP. Perhaps it can be done, but probably wasn't worth the level of effort for an initial implementation (plus it's still described as experimental in the documentation)
a
you should use function parameter for your dependencies here, else it's "dynamic" resolution that can't be checked statically
👍 1
p
Yeah... so I think this is the pretties hack at moment.
😄 1