Open dronda-t opened 1 year ago
I think it may be due to this line here https://github.com/kopykat-kt/kopykat/blob/2800bc06c451375b3b0200ff1e6c6bae00365ade/kopykat-ksp/src/main/kotlin/at/kopyk/MutableCopy.kt#L100
Everything is passed in as a string instead of a template. I don't have much experience with Kotlin Poet but based off the documentation it seems like you need to use the template format in order to get the correct imports.
I took a stab at this but I'm running into some very strange errors.
Will there be a new release fixing this bug? Cannot yet update to Kotlin 2.0 so still need to use this plugin
Hi! I ran into an issue where if a class references a class that is in the parent package, imports are not added.
For example:
The generated code for inner will look like this:
And fail with the error:
In order to fix this the following imports need to be added to the inner generated file:
I created a reproducer at https://github.com/dronda-t/kopy-kt-missing-import if you want to try for yourself.