From 0bf956d6606572fefb4c7014f648e7020ff0e9e5 Mon Sep 17 00:00:00 2001 From: Nikita Gazarov Date: Sun, 14 Jan 2024 18:16:58 -0800 Subject: [PATCH] Build: Bump Airstream version --- project/Versions.scala | 2 +- website/blog/2023-12-04-laminar-v17.0.0.md | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/project/Versions.scala b/project/Versions.scala index 8b9e3f48..8a3484f0 100644 --- a/project/Versions.scala +++ b/project/Versions.scala @@ -8,7 +8,7 @@ object Versions { // -- Dependencies -- - val Airstream = "17.0.0-M2" + val Airstream = "17.0.0-M6" val Ew = "0.2.0" diff --git a/website/blog/2023-12-04-laminar-v17.0.0.md b/website/blog/2023-12-04-laminar-v17.0.0.md index bc3ed17f..10d59343 100644 --- a/website/blog/2023-12-04-laminar-v17.0.0.md +++ b/website/blog/2023-12-04-laminar-v17.0.0.md @@ -143,6 +143,16 @@ After some struggles, I've fixed this bug, and the code above now works as expec To help **migration**, I published Airstream version `17.0.0-M1` that contains this one fix, and nothing else from v17. It is binary compatible with Airstream v16.0.0, so you can add it to your project, and test with it to make sure that it does not break anything, before upgrading to 17.0.0. Note that this is Airstream only, Laminar has no such version. Use `sbt evicted` to make sure that Airstream `17.0.0-M1` is actually selected. +### Fix Transaction Stack Overflow + +Airstream's old Transaction code was not stack safe. It is now. + +I also added a (configurable) limit to how deep you can nest transactions (`Transaction.maxDepth`). It defaults to 1000, and you should never hit it unless you have an infinite loop of transactions (e.g. two Var-s updating each other with no filter). If you do hit the limit, it will prevent the execution of the offending transaction (thus breaking the loop), report a `TransactionDepthExceeded` error into Airstream's unhandled errors, and proceed with the rest of your code. + +**Migration:** no action needed unless you actually run into this error. You may want to check deeply nested or recursive code, but it's unlikely that you're hitting this limit yet don't hit the higher but still finite JS runtime stack depth with Airstream 16. + +See [Airstream#115](https://github.com/raquo/Airstream/issues/115) and [Laminar#116](https://github.com/raquo/Laminar/issues/116). + ## Smaller Laminar Improvements