8000 Fix for Redeclaration errors due to KSP source set code generation by eygraber · Pull Request #196 · evant/kotlin-inject · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix for Redeclaration errors due to KSP source set code generation #196

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

Closed
wants to merge 2 commits into from

Conversation

eygraber
Copy link
Collaborator
@eygraber eygraber commented May 6, 2022

Fixes #194

Stacked on #195

@evant
Copy link
Owner
evant commented May 6, 2022

Honestly this seems too hacky for me to accept, I think it would be better to wait for ksp to support multiplatform projects in a nicer way, I am a fan of the suggestion here. In the meantime, can't you exclude running ksp on kspCommonMainMetadata? I feel like that would get you closer to what you want.

@eygraber
Copy link
Collaborator Author
eygraber commented May 6, 2022

Yeah there's a lot of hackiness + I just realized it would break for hierarchical layouts.

Excluding kspCommonMainMetadata works; I was probably a little thrown off by that initially because the generated source sets can't see the common source set in the IDE, but everything builds fine. That's definitely a better solution for now, thanks!

@eygraber eygraber closed this May 6, 2022
@eygraber
8000 Copy link
Collaborator Author

@evant excluding kspCommonMainMetadata works until I need to process classes from both common and targets, and reference the generated common code from common.

I could expect/actual everything, but that would be very inconvenient for my use case. Any other ideas?

@eygraber eygraber deleted the 194 branch July 21, 2023 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redeclaration errors for @Component when ksp is used for common and target source sets
2 participants
0