Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with subcomponents #76

Closed
joshafeinberg opened this issue Nov 12, 2024 · 1 comment
Closed

Issue with subcomponents #76

joshafeinberg opened this issue Nov 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@joshafeinberg
Copy link
Contributor

https://github.com/joshafeinberg/kiaerror

From this slack thread: https://kotlinlang.slack.com/archives/C0255B8KX7W/p1731383702672619

Issues:

  1. In 0.0.5 I used a "trick" to inherit from AppComponentMerged in my common classes. However after Provide option to hide the merged interface #61 this doesn't work anymore
  2. If I remove the @Component annotation from AppComponent then I can no longer have this be internal. I explained a bit in the code why I want this internal but understand if this is something that can't be supported
  3. Even once removing internal, dependencies from my subcomponent no longer work in the main component
@vRallev vRallev added the bug Something isn't working label Nov 12, 2024
@vRallev
Copy link
Contributor

vRallev commented Nov 12, 2024

For 1) This workaround is redundant with #61. Just remove the classes

For 2) I filed #77. This particular use case makes sense.

For 3) There is a bug:

From the sample, given:

@AppScope
@MergeComponent(AppScope::class)
abstract class AppComponent(
    @Component val clientComponent: ClientComponent,
)

The generated component looks like this:

@Origin(value = AppComponent::class)
@Component
@MergeComponent(
  scope = AppScope::class,
  exclude = arrayOf(),
)
@AppScope
public abstract class KotlinInjectAppComponent(
  clientComponent: ClientComponent,
) : AppComponent(clientComponent)

Note that the @Component annotation is not carried over, therefore the code is not compiling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants