Update orbit to v12 - #285
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/major-orbit
branch
from
August 28, 2026 13:13
25cd113 to
edf29f1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
11.0.0→12.0.111.0.0→12.0.1Release Notes
orbit-mvi/orbit-mvi (org.orbit-mvi:orbit-compose)
v12.0.1Compare Source
Full Changelog: orbit-mvi/orbit-mvi@12.0.0...12.0.1
Thank you for suggestions and contributions ❤️ :
v12.0.0Compare Source
One container host to rule them all
The headline change in this release is the unification of Orbit's container host API. Until now, external state support lived in a parallel universe of types:
ContainerHostsat alongsideContainerHostWithExternalState,ContaineralongsideContainerWithExternalState, and each pair dragged its own set of factory functions and extensions across the core, compose, viewmodel and test modules. Choosing to separate your internal and external state meant switching to an entirely different interface hierarchy, and the duplication made every feature twice as expensive to build and document.That split is now gone. A single
OrbitContainerHost<INTERNAL_STATE, EXTERNAL_STATE, SIDE_EFFECT>interface (backed by a matchingOrbitContainer) covers both cases. A host that doesn't need the separation simply uses the same type for both state parameters —OrbitContainerHost<MyState, MyState, MySideEffect>— while a host that wants to keep a rich internal model and expose a lean UI-facing state declares two different types and supplies a transform to the neworbitContainer(initialState, transformState)factory. Thecontainer()factory functions onCoroutineScopeandViewModelhave been renamed toorbitContainer()to match.We decided to add the
Orbitprefix to main library types, as the historical ones were too generic and this planned unification gave us a good opportunity to fix this.Migration should be painless: the old names survive as deprecated typealiases with
ReplaceWithguidance, so existingContainerHost<S, SE>code compiles unchanged and the IDE can rewrite it for you. ThewithExternalStateextension is deprecated in favour of the unified factory, and in the test moduletest()is deprecated in favour oftestWithInternalState()andtestWithExternalState(), whose assertion methods now say which state they mean (awaitInternalState(),expectExternalState(), and so on). The documentation has been rewritten around the unified API.The unified path also picked up two correctness fixes along the way. Subscribing to a container's external state flows now triggers
onCreate, which previously only fired for internal state and side effect subscriptions — despite the external flows being exactly what UI consumers collect. AndtestWithExternalStatenow seeds the initial external state correctly for hosts still built with the deprecatedwithExternalState, where it previously resolved the wrong transform and failed with aClassCastException.Side effect delivery modes
Side effects have historically assumed a single observer. This release introduces a
SideEffectModesetting with three delivery strategies:FAN_OUT, the default, preserves the existing channel-based behaviour where each effect goes to exactly one consumer;FAN_OUT_STRICTdoes the same but throws if a second consumer ever attaches, turning a silent misconfiguration into a loud one; and the experimentalBROADCASTdelivers every effect to all active consumers and has a cache that holds effects while no one is listening with the same lossless backpressure as fan-out.Configuring containers globally
Orbit.configureDefaults { }lets you set default container settings once at app startup instead of repeating them at everyorbitContainer()call, with per-container settings still taking precedence. Relatedly, the dispatcher settings (eventLoopDispatcher,intentLaunchingDispatcher) are now factories of type() -> CoroutineDispatcher, invoked once per container — so an expression likeDispatchers.Default.limitedParallelism(1)in the global defaults gives each container its own dispatcher view rather than one shared app-wide. If you set these directly, wrap the value in a lambda.Operators
runOnandsubIntenthave graduated to stable API and no longer require opting in to@OrbitExperimental. Joining them is the new experimentalawaitRunOn<T>, designed for sealed-class states: whererunOnreturns immediately if the current state doesn't match,awaitRunOnsuspends until the state becomes the requested subtype and then runs its block — handy for logic that should kick in once aLoadingstate resolves toReady. Thank you to @rubixhacker for the proposal and implementation.Documentation
The docs website gained a version selector generated from release tags, so the site root always serves the docs for the latest release while unreleased documentation is published under
/next/.Detailed Changes
New Contributors
Full Changelog: orbit-mvi/orbit-mvi@11.0.0...12.0.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.