rickclephas / KMP-NativeCoroutines

Library to use Kotlin Coroutines from Swift code in KMP apps
MIT License
1.06k stars 31 forks source link

IllegalStateException: Only Flow properties supported #148

Closed estivensh closed 12 months ago

estivensh commented 12 months ago

when generating the compilation I'm getting this error i: [ksp] provider(s) loaded: [com.rickclephas.kmp.nativecoroutines.ksp.KmpNativeCoroutinesSymbolProcessorProvider]. e: [ksp] java.lang.IllegalStateException: Only Flow properties supported

kotlin: 1.9.20 ksp: 1.9.20-1.0.14 native-coroutines: 1.0.0-ALPHA-20

rickclephas commented 12 months ago

This error indicates that you have annotated a non-Flow property with one of the @NativeCoroutines annotations. Could you possibly share the relevant code?

rickclephas commented 12 months ago

This error unfortunately isn't actually very helpful. The inspection provided by the compiler plugin should provide a better error message, but it looks like those are run after KSP. Will take a look at that. With the IDE plugin it should be easier to identify the invalid annotation.

estivensh commented 12 months ago

This error unfortunately isn't actually very helpful. The inspection provided by the compiler plugin should provide a better error message, but it looks like those are run after KSP. Will take a look at that. With the IDE plugin it should be easier to identify the invalid annotation.

This error indicates that you have annotated a non-Flow property with one of the @NativeCoroutines annotations. Could you possibly share the relevant code?

I have an implementation error in the ViewModel with a variable, but I saw that it is not from the library so I proceed to close the issue.