[Feat] Ktor DI integration - Ktor 3.4#2294
Conversation
Ktor DI Bridge Implementation - Added KoinDependencyMapExtension implementing Ktor 3.2's DependencyMapExtension interface - Registered via SPI in META-INF/services/io.ktor.server.plugins.di.DependencyMapExtension Koin can resolve Ktor DI dependencies via KtorDIExtension resolution extension. - There is a potential problem with runBlocking usage When dependency is not found, each library is delegating to the other in an infinite loop Fixed a problem in CoreResolver that was not resolving extensions Created a sample application to show usage.
…Ktor DI. Explicit options for bridging Ktor -> Koin & Koin -> Ktor
flatten module order error
|
Trying to find a good way to pass around KType. |
|
@arnaudgiuliani the issue is not accessible, is it a private one? |
|
it's public, you can log in/ create an account |
|
I'm confused. Does Koin have support for Ktor DI? @arnaudgiuliani Both Koin docs and Ktor docs talk about great interoperability between the two starting with Koin 4.1+. But I was unable to make it work. |
|
Yes, this is very confusing, after digging into the code I realized this functionality is currently commented out. Might be a good idea to at least update the Koin docs until this is fixed? |
|
It's on hold for now. We need Ktor 3.4 to achieve it. |
# Conflicts: # examples/gradle/versions.gradle # projects/gradle.properties
|
@lidonis Ktor DI could be finalized with ktor 3.4 🎉 |
|
Docs will be updated / Feature deployed in Koin 4.2.0 Beta4 |

Following up #2250
Added fixes about Key resolution