Josh Feinberg
11/12/2024, 3:55 AMJosh Feinberg
11/12/2024, 3:56 AM./gradlew build you get this error
> Task :shared:compileKotlinJvm FAILED
e: kiaerror/shared/src/commonMain/kotlin/com/example/kiaerror/AppComponent.kt:13:5 Unresolved reference 'AppComponentMerged'.
> Task :shared:verifyReleaseResources
> Task :shared:kspReleaseKotlinAndroid
> Task :shared:kspDebugKotlinAndroid
> Task :shared:compileDebugKotlinAndroid FAILED
e: kiaerror/shared/src/commonMain/kotlin/com/example/kiaerror/AppComponent.kt:13:5 Unresolved reference 'AppComponentMerged'.
> Task :shared:compileReleaseKotlinAndroid FAILED
e: kiaerror/shared/src/commonMain/kotlin/com/example/kiaerror/AppComponent.kt:13:5 Unresolved reference 'AppComponentMerged'.
FAILURE: Build completed with 3 failures.Josh Feinberg
11/12/2024, 3:56 AMexpect interface AppComponentMerged2 as that is how i'm fixing this in 0.0.5 however in 0.1.0 it is an error not to directly implement that interface
[ksp] kiaerror/shared/src/commonMain/kotlin/com/example/kiaerror/AppComponent.kt:11: AppComponent is annotated with @MergeComponent and @Component. It's required to add AppComponentMerged as super type to AppComponent. If you don't want to add the super manually, then you must remove the @Component annotation.Josh Feinberg
11/12/2024, 3:57 AMeygraber
11/12/2024, 4:04 AMJosh Feinberg
11/12/2024, 4:08 AMAppComponentMerged I get that compile error but if I do my app won't compileeygraber
11/12/2024, 4:10 AMJosh Feinberg
11/12/2024, 4:10 AM@AppScope
@Component
@MergeComponent(AppScope::class)
internal abstract class AppComponent(
@Component val clientComponent: ClientComponent,
) : AppComponentMergedJosh Feinberg
11/12/2024, 4:12 AM@NetworkScope
@Component
abstract class ClientComponent {
@NetworkScope
@Provides
fun provideNetworkScopeObject(): NetworkScopeObject {
return NetworkScopeObject()
}
}
both the *Scope classes are annotations with the @Scope annotationeygraber
11/12/2024, 4:16 AM@Component and not extend AppComponentMerged. If you remove both of those do you still get an error?Josh Feinberg
11/12/2024, 4:25 AM[ksp] kiaerror/shared/src/commonMain/kotlin/com/example/kiaerror/AppComponent.kt:10: Contributed component interfaces must be public.
so i can't have internal components anymore i guess?eygraber
11/12/2024, 4:26 AMJosh Feinberg
11/12/2024, 4:26 AM@AppScope
@MergeComponent(AppScope::class)
abstract class AppComponent(
@Component val clientComponent: ClientComponent,
) {
abstract val networkScopeObject: NetworkScopeObject
}
that fails to find my NetworkScopeObject despite ClientComponent being a child componenteygraber
11/12/2024, 4:28 AMContributesSubcomponenteygraber
11/12/2024, 4:29 AMeygraber
11/12/2024, 4:33 AMClientComponent also a MergeComponent?Josh Feinberg
11/12/2024, 4:34 AMeygraber
11/12/2024, 4:35 AM@Component?ralf
11/12/2024, 4:37 AMso i can’t haveNo, because in 99% of the cases this is the wrong thing to do.components anymore i guess?internal
ralf
11/12/2024, 4:37 AMJosh Feinberg
11/12/2024, 4:50 AMralf
11/12/2024, 5:46 AM