* [Temp] Remove all modules
* Remove references to Store 4
* Update CHANGELOG
* Update README
* Add Store 5 foundation
Co-authored-by: Andre Claßen <aclassen@users.noreply.github.com>
Co-authored-by: Mike Nakhimovich <mnakhimovich@Mikes-MBP.localdomain>
* Latest is 0.8.0, but 0.4.0 works. Starts to break at 0.5.0.
* Kotlin Atomic Plugin working with 0.14.4
* Atomic Kotlin Plugin working with 0.15.0
* Atomic Kotlin Plugin working with 0.15.1
* Upgrade Gradle Wrapper to 7.4.1
* AGP 4.1.0 -> 4.2.0
* AGP 4.2.0 -> 7.0.2
* AGP 7.0.2 -> 7.1.2
* Kotlin 1.6.10 and Spotless Plugin 6.3.0 Upgrade
* WARNING:The specified Android SDK Build Tools version (29.0.3) is ignored, as it is below the minimum supported version (30.0.3) for Android Gradle Plugin 7.1.2.
* Using --rerun-tasks instead of clean.
* KT Lint formatting update.
Co-authored-by: Sam Edwards <samedwards@dropbox.com>
This should still maintain compatiblity with Kotlin 1.4 and 1.5 whilst also ensuring forward compatiblilty with Kotlin 1.6.
Compatibility with 1.4-M3 should be safe to drop.
* Revert "Remove unnecessary FlowPreview & ExperimentalCoroutinesApi annotations. These are not needed with newer versions of Kotlin. (#289)"
This reverts commit 61b8cb0633.
* Fix missing experimental annotations
* update coroutines to 1.4.0, kotlin to 1.4.0
This CL updates coroutines to 1.4.0, kotlin to 1.4.10 and
also removes the only usage of ConflatedBroadcastChannel
(in SOTWithBarrier) with MutableStateFlow.
* expand SOTWithBarrier failure test
This change improves the failure test case to ensure it continues
for future writes
* Revert to using guava port cache by depending on jar
* Apply suggestions from code review
* revert code to old cache
* clean up build.gradle
* manually remove cache4 entries that are regenerated locally because of some dirty cache?
* bump gradle
* rerun tasks
* try to deflake rx tests
* cache builder tests
* api dump
* bump ktlint to work with 1.4 features
* formatting
Co-authored-by: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
It currently breaks consumers compiling with Kotlin
1.4-M3 (not sure why).
Added some TODOs to revert back to using Duration.INFINITE
once Store is compiled with Kotlin 1.4
Closes#188
* reproduce #177 and fix reader errors
* dispatch write errors to receiver
Now source of truth can unblock reader while also letting them
know that an error happened while writing. This forces readers
to first dispatch the error then whatever data they have.
I've also added new public WriteException/ReadException classes
to SourceOfTruth so that it is easy to diagnose these problems
when it hits to the developer's code
* Move Fetcher factories into companion
Fetcher factories were global methods, which made them hard
to discover since IDE cannot easily auto-complete.
This PR moves them into the companion of Fetcher while also
making Fetcher a real interface instead of a typealias.
Even though it is a bit more code for the developer, now they
can easily discover how to create a Fetcher by typing Fetcher.
Fixes: #167
* make rx methods start w/ from too for consistency
* Rename fether factories to be more clear, hopefully :/
* remove fetch method, use invoke instead
* Make Fetcher.from the one that receives a suspend fun.
Create Fetcher.fromFlow for the flowing version.
Rename both SourceOfTruth builder methods to . Rely on param names to disambiguate
* use .of instead, this seems better to me.
We should probably get rid of StoreBuilder.from and make it
Store.builder()
* fix jvm name for SourceOfTruth.of with flow function
* fix RxSourceOfTruth name to match original class
* specify bounds for FactoryFetcher
* updates per PR review
* update graph per SoT rename
* update rxjava3 APIs as well
These appeared after i rebased, missed them completely.
Also fixed some tests, appearantly IJ parameter name refactor does
not always work
* supress wrong unnecessary cast warning
without this, multicaster cannot resolve to the base StoreResponse type
* upgade gradle, try to fix build by disabling caching
* split subscribers
* resubscribe
Co-authored-by: miken <miken@dropbox.com>
Co-authored-by: miken <miken@dropbox.com>
* 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>
* 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
* 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>
* [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 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.
* Change flow collection util to drain the flow
This PR changes the assertItems util method in tests to drain the
flow to ensure we don't produce unwated items.
* reformat code
* Use a test subject for flow assertions
* update test subject messsages, add tests for it (so meta :p)
* Apply suggestions from code review
Co-Authored-By: Eyal Guthmann <eyalgu@users.noreply.github.com>
* fix code style
* Don't try to get exception unless collection finished
This fixes a bug in FlowSubject where it would try to get the cancelation
exception from an unfinished job. Also added a test.
Co-authored-by: Eyal Guthmann <eyalgu@users.noreply.github.com>