* [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>
Verifying that the channel is properly removed when the downstream flow is cancelled.
Signed-off-by: lukisk <luki.sk@gmail.com>
Signed-off-by: lukisk <luki.sk@gmail.com>
* Revert "Remove unnecessary FlowPreview & ExperimentalCoroutinesApi annotations. These are not needed with newer versions of Kotlin. (#289)"
This reverts commit 61b8cb0633.
* Fix missing experimental annotations
* 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>
* 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>
* 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
* [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
* Properly implement multicast closing
This PR defines the behavior of Multicast Flow.
Previously, it could crash if new observers are added to the
multicaster or if it is closed while there is an active
collector. Now, both of these operations complete without
an error. Collecting on a closed multicaster receives 0
values and closes immediately.
Fixes: #45
Test: ChannelManagerTest, MulticastTest
* remove empty line to fix lint error
* improve tests
* Add kotlin plugin to cache module
* Remove custom accessors in StoreDefaults as default values are effectively constant.
* Update JUnit to 4.13 RC2 to enable asserting specific error message on expected exception.
* Remove custom accessors in MemoryPolicy as all values are calculated from constants.
* Remove checkstyle and pmd as the codebase will be 100% Kotlin.
* Fix IDE warning in build.gradle by removing static imports.
* Remove unused guava dependencies.
* Improve StoreDefaults docs.
* Failing test for downstream closing w/o ack
Add test case that fails when a downstream closes w/o acking the message
and indefinitely suspending the stream for other active downstreams
Issue: #41
* add test with buffer
* ack latest message when a new upsteam arrives
Previously, a new downstream would be suspended on the ack of
messages that arrived before it, even when buffer is 0.
This PR changes that behavior such that if there is no buffer,
we ack latest message immediately so that new downstream can
get values instead of waiting for values that it'll never receive
* re-apply ktlint
* Have ChannelManager delegate to an actor rather then implementing one
* update documentation
* Update multicast/src/main/kotlin/com/dropbox/flow/multicast/ChannelManager.kt
* Clean up ChannelManager's interface to make it easier to add more tests (and add them)
Main changes:
* ~`ChannelManager` no longer inherits from `StoreRealActor` but rather
delegates to one.~ - Moved to followup PR
* messages coming from the upstream were placed under `Message.Dispach`
rather than `Message`. These are the only messages accepted from outside
`ChannelManager`
* `ChannelManager` now only exposes `plusAsign`, `minusAsign` for
adding/removing channels, close for closing and send(msg, Message.Dispatch)
for upstream events
* `SharedFlowProducer` no longer has a back dependency on
`ChannelManager`, rather it accepts a `suspend (Message.Dispatch) ->
Unit`
* `ChannelManager` is now built with the upstream flow rather than a
flow factory. Given that a flow is stateless, passing in a flow that can
be re-consumed seems like the simpler API.
* New `ChannelManager` tests
* make changes to existing test minimal
* revert actor delegation to reduce PR size
* comments
* clean up tests
* Bump travis
* lint
* rename `channelManagerInbox` ->``sendUpsteamMessage`
* Fix multiple collections on Multicast
Multicast implementation had a bug where the returned flow could
not be collected multiple times as it was using the same channel
it created when was called.
This PR changes it to create per collection to avoid this issue.
I've also replaced function with a field as there
is no reason to keep creating a new one, it can be just a flow
Test: MultiplexTest#multipleCollections
Fixes: #26
* remove create function