re-frame

scarytom 2023-12-08T13:56:08.679999Z

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?

scarytom 2023-12-10T23:24:19.595359Z

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.

Kimo 2023-12-09T09:15:46.751959Z

maybe I should make the tests for alpha features run separately somehow

p-himik 2023-12-09T09:16:40.009239Z

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.

Kimo 2023-12-09T09:18:12.779209Z

yeah the fix is straightforward

Kimo 2023-12-09T09:18:31.343399Z

I also wonder why our CI didn't block release

Kimo 2023-12-09T11:24:15.059459Z

Hey @t.denley, this should be fixed with https://clojars.org/re-frame/versions/1.4.2. Sorry for the hassle!

šŸŽ‰ 2
scarytom 2023-12-08T13:57:24.540259Z

full stactrace

p-himik 2023-12-08T14:07:19.794519Z

Do you use #queue in your CLJC code anywhere?

āŒ 1
p-himik 2023-12-08T14:09:29.651009Z

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.

scarytom 2023-12-08T14:35:03.744249Z

Thanks. We'll pin to 1.4.0 until this it fixed

āœ… 1
2023-12-08T18:12:39.098419Z

I’m surprised #queue is a thing at all. Never saw that until now.

p-himik 2023-12-08T18:15:43.996759Z

Precisely because of the issues like this one, it might be best to think it doesn't exist. :D

šŸ˜† 1
nikolavojicic 2023-12-08T23:24:12.010199Z

Is it possible to fire an event when some part of the database changes?

Werner 2023-12-09T08:22:55.817959Z

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.

šŸ‘ 1
p-himik 2023-12-09T09:05:44.967079Z

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.

šŸ‘ 2
Kimo 2023-12-09T09:56:03.225749Z

Could be worth a try. I think dispatch would work. dispatch-sync probably wouldn't work.

Kimo 2023-12-09T09:57:33.812309Z

Maybe we should support a flow key :fx just for this purpose.

p-himik 2023-12-09T11:36:45.053319Z

Won't it complain about subs being called in a non-reactive context?

nikolavojicic 2023-12-09T00:54:41.027579Z

I guess I could bind events to subs in some fake invisible component. Not sure if that's a good idea.

nikolavojicic 2023-12-09T01:00:32.104539Z

Maybe (reagent.ratom/reaction (let [sub (<sub [:foo])] (>evt [:bar sub])))

2023-12-09T03:28:22.166259Z

You could use a global interceptor

šŸ‘ 1