Open ZacSweers opened 4 months ago
Seems like it should be doable, we already scan superclasses for @Provides
we could scan for @Component
as well. Actually may be worth spending some time seeing if we can unify how they are looked up, I can't remember off the top of my head why they are different.
note: I'd actually expect scenario 2 to look like
@MergeCircuitComponent(AppScope::class)
abstract class AppScopeCircuitComponent(@Component val parent: AppComponent) : CircuitComponent
// Generated
abstract class AppScopeCircuitComponentImpl(parent: AppComponent) : AppScopeCircuitComponent(parent)
Makes sense re: not having @Component
in the generated component, I wasn't sure when I was writing this up 👍
We have an example where we generate a component impl for a given class.
Scenario 1: declare parameter in the merge component, add property in impl
Scenario 2: declare property in the merge component, only add parameter in impl passed to parent
The latter feels preferably, but it seems only the former is supported. Curious if this is something that could be expanded or if there's a technical limitation.
Reference: https://github.com/slackhq/circuit/pull/1197