-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Proguard warnings on 1.3.0-M1 with flows #1270
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
Comments
Yes. I'm not sure why would ProGuard complain about that and what can we do about it. It looks like ProGuard bug to me. |
This is a compiler bug: https://youtrack.jetbrains.com/issue/KT-31242. It is fixed in 1.3.40. Until then, IMHO, it is safe to ignore them. |
Fixed in 1.3.0-M2 |
I'm still facing the same issue after updating to 1.3.0-M2 |
@CrisBarreiro could you please attach a reproducer? I've verified, the bytecode does not have references to eliminated state machines (at least, in my setup) |
Facing similar issue with Flows In code: |
Any solution to this? |
Exists in v1.3.0
|
@jemshit What Kotlin version are you using? |
Hi |
Can you provide a simple project that reproduces the problem? |
kotlin 1.3.50, Android Studio 3.5 (with latest kotlin plugin) |
I am also facing this issue. |
Here's an Android Studio project that reproduces the issue when |
@jschear Thanks a lot. I've updated https://youtrack.jetbrains.com/issue/KT-31242 that had, indeed, regressed. |
in proguard-rules just add: |
I think you can be more specific with the proguard rule. I believe the only issues here are the inlined functions. |
yeah you are right |
5 months without a fix for https://youtrack.jetbrains.com/issue/KT-31242 is pretty painful. @elizarov - any chance you could apply some pressure to get the timeline for fixing this sped up? It has the unfortunate side effect of making Coroutines/Flow look bad (flow heavily uses inline/crossinline), even though this is not the fault of the Coroutines lib |
@ZakTaccardi KT-31242 was just recently reopened. Work in progress. |
What's the workaround until the issue is fixed? |
Besides the above rules I had to add the following:
Whatever the fix is, kindly fix the reactive bindings as well. Thank you! |
@digitalbuddha could you please check whether the problem reproduces on the latest 1.3.70-eap? |
Note that you'll need to compile this library with 1.3.70 eap and then consume that to confirm. |
Exists in v1.3.70-eap-184 Warning: androidx.lifecycle.FlowLiveDataConversions$asLiveData$1$invokeSuspend$$inlined$collect$1$1: can't find enclosing method 'java.lang.Object emit$$forInline(java.lang.Object,kotlin.coroutines.Continuation)' in program class androidx.lifecycle.FlowLiveDataConversions$asLiveData$1$invokeSuspend$$inlined$collect$1 |
And to be clear, you've compiled the kotlinx.coroutines library yourself using 1.3.70 and then consumed it in your app and it still produces that warning? Or have you only bumped your app to 1.3.70 and consumed the released version of kotlinx.coroutines? |
Is there any workaround for this issue? |
This appears fixed (at least for me) with Kotlin 1.3.70 & Coroutines 1.3.4 |
I use Kotlin 1.3.70 & Coroutines 1.3.4 but still have |
@SoNep could you please provide a reproducer? |
flow.mapNotNull{} |
Could you please elaborate on whether it is still a problem with coroutines 1.5.0 and the latest R8? |
Proguard rules applied from
coroutines.pro
After upgrating to 1.3.0-M1 I got these warnings:
Are they safe to ignore?
The text was updated successfully, but these errors were encountered: