Releases: KStateMachine/kstatemachine
KStateMachine v.0.34.2
What's Changed
- Fix: KMP dependency resolution for native and Wasm targets by @mmkolpakov in #120
New Contributors
- @mmkolpakov made their first contribution in #120
Full Changelog: v0.34.1...v0.34.2
KStateMachine v.0.34.1
Downgrade jdkVersion back to 17
Full Changelog: v0.34.0...v0.34.1
KStateMachine v.0.34.0
This release contains breaking ABI changes, API should remain compatible with older verisons.
What's Changed
- top-level DSL methods accepting lambdas were marked with
kotlin conracts
contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}
this allows to initialise variables in lambdas in some cases without using lateinit var
.
For this change I had to split some of them (taking nullable lambda) to two separate methods (with non-nullable lambda and without it at all). I expect that you don't have to change your code or imports, but this is ABI breaking change.
-
DataExtractor
forDataState
now will be called in case of implicit state activation, allowing to intercept data from event in such case. SeeisImplicitActivation
flag inDataExtractor::extract
method.
This is also ABI breaking change. -
Added new
MutableDataState
state type. It acts exactly the same way likeDataState
before, but allows to mutate thedata
manually withsetData
method. This is less strict, but more flexible thenDataState
which data can be updated only by transition. -
Add native platforms support. This adds new output artefacts for
linuxX64
,mingwX64
,macosX64
andmacosarm64
-
Update all used libraries and tools to actual versions. Updated Kotlin to
2.2.0
, JDK to build project to21
. -
Updated publication process to
maven central
as the old one was deprecated bySonatype
, please open an Issue if you having some problems with getting artefacts from maven repo.
Full Changelog: v.0.33.0...v0.34.0
KStateMachine v.0.33.0
Add ExportMetaInfo
with ResolutionHint
mechanism.
This change extends unsafe export feature capabilities. You can specify Event to perform unsafe conditional lambda calls, or specify targetStates without calling lambdas at all.
https://kstatemachine.github.io/kstatemachine/pages/export.html#export-with-unsafecallconditionallambdas-flag
Fix some bugs in export feature.
Top level transitions declared in StateMachine level were not exported.
Full Changelog: v0.32.0...v.0.33.0
KStateMachine v0.32.0
Add event recording mechanism implementation using Kotlinx.Serialization
, allowing to serialize and restore state machines 💾.
The implementation is located in new separated artefact kstatemachine.serialization
Some DSL methods like addState
, addInitialState
etc became suspendable
. This allows calling suspend functions in a moment of state machine creation if necessary, as all those DSL method has a trailing lambda as a last argument.
docs https://kstatemachine.github.io/kstatemachine/pages/persistence.html
Full Changelog: v0.31.1...v0.32.0
KStateMachine v0.31.1
Fix export output. Now it contains explicit StateMachine block (wrapping all output). This is necessary for machines with parallel child mode for instance.
Full Changelog: v0.31.0...v0.31.1
KStateMachine v0.31.0
Update Kotlin to 2.0.0
Minor fixes
Major documentation update
Full Changelog: v0.30.0...v0.31.0
KStateMachine v0.30.0
- This is a big release with several breaking changes (mostly you only have to update your imports or reorder method arguments)
- The biggest new feature of this release is an EventRecording mechanism allowing to serialise and deserialise StateMachine's configuration. See more info in docs and code comments.
- Added useful shortcut functions
processEventByAsync()
andprocessEventByLaunch()
- Add
JS
andWasmJS
platforms support (those platforms does not support blocking APIs due to lack of runBlocking support) - Improve documentation
Full Changelog: v0.27.0...v0.30.0
KStateMachine v0.27.0
KStateMachine v0.26.0
What's Changed
- Allow specify multiple target states for transitions by @nsk90 in #91
- Add Mermaid export feature by @nsk90 in #92
- Add unsafeCallConditionalLambdas flag for export feature, to allow partly export conditionally calculated transitions.
Full Changelog: v0.25.1...v0.26.0