Closed nordfalk closed 4 months ago
Hi, @nordfalk Could you please try this Proguard config:
-keep class kotlin.** { *; }
-keep class dev.reformator.stacktracedecoroutinator.** { *; }
-keep class UnknownKt { *; }
-keep @kotlin.coroutines.jvm.internal.DebugMetadata class * { *; }
If it will help I'll think how to simplify the using of Proguard.
Thanks you, it seems to work !
Do you have a performance hit estimate on Android, or do you have some suggestions how I would make one ?
I dont mind a minor performance penalty for end users - having good stack traces will speed up development significantly, and they'll benefit from that :-)
I tried to take some measurements (https://github.com/Anamorphosee/stacktrace-decoroutinator/blob/master/stacktrace-decoroutinator-android/src/androidTest/kotlin/performance-test-android.kt) but only in the simulator. In my case median performance hit is about 1ms for the stack of depth 10. If you want to measure yourself, pay attention that the first "awaking" of each class is much slower than the second and subsequent ones.
Since 2.3.9 ProGuard config can be simplified to:
-keep class kotlin.** { *; }
-keep class dev.reformator.stacktracedecoroutinator.** { *; }
-keep @kotlin.coroutines.jvm.internal.DebugMetadata class * { *; }
Hi, I want to get good stack traces in a production Android app environment - ie with using proguard, and enabling minify:
However, when I use a coroutine, the app crashes:
If I add -keep directives to proguard-rules.pro, like
-keep class dev.reformator.stacktracedecoroutinator.** { *; }
the problem just keeps popping up in a new place in kotlin libraries (kotlin.jvm.internal, kotlin.collection, ...).Adding
the problem pops up in my own code:
Is it possible to get stack traces with minify/obfuscated code? Or is this library just plan not unusable in production?