Skip to content
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

Fix R8 config #2379

Merged
merged 6 commits into from Nov 21, 2022
Merged

Fix R8 config #2379

merged 6 commits into from Nov 21, 2022

Conversation

romtsn
Copy link
Member

@romtsn romtsn commented Nov 19, 2022

📜 Description

While using minified builds I noticed that timber and fragment integrations do not get autoinstalled. Turns out it's because we're checking for presence of upstream dependencies classes (e.g. timber.log.Timber), but the get obfuscated too indeed. So this PR will keep their names so we can successfully check them. Along the way fixed another 2 issues:

  • Use canonicalName instead of simpleName in Fragment Integration for better de-obfuscation
  • Keep io.sentry package name to filter ouе our frames from stacktraces when sending the crashes. This adds ~5kb for the final apk size, but I guess this is not a big price.

💡 Motivation and Context

Closes #2362

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

@romtsn romtsn changed the title Fix Timber and Fragment autoinstallation Fix R8 config Nov 19, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2022

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 308.33 ms 365.42 ms 57.09 ms
Size 1.73 MiB 2.32 MiB 611.44 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
a04f788 321.78 ms 354.12 ms 32.35 ms
4a9c176 319.77 ms 363.20 ms 43.43 ms
7597ded 289.60 ms 339.69 ms 50.09 ms
4a9c176 336.33 ms 384.73 ms 48.41 ms
90e9745 314.68 ms 357.28 ms 42.60 ms
38e4f11 358.20 ms 433.73 ms 75.53 ms
f809aac 301.51 ms 346.60 ms 45.09 ms
507f924 342.51 ms 402.65 ms 60.14 ms

App size

Revision Plain With Sentry Diff
a04f788 1.73 MiB 2.32 MiB 609.88 KiB
4a9c176 1.73 MiB 2.33 MiB 612.69 KiB
7597ded 1.73 MiB 2.32 MiB 609.88 KiB
4a9c176 1.73 MiB 2.33 MiB 612.69 KiB
90e9745 1.73 MiB 2.32 MiB 608.63 KiB
38e4f11 1.73 MiB 2.32 MiB 609.82 KiB
f809aac 1.73 MiB 2.32 MiB 608.63 KiB
507f924 1.73 MiB 2.32 MiB 609.95 KiB

Previous results on branch: fix/r8-config

Startup times

Revision Plain With Sentry Diff
5fd1d9c 355.28 ms 397.36 ms 42.08 ms
38500ca 282.94 ms 363.47 ms 80.53 ms
2c63606 330.80 ms 350.54 ms 19.74 ms

App size

Revision Plain With Sentry Diff
5fd1d9c 1.73 MiB 2.32 MiB 611.44 KiB
38500ca 1.73 MiB 2.32 MiB 611.44 KiB
2c63606 1.73 MiB 2.32 MiB 611.44 KiB

@romtsn romtsn marked this pull request as ready for review November 20, 2022 21:24
@codecov-commenter
Copy link

Codecov Report

Base: 80.28% // Head: 80.28% // No change to project coverage 👍

Coverage data is based on head (8acb15c) compared to base (4a9c176).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2379   +/-   ##
=========================================
  Coverage     80.28%   80.28%           
  Complexity     3690     3690           
=========================================
  Files           292      292           
  Lines         13845    13845           
  Branches       1833     1833           
=========================================
  Hits          11116    11116           
  Misses         2014     2014           
  Partials        715      715           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@markushi markushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted, nice!

@romtsn romtsn merged commit d49f98e into main Nov 21, 2022
@romtsn romtsn deleted the fix/r8-config branch November 21, 2022 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Class#getCanonicalName to log Fragment name in breadcrumbs
3 participants