Fork me on GitHub

New version of re-frame-trace with a bunch of new stuff:


Many thanks to @danielcompton. ^^^ We're starting to get closer to the vision with re-frame-trace. Now is the time to try it, if you haven't already. Please send feedback.


hi, i just updated my deps for re-frame-trace 0.1.17 and getting this error now:


Failed to compile "clj/server/resources/public/js/nextjournal.js" in 15.423 seconds.
----  Could not Analyze  clj/server/resources/public/js/compiled/out/editor/mranderson047/garden/v1v3v3/garden/color.cljc  ----

  java.lang.ClassNotFoundException: garden.types.CSSAtRule, compiling:(mranderson047/garden/v1v3v3/garden/util.cljc:1:1)

----  Analysis Error : Please see clj/server/resources/public/js/compiled/out/editor/mranderson047/garden/v1v3v3/garden/color.cljc  ----


anybody else having similar issues?


same issue here


@philippmarkovics @manuel daniel will have gone to bed. 2am in New Zealand. So probably no progress on this till tomorrow.


no problem, of course


In his release notes he does note: > The version of Garden that re-frame-trace uses is now bundled as a source dependency so you should no longer get conflicts if you use Garden 2.


So, something has happened with Gargen


Can you provide details for the version of Garden you are using (if any) in your app


no explicit use of Garden on my side


Which version of the clojurescript compiler are you using?


Also, did you also upgrade to re-frame 0.10.4?


Thanks! I’ll try it out later today!


Hi all, I have a general question about concurrency and db changes due to events. I'm thinking of something like a general submit event:

(f/reg-event-fx :submit
  (fn [db _]
    (let [selection (get db :some/selection)]
      {:request {:remote [:remote/event selection]
                 :cb [:event/success]}})))
Here, a :submit event was triggered, and it reads the selection from app state (presumably selection happened in a separate event). Is it possible for a race condition to occur where some other events mutates the value of the db, possibly changing the :some/selection, before this event is processed?


I know changes to ratoms are synced across requestAnimationFrames, so that two events that are processed at the same time are likely to see the same value of db, regardless of which one gets processed first, but I don't have enough insight into the internals re-frame to really know the implications in practice.


@zalky Events are processed serially, one at a time. Everyting about an event, including the event handler itself and any associated effects handlers will be finished before the next event is proccessed.


@mikethompson: ok, so given two events processed serially, if the first makes any mutations on app state, the second is guaranteed to see it? I think I may have confused reactions being synched across animation frames, with ratoms.


@zalky The answer to your question is "yes".


I add this info graphic recently ... it doesn't directly answer your question ... but it may help


@mikethompson, thanks, that's super interesting. The graph gives the impression that there is one window during the react cycle where events can be queue for dispatch, after which, they must wait until after the next animation? Or are there multiple blue/green sequences before the purple view one?


Awesome, that is a great doc string.


I'm getting a new error that I'm not sure where to start dealing with The error message is No protocol method IAssociative.-assoc defined for type cljs.core/LazySeq:. I'm trying to grab a vector from my app-db and assoc a new value at an index position. Here's a snippet from my reg-event-db function

(assoc db 
:works (assoc [1 2 3] 2 "hooray")
:nope (assoc (get-in db [:app :services]) 1 "boo"))
Any ideas?


Looks like what you think is a vector is actually a lazy seq


It's an easy mistake to make, using a sequence function on a vector and thinking you've still got a vector


As a workaround/to make sure that's the mistake you can try something like (assoc (vec (get-in db [,,,])) 1 "foo")


@madstap: Fantastic, thanks! I was going down other rabbit holes and didn't consider that at all