This release is functionally identical to 1.2.0 but has some tweaks that makes the internals of the input system much more robust.
In other words, there's no urgency to update, but there should be no harm, either.
Background
For users, Kotter 1.2.0 works just fine. But there are a handful of milliseconds where the input system takes some time to hook itself up - some tricky coroutine / flow setup. Again, humans using your kotter application would never notice this!
But if you're trying to write tests that send keypresses at tremendously fast rates, then they might sneak a few keypresses in that were getting dropped very occasionally.
After spending a week investigating this, we now have an implementation system under the hood that is much more robust, so even blazingly fast tests shouldn't be able to sneak keypresses past it. Despite this benefit, the code is actually slightly more straightforward than it was before.
At the same time, there is an additional benefit where Kotter section
s will now only pay for the cost of handling input if that section is using input APIs (such as input
, onKeyPressed
, etc.).
Before, the first section you ran that used an input API would spin up some state that would remain alive for the remainder of your application. This is nothing significant that any application should ever worry about, but still, from a technical perspective, the lifecycle of input state is now a lot more sensible (and the code easier to reason about).
Thanks
Huge thanks to users @Nereboss and @phanlezz. After reporting #114, which raised an issue about occasional flakes they were seeing in tests (side note: awesome effort by these developers to write such comprehensive tests!), both users showed a ton of patience and understanding as it took me a long time to both figure the issue out and even get time to look into it deeply in the first place.
They provided excellent repro examples and were very active in coordinating on the issue thread.
Check out their GitHub project, Codecharta! It's extremely well tested!
Thanks to these two developers, I feel so much better about Kotter's input system now.
Full Changelog: v1.2.0...v1.2.1