-
Notifications
You must be signed in to change notification settings - Fork 376
IndexedDB: Make IndexeddbSerializer shareable between modules in matrix-sdk-indexeddb
#4996
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
IndexedDB: Make IndexeddbSerializer shareable between modules in matrix-sdk-indexeddb
#4996
Conversation
Signed-off-by: Michael Goldenberg <[email protected]>
…eddbCryptoStoreError Signed-off-by: Michael Goldenberg <[email protected]>
Signed-off-by: Michael Goldenberg <[email protected]>
…eddbSerializerError Signed-off-by: Michael Goldenberg <[email protected]>
|
Apologies about the failures, I am fixing them now! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4996 +/- ##
==========================================
+ Coverage 85.86% 85.88% +0.02%
==========================================
Files 325 325
Lines 35851 35851
==========================================
+ Hits 30783 30791 +8
+ Misses 5068 5060 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Michael Goldenberg <[email protected]>
Signed-off-by: Michael Goldenberg <[email protected]>
1104506 to
72da680
Compare
Hywan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patches. They are making sense to me. Thanks for doing small patches, I appreciate.
Background
This pull request has a high-level focus on integrating work on an IndexedDB implementation of the
EventCacheStore(see #4617). Those changes were rather large and sprawling and included code duplication, so this is part of a series of pull requests which will break that work into smaller, more manageable changes.Changes
This change is focused on de-duplicating code. In #4617,
crypto_store::indexeddb_serializerwas copy-and-pasted toevent_cache_store::indexeddb_serializerwith minor modifications (see here). In preparation for integrating this work, I have made the following changes.IndexeddbSerializerto the top-level so it may be shared between modules in the crate.IndexeddbSerializerErrorto be used withIndexeddbSerializer.IndexeddbCryptoStoreError, which was too specific for a generalized use-case.Additionally, I have prioritized making changes in such a way that does not change the public API of the crate. This means some of the changes weren't as sensible as they could have been, but it helped to keep the pull request small.
Future Work
The next pull request in this series will make additions to the
IndexeddbSerializer- there are two functions which #4617 added to its copy of the serializer and which are used byIndexeddbEventCacheStore.Signed-off-by: Michael Goldenberg [email protected]