Skip to content

Update orbit to v12 - #49

Open
renovate[bot] wants to merge 1 commit into
developfrom
renovate/major-orbit
Open

renovate[bot] wants to merge 1 commit into
developfrom
renovate/major-orbit

Conversation

@renovate

@renovate renovate Bot commented Jul 5, 2024 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
org.orbit-mvi:orbit-viewmodel 8.0.0 → 12.0.1 age confidence
org.orbit-mvi:orbit-compose 8.0.0 → 12.0.1 age confidence
org.orbit-mvi:orbit-core 8.0.0 → 12.0.1 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

orbit-mvi/orbit-mvi (org.orbit-mvi:orbit-viewmodel)

v12.0.1

Compare Source

  • Add orbitContainer factories with types inferred from OrbitContainerHost (#​348)
  • Add public awaitItem() to the new test contexts (#​343) (#​344)
  • Fix coroutine resource leaks and CancellationException handling (#​345)
  • Replace Unconfined produce with completion handler for idling teardown (#​346)

Full Changelog: orbit-mvi/orbit-mvi@12.0.0...12.0.1

Thank you for suggestions and contributions ❤️ :

v12.0.0

Compare 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: ContainerHost sat alongside ContainerHostWithExternalState, Container alongside ContainerWithExternalState, 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 matching OrbitContainer) 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 new orbitContainer(initialState, transformState) factory. The container() factory functions on CoroutineScope and ViewModel have been renamed to orbitContainer() to match.

We decided to add the Orbit prefix 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 ReplaceWith guidance, so existing ContainerHost<S, SE> code compiles unchanged and the IDE can rewrite it for you. The withExternalState extension is deprecated in favour of the unified factory, and in the test module test() is deprecated in favour of testWithInternalState() and testWithExternalState(), 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. And testWithExternalState now seeds the initial external state correctly for hosts still built with the deprecated withExternalState, where it previously resolved the wrong transform and failed with a ClassCastException.

Side effect delivery modes

Side effects have historically assumed a single observer. This release introduces a SideEffectMode setting with three delivery strategies: FAN_OUT, the default, preserves the existing channel-based behaviour where each effect goes to exactly one consumer; FAN_OUT_STRICT does the same but throws if a second consumer ever attaches, turning a silent misconfiguration into a loud one; and the experimental BROADCAST delivers 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 every orbitContainer() 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 like Dispatchers.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

runOn and subIntent have graduated to stable API and no longer require opting in to @OrbitExperimental. Joining them is the new experimental awaitRunOn<T>, designed for sealed-class states: where runOn returns immediately if the current state doesn't match, awaitRunOn suspends until the state becomes the requested subtype and then runs its block — handy for logic that should kick in once a Loading state resolves to Ready. 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

v11.0.0: Orbit internal/external state support

Compare Source

We added a new ContainerHostWithExternalState to support mapping internal ContainerHost states into something more easily consumed by UIs :)

What's Changed
New Contributors

Full Changelog: orbit-mvi/orbit-mvi@10.0.0...11.0.0-SNAPSHOT

v10.0.0

Compare Source

New features
  • Support for all Kotlin Multiplatform platforms.
  • ViewModel Multiplatform and Compose Multiplatform support, with a new Compose Multiplatform sample app.
  • expectStateOn to better support sealed class state testing
API changes
orbit-core
  • [Breaking] blockingIntent is now an extension function.
orbit-compose
  • [Breaking] Removed deprecated collectState from ContainerHostExtensionsKt
orbit-test
  • Initial state is now automatically asserted in tests, deprecating expectInitialState(). TestSettings.autoCheckInitialState can be used to override this behaviour.
  • expectStateOn added.
orbit-viewmodel
  • Added kotlinx serializable for savedstatehandle support
What's Changed

Full Changelog: orbit-mvi/orbit-mvi@9.0.0...10.0.0

v9.0.0

Compare Source

What's Changed

Full Changelog: orbit-mvi/orbit-mvi@8.0.0...9.0.0

Breaking changes

Syntax extension functions have been pulled up to reduce internal complexity and open up new functionality, such as reified types on runOn.

Migration guide
API Pre-9.0.0 9.0.0 Action to take
class SimpleSyntax org.orbitmvi.orbit.syntax.simple.SimpleSyntax Renamed to org.orbitmvi.orbit.syntax.Syntax Search and replace imports and usages
class SimpleContext org.orbitmvi.orbit.syntax.simple.SimpleContext Renamed to org.orbitmvi.orbit.syntax.IntentContext Search and replace imports and usages
extension function ContainerHost.intent org.orbitmvi.orbit.syntax.simple.intent Moved into ContainerHost interface Remove import
extension function ContainerHost.blockingIntent org.orbitmvi.orbit.syntax.simple.blockingIntent Moved into ContainerHost interface Remove import
extension function ContainerHost.subIntent org.orbitmvi.orbit.syntax.simple.subIntent Moved into ContainerHost interface Remove import
extension function SimpleSyntax.postSideEffect org.orbitmvi.orbit.syntax.simple.postSideEffect Moved into Syntax class Remove import
extension function SimpleSyntax.reduce org.orbitmvi.orbit.syntax.simple.reduce Moved into Syntax class Remove import
extension function SimpleSyntax.repeatOnSubscription org.orbitmvi.orbit.syntax.simple.repeatOnSubscription Moved into Syntax class Remove import
extension function SimpleSyntax.runOn org.orbitmvi.orbit.syntax.simple.runOn Moved into Syntax class Remove import
extension function SimpleSyntax.runOn runOn(ExampleState.Ready::class) Uses reified type parameter now runOn<ExampleState.Ready> Search and replace

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot changed the title Update orbit to v9 (major) fix(deps): update orbit to v9 (major) Jul 10, 2024
@renovate renovate Bot changed the title fix(deps): update orbit to v9 (major) Update orbit to v9 (major) Jul 12, 2024
@sebbbin
sebbbin force-pushed the develop branch 5 times, most recently from fba2d91 to 4d0dbf5 Compare July 19, 2024 18:51
@renovate
renovate Bot force-pushed the renovate/major-orbit branch from e6cb539 to 7471872 Compare December 2, 2024 12:48
@renovate
renovate Bot force-pushed the renovate/major-orbit branch from 7471872 to c4cb25a Compare May 23, 2025 13:16
@renovate renovate Bot changed the title Update orbit to v9 (major) Update orbit to v10 (major) May 23, 2025
@renovate
renovate Bot force-pushed the renovate/major-orbit branch from c4cb25a to abbd660 Compare August 10, 2025 14:56
@renovate
renovate Bot force-pushed the renovate/major-orbit branch from abbd660 to 8fccece Compare November 15, 2025 11:57
@renovate renovate Bot changed the title Update orbit to v10 (major) Update orbit to v11 (major) Nov 15, 2025
@renovate renovate Bot changed the title Update orbit to v11 (major) Update orbit to v11 May 16, 2026
@renovate
renovate Bot force-pushed the renovate/major-orbit branch from 8fccece to 46fab67 Compare July 13, 2026 18:01
@renovate renovate Bot changed the title Update orbit to v11 Update orbit to v12 Jul 13, 2026
@renovate
renovate Bot force-pushed the renovate/major-orbit branch from 46fab67 to 6698c4e Compare September 5, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants