* Support non exception errors from fetcher
* revert parital changes to store builder to reduce noise
* finish off diff
* Allow to create a FetcherResult.Error without a Throwable. Add tests
* Add missing funcion and more tests
* lint
* unflake RxFlowableStoreTest
* try to rename FakeFetcher to FakeRxFetcher to (maybe) solve missing codcov
* move SourceOfTruth out of impl package
* Rename accidental change of RxStoreBuilder.fromMaybe back to formSingle
* Introduce Fetcher from #139
* fix Rx artifact
* delete legacy presistor factory
* fix api file
* move fetcher to be a typealias
* code review comments + clean up documentation
* code review comments
* Update store/src/main/java/com/dropbox/android/external/store4/Fetcher.kt
Co-Authored-By: Yigit Boyar <yboyar@google.com>
* Revert "Update sample app's build.gradle to refer to the externally released version of Store (#159)"
This reverts commit fc8da86f63.
* update releasing.md
Co-authored-by: Yigit Boyar <yboyar@google.com>
* Contain @ExperimentalStdlibApi within relevant scope.
The alpha04 release of Store caused the requirement of the @ExperimentalStdlibApi annotation for client code. I looked into it, and the only thing in Store that required the annotation was the Kotlin ArrayDeque used in the BufferImpl class. That class is private in the ChannelManager.kt file, so I opted that file into the annotation and removed all other occurences of the annotation.
Code compiles, all 208 tests pass.
* update to correct git glitch in /build.gradle
* update to address 'needless blank line' linter
* Prepare for release 4.0.0-alpha05
* Prepare for next development version.
Co-authored-by: Dave Parker <davidp@dropbox.com>
* Remove unnecessary Collections.unmodifiableMap since we already return a defensive copy. Also write test to verify we returns a copy
* Update cache/src/test/kotlin/com/dropbox/android/external/cache4/DefaultCacheTest.kt
Co-authored-by: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
* Add Rx returning equivalents of get and fetch convenience functions
* Add RxSingleStoreExtensionsTest.kt
Shows usage of Rx extension functions on Store.
* Fix test assertion
* Rename extension functions to match main module
* Add new line to end of files
Required by ktlint rules.
* Update public API
Adds the two new extension functions from this change set.
* Rename extension function names
Avoid confusion with extension functions from the main artefact.
* Add ExperimentalStdlibApi annotation to RxSingleStoreExtensionsTest
* Migrate cache library to use kotlin.time APIs
* Fix docs and inline durations in tests
* Migrate cache library to use kotlin.time APIs
* Only require ExperimentalTime when setting cache expiration
* Set ExperimentalTime on RealStore to use it on MemoryPolicy
* Set ExperimentalTime on Cache interface and not on functions
* Avoid ExperimentalTime annotation in filesystem module
* Remove unneeded ExpirationTime annotation
* Remove unneeded ExpirationTime annotation
* MakeSharedFlowProducer APIs safe
This PR fixes a bug in SharedFlowProducer where it would not handle start being called
multiple times or cancel being called before start is completed. It could even consume
the upstream flow multiple times if start is called multiple times.
Fixes: #120
Test: SharedFlowProducerTest
* get rid of unnecessary start call
* Update KDoc for Store::observe
Refer to RxJava Flowable instead of Coroutine Flow.
* Update KDoc for StoreBuilder::withSinglePersister
The function `persister` is in a different class so we need to refer to
it by its FQN otherwise the IDE whinges at us.
* Convert RedditActivity, RoomActivity, and StreamActivity to fragment
* Add bottom navigation bar and icons
* Add navigation component and constraint layout dependency
* Ensure network starts after disk is established
This PR fixes a bug in the ordering where if disk is skipped and network
is super fast, there is a tiny chance that we wouldn't latch onto source
of truth before triggering network and that would make SourceOfTruth think
that the value was written to disk before it observed, hence become a disk
value rather than fetcher.
This PR ensures that we unlock the network only after we establish a position
in the disk read queue so that we'll know the fetcher value came afterwards.
Fixes: 114
Test: RxSingleStoreTest
* Apply suggestions from code review
* move network unlock to disk flow setup for clarity
Co-authored-by: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
* more tests!
* Start tracking API binary compatibility (#97)
* Configure binary-compatibility-validator plugin.
* Generate current API dumps.
* Update CONTRUBUTON.md with instruction for updating API dumps.
* ktlint fix
* newlines
* put fs eraser back in
* more tests!
* ktlint fix
* newlines
* put fs eraser back in
* run api checks
* lint
* lint
Co-authored-by: Yang <ychescale9@gmail.com>
* Revert "Prepare next development version."
This reverts commit 4397b4390d.
* Revert "Prepare for release 4.0.0-alpha04"
This reverts commit 671bfeaf26.
* [WIP] Add code coverage
* Get multi-module and merging working
* Add CodeCov
* Update location of report.xml
* Check instead of build depends on Jacoco
* Do not merge coverage
* Ignore tests
* update comment
* Fix a ConcurrentModificationException by synchronizing the accessQueue (MutableSet) before iterating over it.
* Add test to verify ConcurrentModificationException is not thrown when performing evictions concurrently.
* Fix typos.
* Gradle 6.1, AGP 4.0.0-alpha09, lifecycle 2.2.0.
* Add experimental invalidateAll() support and @ExperimentalStoreAPI annotation.
* Update sample with deleteAll function.
* Update README.md with deleteAll function.
* Add a section to README.md on clearing store entries.
* Rewrite tests without mocking. Move test utils / helpers to a single package.
* Code formatting and cleanups.
* Use StoreResponse.Data instead of DataWithOrigin in ClearAllStoreTest and ClearStoreByKeyTest.
* Simplified samples. Refactor tests.
* Gradle 6.1.1.