From b364fbd0bc360294e0eb9912e26e9e071dc480fc Mon Sep 17 00:00:00 2001 From: Kimo Knowles Date: Thu, 7 Dec 2023 19:27:46 +0100 Subject: [PATCH] Trace the completion of a dispatch-sync with a new :sync op-type For https://github.com/day8/re-frame-10x/issues/263 --- docs/releases/2023.md | 8 +++++++- src/re_frame/router.cljc | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/releases/2023.md b/docs/releases/2023.md index aa583986e..39be7e120 100644 --- a/docs/releases/2023.md +++ b/docs/releases/2023.md @@ -6,6 +6,12 @@ > The re-frame [Clojars page](https://clojars.org/re-frame/) contains dependency coordinates for Maven/deps/Lein. +## 1.4.1 (2023-11-02) + +#### Added + + - `dispatch-sync` now emits a `:sync` trace to indicate when it has finished. See [re-frame-10x#165](https://github.com/day8/re-frame-10x/issues/165) + ## 1.4.0 (2023-11-02) #### Breaking @@ -14,7 +20,7 @@ #### Added - Interceptors now have an optional `:comment` key. It's a no-op. - - `re-frame.std-interceptors/path` now remembers the path it uses in a `:comment`. ((re-frame-10x#165)[https://github.com/day8/re-frame-10x/issues/165]) + - `re-frame.std-interceptors/path` now remembers the path it uses in a `:comment`. ([re-frame-10x#165](https://github.com/day8/re-frame-10x/issues/165)) - `re-frame.alpha` namespace, for testing proposed features (see [flows](https://github.com/day8/re-frame/discussions/795) and [polymorphic subscriptions](https://github.com/day8/re-frame/issues/680#issuecomment-1676487563)) #### Changed diff --git a/src/re_frame/router.cljc b/src/re_frame/router.cljc index 9badbe97a..9caddc607 100644 --- a/src/re_frame/router.cljc +++ b/src/re_frame/router.cljc @@ -236,4 +236,5 @@ [event-v] (handle event-v) (-call-post-event-callbacks event-queue event-v) ;; slightly ugly hack. Run the registered post event callbacks. + (trace/with-trace {:op-type :sync}) nil) ;; Ensure nil return. See https://github.com/day8/re-frame/wiki/Beware-Returning-False