Releases: copper-leaf/ballast
Releases · copper-leaf/ballast
0.13.1
- [BUG FIX] Fix regression in debugger, where you could not view or rollback to previous States.
0.13.0
- [BREAKING CHANGE] Renames
ballast-crashlytics
module toballast-firebase-crashlytics
- [BREAKING CHANGE] Renames
sideEffect()
tosideJob()
to be more accurate and less confusing in comparison to other Kotlin MVI libraries. - [BREAKING CHANGE]
BallastViewModel
no longer implements theSendChannel
interface, it exposes thesend
andtrySend
methods directly. It also addssendAndAwaitCompletion()
to send an Input and wait for it to completely finish processing. - [BREAKING CHANGE] The
logger
property ofBallastViewModelConfiguration.Builder
is now a function, which receives the viewModel name when built, to pass as the tag of a logger. - [BREAKING CHANGE] Moves annotations for Firebase into commonMain and renames them:
@FirebaseCrashlyticsInterceptor.Ignore
-->@FirebaseCrashlyticsIgnore
@FirebaseAnalyticsInterceptor.TrackInput
-->@FirebaseAnalyticsTrackInput
- [FUNCTIONAL CHANGE] SideJobs are now posted to the VM immediately, rather than collected and dispatched explicitly
after handling. The default implementation still requires that SideJobs are sent as the last statements of the
InputHandler
, though.- By writing a custom
InputStrategy.Guardian
, you could remove the restriction that sideJobs must be started at the end of the Input. This is dangerous and you shouldn't do it unless you really know what you're doing.
- By writing a custom
- [BUG FIX] Fixes issue where JS Debugger cannot connect because JS browser websocket clients can't send headers
- [NEW] Adds platform-specific
BallastLogger
implementations (AndroidBallastLogger
,JsConsoleBallastLogger
). The default logger ofBallastViewModelConfiguration
is stillNoOpLogger()
.
0.12.0
- Fixes issue with
inputHandler { }
andeventHandler { }
functions, which previously didn't actually send the input or event to the lambda - Move all InputHandler checks into the Guardian, so any/all of them could be thrown away by the end-user if needed
- make a dedicated
InputStrategyScope
to match the pattern of all other pluggable features
0.11.0
- Adds "time-travel debugging" to Debugger IntelliJ plugin! Inputs can now be re-sent, and you can roll back the VM state to any previous point in time
- Makes configuration a builder instead of multiple constructors
- Allow BallastViewModelImpl to access the host VM, so the user-created VM is what's sent to Interceptors
- ViewModels now clear themselves when their coroutine scope is closed, rather than having to do it manually
- Adds a basic Logging facade, so all Ballast components have easy access to a common logger
- Tighten up the overall API a bit, to be more streamlined
0.10.0
- Updates to Kotlin 1.6.10
- Fixes issue running IntelliJ plugin on Windows
- Starts improving the Interceptor API to eventually allow Interceptors to inject Inputs and restore States
0.9.0
- Finishes Debugger UI, fully exposing all states of Inputs, Events, and SideEffects
- Converts Debugger UI to an IntelliJ Plugin, instead of a standalone desktop application
- Adds a few new
BallastNotification
s, to notify of Inputs and Events being queued, but not yet processed - Fixed bug where SideEffect errors and cancellation was not being notified properly
SideEffectcope
is now also aCoroutineScope
, so you canlaunch
other coroutines directly within thesideEffect(key) { }
block without having to manually wrap it incoroutineScope { }
0.8.2
This is a major release, with lots of new features, greatly improved safety, but with several significant breaking changes, as descibed below:
- Improves side-effects
- They are now started through a Channel, instead of relying on a Mutex for safety
- New
BallastInterceptor
methods added to track sideEffect starts/errors - SideEffects (and related APIs) now require a
key
to be provided, to avoid accidental restarting cause by disparate Inputs forgetting to provide a key
- Improves safety of
ParallelInputStrategy
to prevent multiple updates, rather than just throwing an error at the end of the Input handler block if it was used incorrectly- Replaces
onCompleted
callback with aGuardian
interface, which each InputStrategy can create for itself to check accesses during the InputHandler, rather than at the end
- Replaces
- Rewrites Interceptor API
- Instead of an interface, interceptors "events" are sent as a sealed class,
BallastNotification
. These Notifications are sent to a SharedFlow inside the core ViewModel, and each Interceptor observes this SharedFlow from its own coroutine, launched in the viewModel coroutineScope
- Instead of an interface, interceptors "events" are sent as a sealed class,
- Improves Repository
Cached
DSL:- Adds
getValueOrThrow()
- Adds
getCachedOrThrow()
- Adds
- Introduces Ballast Debugger, a realtime desktop app for observing what is happening within your application's Ballast ViewModels
Full Changelog: 0.7.0...0.8.0
0.7.0
- Adds Repository module for app-wide caching and communication
0.6.0
- Improves DSL for restarting SideEffects
0.5.0
- Fixes issue with input Channel buffer that didn't do exactly what I expected