koin
koin copied to clipboard
Ktor 3.0 support
Is your feature request related to a problem? Please describe.
JB recently released Ktor 3.0.0-betta1. Currently Ktor does not support it, JB changed API. In particular access to monitor now done via Application not Environment, maybe there is more incompatibilities.
Describe the solution you'd like
Separate ktor-3 module to have both ktor 2.* and 3.*
Target Koin project ktor
Can second this, but I would prefer a simple dependency upgrade instead of separate artifact
The workaround for now is to copy everything from the koin Ktor sources and fix the compile time error
If koin goes with single module approach, it will break comp with ktor-2, and I guess bunch of people will not update for a while
The only updates for the past months have been dependency updates... The whole library is 2 files
Yes, great topic coming 👍
Can you please add ktor 3.0 support first before you refactor, add new stuff, and break something with the update you described in your article? @arnaudgiuliani
Changing one line of code, that is, so that we don't wait till Q4 2024 for this to get fixed
something I can setup for 3.6.0 - Q1 Seems that we need to separate both ktor & ktor3
Is there any solution now?
@arnaudgiuliani I would appreciate a solution for this, as I am currently unable to use SSE (server sent events) in my application due to it only being supported in Ktor 3.0.0. Let me know if I can speed up the work, maybe by making a PR?
I'm am interested in this as well and will be watching for updates.
@fluxxion82 Just copy all sources of the Ktor module to your project. This hasn't been addressed in almost a year and the author has no intention of doing so.
it would be nice to get support for this
Still waiting for this. No solutions of as of yet?
Like I said, just copy and paste all sources of Koin-ktor module into your project and fix the breaking changes. Already using this approach in prod
Like I said, just copy and paste all sources of Koin-ktor module into your project and fix the breaking changes. Already using this approach in prod
Pardon but can you please briefly describe what do you mean by this? Earlier we were using koin as:
install(Koin) {
slf4jLogger()
modules(appModule)
}
How do i migrate from this?
Like I said, just copy and paste all sources of Koin-ktor module into your project and fix the breaking changes. Already using this approach in prod
Pardon but can you please briefly describe what do you mean by this? Earlier we were using koin as:
install(Koin) { slf4jLogger() modules(appModule) }How do i migrate from this?
Figured it out, basically
- Goto this link: https://github.com/InsertKoinIO/koin/tree/main/projects/ktor/koin-ktor
- Manually copy/paste all files under koin-ktor package (I copied only KoinPlugin)
- In your install block, use your koin plugin instead of ktor's
Warning: This is a workaround, with this:
- You will lose out on future Ktor or Koin updates
- You’ll need to keep an eye on both the Koin and Ktor projects for official updates that may render this workaround obsolete.