Closed
Description
Right now the API for components looks like this:
@Component
@MergeComponent
@SingleInAppScope
abstract class AppComponent(
@get:Provides val input: Input,
) : AppComponentMerged
We could turn it into the follow and generate the real component ourselves:
@MergeComponent
@SingleInAppScope
abstract class AppComponent(
@get:Provides val input: Input,
)
That saves a step in the setup and avoids running an initial build to generate AppComponentMerged
. The downside is that the IDE doesn't know that AppComponent
will implement the contributed components and inheritance in the IDE doesn't work properly. The inheritance chain from:
ContributedComponent -> AppComponentMerged -> AppComponent
To this:
ContributedComponent -> GeneratedAppComponent
^
AppComponent --------/
There is no connection between ContributedComponent
and AppComponent
.
I personally prefer giving the IDE more power and add the interface manually.
Note that the situation for Anvil itself is different, because it's able to modify source code.