Skip to content

Provide a way to enable stacktrace recovery in Android release build #1998

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

Open
varahash opened this issue May 7, 2020 · 6 comments
Open
Labels
debug docs KDoc and API reference enhancement

Comments

@varahash
Copy link

varahash commented May 7, 2020

As mentioned in https://github.com/Kotlin/kotlinx.coroutines/blob/master/ui/kotlinx-coroutines-android/README.md#optimization

When optimizations are enabled with R8 version 1.6.0 or later the following debugging features are permanently turned off to reduce the size of the resulting binary:

  • Debugging mode
  • Stacktrace recovery
  • The internal assertions in the library are also permanently removed.

There is should be a way to opt-out this behaviour.

@qwwdfsad qwwdfsad added docs KDoc and API reference enhancement labels May 7, 2020
@Thomas-Vos
Copy link
Contributor

Yes, please. I really need the stack trace of a kotlinx.coroutines.JobCancellationException so I can try to reproduce the reported crash. Is there a way to enable stack trace recovery in release builds?

@dkhalanskyjb
Copy link
Collaborator

See #3611 for some prior art.

@LouisCAD
Copy link
Contributor

What is causing stacktrace recovery to not work after R8?
Is it rules that the kotlinx.coroutines library is embedding?

@qwwdfsad
Copy link
Collaborator

Yes, embedded rules are the main suspect here

@LouisCAD
Copy link
Contributor

It'd be great to have those in a code-free extra artifact that the -android module depends on, and give us a way to exclude it.

@LouisCAD
Copy link
Contributor

I mean, just using Gradle APIs should suffice to exclude it if it's in a separate artifact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug docs KDoc and API reference enhancement
Projects
None yet
Development

No branches or pull requests

5 participants