Skip to content

Releases: KStateMachine/kstatemachine

KStateMachine v.0.38.1

Choose a tag to compare

@nsk90 nsk90 released this 17 Jun 18:14

Fix createStateMachineBlocking is not visible in IDE in commonMain

Full Changelog: v0.38.0...v0.38.1

KStateMachine v.0.38.0

Choose a tag to compare

@nsk90 nsk90 released this 16 Jun 16:23

Added autoTransition support, triggers automatically on state entry with optional delay.
Improve joinTransition interface (breaking change)

Full Changelog: v0.37.0...v0.38.0

KStateMachine v.0.37.0

Choose a tag to compare

@nsk90 nsk90 released this 09 Jun 07:15

This is update has several api updates bug fixes and dependency upgrades.

  • Update Kotlin to 2.3.21

  • Fix PlantUml parser by exporting parallel transitions inside the regions

  • Enable showEventLabels export flag by default

  • Add active states (configuration) persistence support with captureSavedStateConfig() & restoreBySavedStateConfig()

  • Add Join UML's pseudo state implementation with joinTransition()

  • Add more flexible NonBlankNamesRequirement creation arg instead of Boolean flag

  • Fix multiple Choice states in parallel regions usecase

  • Fix undo operation for multi-target transition

  • Add findTransition() & requireTransition() overloads to look up transition by Event instance (allows inheritance and matchers support)

  • Add asyncScopedAction() method, to run parallel work in a scope of a state

  • Improve Docs

  • Add more samples

  • Implemented Intellij IDEA plugin for state machine visualization (will be published soon) https://github.com/KStateMachine/kstatemachine-intellij-platform-plugin

Full Changelog: v0.36.0...v0.37.0

KStateMachine v.0.36.0

Choose a tag to compare

@nsk90 nsk90 released this 23 Jan 09:03

Update development dependencies
Use Kotlin 2.3.0
Set kotlin languageVersion to 2.0
Add TransitionParams::isStartTransition extension to check if the transition is a result of StateMachine initialization or explicit outside event transition.
Check the Dispatcher type in createStateMachine method. Throw exception if detecting common multithreaded dispatcher.
This check can be muted by new CreationArguments::skipCoroutineScopeValidityCheck flag.

What's Changed

Full Changelog: v0.35.0...v0.36.0

KStateMachine v.0.35.0

Choose a tag to compare

@nsk90 nsk90 released this 25 Oct 20:26

What's Changed

New Contributors

Full Changelog: v0.34.2...v0.35.0

KStateMachine v.0.34.2

Choose a tag to compare

@nsk90 nsk90 released this 12 Aug 19:15

What's Changed

  • Fix: KMP dependency resolution for native and Wasm targets by @mmkolpakov in #120

New Contributors

Full Changelog: v0.34.1...v0.34.2

KStateMachine v.0.34.1

Choose a tag to compare

@nsk90 nsk90 released this 09 Aug 12:36

Downgrade jdkVersion back to 17

Full Changelog: v0.34.0...v0.34.1

KStateMachine v.0.34.0

Choose a tag to compare

@nsk90 nsk90 released this 09 Aug 08:56

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 for DataState now will be called in case of implicit state activation, allowing to intercept data from event in such case. See isImplicitActivation flag in DataExtractor::extract method.
    This is also ABI breaking change.

  • Added new MutableDataState state type. It acts exactly the same way like DataState before, but allows to mutate the data manually with setData method. This is less strict, but more flexible then DataState which data can be updated only by transition.

  • Add native platforms support. This adds new output artefacts for linuxX64, mingwX64, macosX64 and macosarm64

  • Update all used libraries and tools to actual versions. Updated Kotlin to 2.2.0, JDK to build project to 21.

  • Updated publication process to maven central as the old one was deprecated by Sonatype, please open an Issue if you having some problems with getting artefacts from maven repo.

  • Add MutableDataState by @nsk90 in #119

Full Changelog: v.0.33.0...v0.34.0

KStateMachine v.0.33.0

Choose a tag to compare

@nsk90 nsk90 released this 16 Dec 16:36

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

Choose a tag to compare

@nsk90 nsk90 released this 23 Oct 18:54

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