-
Notifications
You must be signed in to change notification settings - Fork 319
Fix data store crash #6392
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 data store crash #6392
Conversation
23a7a68 to
bb35b14
Compare
bb35b14 to
cd816d0
Compare
|
Don't you want to test that it's the same for different instances of |
Yeah I was looking into writing It's using the android data store delegate, so we would need a wrapper in order to test it. This I think a separate integration test with jetpack would be good though.. |
|
@dzinad i added a "known issue" and it broke the changelog validator |
Codecov Report
@@ Coverage Diff @@
## main #6392 +/- ##
=========================================
Coverage 68.95% 68.95%
Complexity 4579 4579
=========================================
Files 691 691
Lines 27384 27384
Branches 3191 3191
=========================================
Hits 18883 18883
Misses 7262 7262
Partials 1239 1239
|
It's because you added a new section. It does not happen very often so I'm not sure if we should do something about it. It's more like a guide, this check can't check all possible cases. It doesn't work for updating the CHANGELOG for releases, for example. It's like a sanity check for regular PRs. What do you think? If you feel differently, I can add new sections cases to the checks. |
Agree it doesn't happen often so it's not that big of a deal. Leaving it up since you have the best idea for it |
Description
This crash was introduced in v2.9.0-alpha.3 by #6336
Steps to reproduce
Essentially, the owner of
NavigationDataStoreOwnerhas always been a singleton so we never saw this issue. To ensureNavigationDataStoreOwnercan be used by non-singleton entities. It makes sense for the DataStore lifecycle to be owned by NavigationDataStoreOwner, and it fixes the crash.It is spelled out pretty clearly by the
preferencesDataStorethat this needs to have a lifecycle.Here's the stack trace in case anyone comes looking for the issue