freeletics / FlowRedux

Kotlin Multiplatform Statemachine library with nice DSL based on Flow from Kotlin Coroutine's.

Home Page:https://freeletics.github.io/FlowRedux/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Idea] Generate a state transition graph in compile time

xiaozhikang0916 opened this issue · comments

commented

Since we have defined the state machine in DSL, it would be nice to have a tool to produce a graph describing how the state is moved from one to another, for quick debugging and documentation.

An implementation can be a gradle ksp plugin, collecting state machine data from AST and print PlantUML syntex.

This would be really nice to have, I've also thought about it before. An alternative approach (or additional) can also be something like http4k does https://www.http4k.org/guide/howto/self_document_systems_with_tests/ For that we'd need a runtime trace mode that would collect anything happening in the state machine so that you can use that for tests or debugging.

PlantUML would be really nice! 👍