Skip to content

RUM-16593: Fix WorkDatabase initialization crash in R8 full mode#3502

Merged
0xnm merged 1 commit into
developfrom
nogorodnikov/rum-16593/fix-workdatabase-r8-fullmode-crash
Jun 3, 2026
Merged

RUM-16593: Fix WorkDatabase initialization crash in R8 full mode#3502
0xnm merged 1 commit into
developfrom
nogorodnikov/rum-16593/fix-workdatabase-r8-fullmode-crash

Conversation

@0xnm

@0xnm 0xnm commented Jun 3, 2026

Copy link
Copy Markdown
Member

What does this PR do?

See #3491 for the motivation.

Fix R8 fullMode crash when using WorkManager 2.8.1

R8 fullMode (enabled by default in AGP 9.x) strips the no-arg constructor of WorkDatabase_Impl because it's only called via reflection. WorkManager's own bundled ProGuard rules don't protect it. This adds a consumer ProGuard rule to dd-sdk-android-core so the constructor is preserved in any app consuming the SDK. We cannot update WorkManager dependency, because it will bring coroutines and also may impose compile SDK restrictions.

Fixes #3491.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@0xnm
0xnm requested review from a team as code owners June 3, 2026 09:23
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.23%. Comparing base (91882c1) to head (563f022).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3502   +/-   ##
========================================
  Coverage    72.23%   72.23%           
========================================
  Files          965      965           
  Lines        35595    35595           
  Branches      5932     5932           
========================================
  Hits         25712    25712           
- Misses        8274     8275    +1     
+ Partials      1609     1608    -1     

see 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@0xnm
0xnm merged commit e9efd7c into develop Jun 3, 2026
28 checks passed
@0xnm
0xnm deleted the nogorodnikov/rum-16593/fix-workdatabase-r8-fullmode-crash branch June 3, 2026 10:32
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.

Outdated workmanager crashes with R8 fullmode

3 participants