Hi, is there a trick to getting the latest koin-an...
# koin
j
Hi, is there a trick to getting the latest koin-annotations (1.2.0) to work with synthetic KMP source sets such as iosMain? I have added ksp configurations for iosArm64 and iosX64, so now I'm getting code generated for these targets (such as the .module extension on
@Module
annotated classes) but that didn't make things accessible from the common iOS source set. Code in thread below.
KSP setup in module
Copy code
dependencies {
    add("kspCommonMainMetadata", libs.koin.kspCompiler)
    add("kspAndroid", libs.koin.kspCompiler)
    add("kspIosX64", libs.koin.kspCompiler)
    add("kspIosArm64", libs.koin.kspCompiler)
}
Error site in iosMain (
IosModule
is
@Module
)
Copy code
fun iosStartKoin() {
    val iosModule = module {
        includes(IosModule().module)
    }

    sharedStartKoin(platformModule = iosModule)
}
Copy code
> Task :shared:compileIosMainKotlinMetadata FAILED
e: file://[...]/shared/src/iosMain/kotlin/[...]/IosModule.kt:100:30 Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: 
public val SharedModule.module: Module defined in org.koin.ksp.generated
public val BackendModule.module: Module defined in org.koin.ksp.generated
The listed extensions are ones that stem from
@Module
classes defined in commonMain.