1.1.0 - Connection API revamp
#121 made us run extra checks on our connection methods and Stream turned out to not behave as expected threading-wise. We've discussed next steps and decided to deprecate the Stream interface and expose Flows instead. This decision did not come lightly because we wanted the core module to be agnostic of the internal implementation (i.e. not expose coroutines).
Our reasoning behind why we did this in the end:
- The refactoring has greatly simplified the internals.
- Previously there was a lot of tricky and hard to maintain code just to wrap internals into Stream interfaces.
- Coroutine flows are these days effectively part of the core Kotlin language. We don't gain much by hiding them.
- We want you to have control over the thread you observe on. This can be done easily with Flow
- You can turn a Flow into pretty much any preferred connection method
The change had a cascading effect through all of our connection methods which required a Streams the base connection method. A good amount of changes were required, but we have kept backwards compatibility for the next release.
Full list of changes:
- Added stateFlow and sideEffectFlow to Container. Flows are now the recommended way to connect to Orbit.