Skip to content

Conversation

@arnaudgiuliani
Copy link
Member

Following up #2250

Added fixes about Key resolution

luozejiaqun and others added 10 commits October 23, 2024 10:42
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
@arnaudgiuliani
Copy link
Member Author

@arnaudgiuliani arnaudgiuliani added status:wait_feedback Need more details or follow-up kotlin-issue Related to Kotlin issue under the hood labels Oct 20, 2025
@arnaudgiuliani arnaudgiuliani added this to the 4.2.0 milestone Oct 20, 2025
@volo-droid
Copy link

@arnaudgiuliani arnaudgiuliani deleted the branch 4.2.0 October 28, 2025 15:44
@arnaudgiuliani arnaudgiuliani changed the base branch from 4.1.2 to 4.2.0 October 28, 2025 15:47
@arnaudgiuliani
Copy link
Member Author

it's public, you can log in/ create an account

@volo-droid
Copy link

I'm logged in but I cannot access it. In the top right corner above the ticket title there's a visibility setting. What does it say? It should be either "Visible to issue readers", "All users" or "Registered users"

Screenshot 2025-11-05 at 14 53 04

@mityakoval
Copy link

mityakoval commented Dec 10, 2025

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.
Koin doesn't seem to have access to Ktor-defiined deps to be able to inject them in the constructor.

@sroebert
Copy link

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?

@arnaudgiuliani
Copy link
Member Author

It's on hold for now. We need Ktor 3.4 to achieve it.

@arnaudgiuliani arnaudgiuliani changed the title [Feat] Ktor DI 3.2 integration [Feat] Ktor DI integration Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kotlin-issue Related to Kotlin issue under the hood status:wait_feedback Need more details or follow-up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants