Upgraded to the newly released re-frame 1.4.1 today and our tests started failing with this error:
File: jar:file:/root/.m2/repository/day8/re-frame/test/0.1.5/test-0.1.5.jar!/day8/re_frame/test.cljc
10:49:16
failed to require macro-ns "day8.re-frame.test", it was required by "day8.re-frame.test"
10:49:16
Error in phase :read-source
10:49:16
RuntimeException: No reader function for tag queue
anyone else seen this?Thanks for the fix, but please don't be sorry. I'm enormously grateful for all the work that you, and other open source contributors, put in. I'm not the slightest bit upset that there was a bug in the release -- that's why we have automated tests for our systems.
maybe I should make the tests for alpha features run separately somehow
I think just replacing #queue makes more sense, since it's not something you should be using outside of a reader conditional in CLJC anyway.
yeah the fix is straightforward
I also wonder why our CI didn't block release
Hey @t.denley, this should be fixed with https://clojars.org/re-frame/versions/1.4.2. Sorry for the hassle!
full stactrace
Do you use #queue in your CLJC code anywhere?
Ah, might be this: https://github.com/day8/re-frame/blame/1d81f23ec6d6b06d9e678e6a172e55a7cf8cb4a3/src/re_frame/utils.cljc#L56
@kimo741 CLJS does have #queue, but CLJ does not. And that namespace is in a CLJC file.
Thanks. We'll pin to 1.4.0 until this it fixed
Iām surprised #queue is a thing at all. Never saw that until now.
Precisely because of the issues like this one, it might be best to think it doesn't exist. :D
Is it possible to fire an event when some part of the database changes?
Also look at the new https://day8.github.io/re-frame/Flows/
You could dispatch an event from the output function whenever any of the input paths change.
Pretty sure all functions in flows are supposed to remain pure, I'll let @kimo741 elaborate since I don't see it being mentioned on the docs page.
I myself would definitely use a global interceptor for that. There's already a built-in interceptor, re-frame.std-interceptors/on-changes.
Could be worth a try. I think dispatch would work. dispatch-sync probably wouldn't work.
Maybe we should support a flow key :fx just for this purpose.
You could also try https://github.com/den1k/re-frame-utils/blob/master/src/vimsical/re_frame/fx/track.cljc
Won't it complain about subs being called in a non-reactive context?
I guess I could bind events to subs in some fake invisible component. Not sure if that's a good idea.
Maybe (reagent.ratom/reaction (let [sub (<sub [:foo])] (>evt [:bar sub])))
You could use a global interceptor