Skip to content

Update orbitMVI to v12#43

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/major-orbitmvi
Open

Update orbitMVI to v12#43
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/major-orbitmvi

Conversation

@renovate

@renovate renovate Bot commented May 18, 2023

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
org.orbit-mvi:orbit-viewmodel 4.6.112.0.0 age confidence
org.orbit-mvi:orbit-core 4.6.112.0.0 age confidence

Release Notes

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

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-3-SNAPSHOT

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

v8.0.0

Compare Source

What's Changed
Breaking changes

The old testing framework has been deprecated for a long while. The time has come to prune it from the library.

In case your project is still using old style tests, use https://github.com/orbit-mvi/orbit-mvi/tree/7.2.0 until your tests are migrated to the new test style.

Alternatively, you can copy the testing classes from https://github.com/orbit-mvi/orbit-mvi/tree/7.2.0 into your project to unlock the upgrade to 8.0.0 and beyond. Please note no support will be provided for the old testing framework.

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

v7.2.0

Compare Source

What's Changed

Full Changelog: orbit-mvi/orbit-mvi@7.1.0...7.2.0

v7.1.1

Compare Source

What's Changed
New Contributors

Full Changelog: orbit-mvi/orbit-mvi@7.1.0...7.1.1

v7.1.0

Compare Source

What's Changed

Full Changelog: orbit-mvi/orbit-mvi@7.0.1...7.1.0

v7.0.1

Compare Source

What's Changed
  • Exposed option to alter side effect buffer size

Full Changelog: orbit-mvi/orbit-mvi@7.0.0...7.0.1

v7.0.0

Compare Source

What's Changed
New Contributors

Full Changelog: orbit-mvi/orbit-mvi@6.1.1...7.0.0

v6.1.1

Compare Source

What's Changed

Full Changelog: orbit-mvi/orbit-mvi@6.1.0...6.1.1

v6.1.0

Compare Source

This is a maintenance release. We've made some (non-breaking) changes to the new tests API to clean it up a little.

What's Changed
New Contributors

Full Changelog: orbit-mvi/orbit-mvi@6.0.0...6.1.0-SNAPSHOT

v6.0.0: New test framework stable

Compare Source

Description
New testing framework

The new testing framework has been proved in a real project, tested, cleaned up and released as Stable!

Check out the documentation here:
https://orbit-mvi.org/Test/new

The old testing framework is now deprecated and will be removed in 7.0.0, as we want to encourage the transition.

OnCreate changes

The onCreate lambda is now an intent to improve consistency and enable improved testing functionality.

Deprecated functions removed

Some variants of test livetest and container have been removed.

Functional changes
  • Old testing framework deprecated - this is the last major version to support the old testing framework.
  • New testing framework promoted to stable 🎉
  • [BREAKING] onCreate lambda in container factory functions is now an implicit intent. This creates more consistency in the APIs and supports new test functionality.
  • [BREAKING] intent now returns a coroutine Job
  • New testing framework changes:
    • runOnCreate and invokeIntent now return a coroutine Job to allow us to join or cancel the job for that intent in tests.
    • [BREAKING] At the end of the test, the framework checks if all in progress intents are finished, fails otherwise.
  • [BREAKING] Removed some of the deprecated test, liveTest and container functions
What's Changed
New Contributors

Full Changelog: orbit-mvi/orbit-mvi@5.0.0...6.0.0

v5.0.0: Dependency updates

Compare Source

Notable changes:

Below are potentially breaking changes depending on your project setup:

  • Kotlin version bumped to 1.8.21
  • Coroutines version bumped to 1.7.1
  • Java version bumped to 11
What's Changed

Full Changelog: orbit-mvi/orbit-mvi@4.6.1...5.0.0


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 force-pushed the renovate/major-orbitmvi branch from 5acaf20 to f11a482 Compare May 18, 2023 12:50
@renovate renovate Bot changed the title Update orbitMVI to v5 (major) Update orbitMVI to v6 (major) May 18, 2023
@renovate
renovate Bot force-pushed the renovate/major-orbitmvi branch from f11a482 to 9b61a22 Compare September 19, 2023 19:35
@renovate
renovate Bot force-pushed the renovate/major-orbitmvi branch from 9b61a22 to 1eb9f5c Compare February 29, 2024 19:19
@renovate
renovate Bot force-pushed the renovate/major-orbitmvi branch from 1eb9f5c to 27832f8 Compare March 22, 2024 14:57
@renovate renovate Bot changed the title Update orbitMVI to v6 (major) Update orbitMVI to v7 (major) Mar 22, 2024
@renovate
renovate Bot force-pushed the renovate/major-orbitmvi branch from 27832f8 to 4f46c87 Compare March 26, 2024 12:23
@renovate
renovate Bot force-pushed the renovate/major-orbitmvi branch from 4f46c87 to 64cc6c2 Compare April 22, 2024 17:47
@renovate
renovate Bot force-pushed the renovate/major-orbitmvi branch 2 times, most recently from 6d2ed1a to c25ec55 Compare May 23, 2024 09:45
@renovate renovate Bot changed the title Update orbitMVI to v7 (major) Update orbitMVI to v8 (major) May 23, 2024
@renovate
renovate Bot force-pushed the renovate/major-orbitmvi branch from c25ec55 to 25db208 Compare July 7, 2024 20:54
@renovate renovate Bot changed the title Update orbitMVI to v8 (major) Update orbitMVI to v9 (major) Jul 7, 2024
@renovate
renovate Bot force-pushed the renovate/major-orbitmvi branch from 25db208 to 97691aa Compare May 23, 2025 11:54
@renovate renovate Bot changed the title Update orbitMVI to v9 (major) Update orbitMVI to v10 (major) May 23, 2025
@renovate
renovate Bot force-pushed the renovate/major-orbitmvi branch from 97691aa to 18a0951 Compare November 8, 2025 12:32
@renovate renovate Bot changed the title Update orbitMVI to v10 (major) Update orbitMVI to v11 (major) Nov 8, 2025
@renovate renovate Bot changed the title Update orbitMVI to v11 (major) Update orbitMVI to v11 May 12, 2026
@renovate
renovate Bot force-pushed the renovate/major-orbitmvi branch from 18a0951 to da34ac1 Compare July 13, 2026 20:51
@renovate renovate Bot changed the title Update orbitMVI to v11 Update orbitMVI to v12 Jul 13, 2026
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