Jacob Ras
04/15/2026, 9:42 AMFeatureEntryPoint with an init() method that does koin.loadModules(SomeFeatureModule().module), where koin is the SDK's internal Koin instance.
How to achieve this with the compiler plugin? .module doesn't exist anymore. The docs state doing everything in startKoin, but we don't know what configuration the consuming app needs. All DI config is internal to the SDK.Robert Jaros
04/15/2026, 10:03 AMmodule() instead. This is how I do this in my lib:
https://github.com/rjaros/kilua-rpc/blob/main/examples/fullstack-ktor-koin/src/jvmMain/kotlin/example/Main.kt#L23-L25Jacob Ras
04/15/2026, 10:54 AMmodule() method is never known to the IDE 😅Robert Jaros
04/15/2026, 10:57 AMJacob Ras
04/15/2026, 11:05 AMFeatureEntryPoint, so I tried adding this placeholder:
/**
* Placeholder for the `module()` method that Koin's compiler plugin generates, so the IDE
* knows about it.
*/
protected fun Any.module(): Module {
error("This will should have been overwritten by Koin compiler")
}
IDE is happy but runtime is not, unfortunately.
(We're on koin 4.2.1 and koin-plugin 1.0.0-RC1 )Jacob Ras
04/23/2026, 6:37 PMarnaud.giuliani
04/24/2026, 3:33 PMarnaud.giuliani
04/24/2026, 3:33 PMJacob Ras
05/18/2026, 10:24 AMmodule() method call?Robert Jaros
05/18/2026, 10:25 AMRobert Jaros
05/18/2026, 10:28 AMRobert Jaros
05/18/2026, 10:29 AMJacob Ras
05/18/2026, 10:30 AMRobert Jaros
05/18/2026, 10:42 AMKoinApplication.modules(Module1.module(), Module2,module()) and this was not correct in IDE. Then I tried using KoinApplication.modules(Module1::class, Module2::class) but it doesn't work. So I tried KoinApplication.module<Module1>() and it works ok, I just need multiple calls for each module.