This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-17
Channels
- # bangalore-clj (4)
- # beginners (60)
- # boot (63)
- # cider (2)
- # cljs-dev (22)
- # cljsrn (3)
- # clojars (32)
- # clojure (133)
- # clojure-gamedev (1)
- # clojure-germany (17)
- # clojure-italy (1)
- # clojure-russia (11)
- # clojure-serbia (16)
- # clojure-spec (35)
- # clojure-uk (75)
- # clojurebridge (1)
- # clojurescript (83)
- # community-development (25)
- # core-async (43)
- # cursive (15)
- # datomic (28)
- # emacs (2)
- # fulcro (108)
- # graphql (5)
- # hoplon (15)
- # lein-figwheel (6)
- # leiningen (39)
- # lumo (106)
- # new-channels (1)
- # off-topic (4)
- # om (26)
- # om-next (53)
- # onyx (46)
- # other-languages (2)
- # perun (1)
- # protorepl (5)
- # re-frame (13)
- # ring (18)
- # ring-swagger (1)
- # rum (6)
- # shadow-cljs (82)
- # spacemacs (19)
- # specter (5)
- # sql (3)
- # test-check (31)
- # unrepl (12)
- # untangled (2)
- # vim (109)
async/map
(async/map vector [ch1 ch2 ch3 ch4])
Iâve had two different people report to me that core.async doesnât work correctly (see Wilkerâs comment just above about losing a message) if asserts are elided in cljs advanced compilation. Just putting that out there in case others want to chime in.
@tony.kay that's a bit concerning. Eliding asserts is a default in many popular lein profiles, I wonder why that would break a core library
not sure, but Iâve had two users of Fulcro report that the core async queues âlose messagesâ if elide asserts is true when using advanced optimizations. One of them is trying to build a minimal case. It might be relatively easy to spot in the source. I mean: it has to be a spot where the value of the assert or a side-effect accidentally embedded within it is (accidentally) important.
searching fulcro using the github ui for 'async' that is in there, also lots of go loops created just to publish a single message (async/go (>! ch something))
I thought a key design goal of Om Next was to avoid use of core.async? According to a @dnolen talk
There are several test files in core.async's source, I wonder if they have ever run under cljs with assets elided
if fulcro users are reporting dropped messages, then the place to start looking for bugs is fulcro
@ajs @hiredman The front-end does eliminate the need for async. Om Nextâs design is to isolate async, not eliminate it.
So, there are not âa lot of go loopsâ. There are exactly two channels for each network handlerâŚusually just one networking. One is for sending the requests (a queue), and the other is to provide blocking so that only one goes at a time. Simple as that.
Thereâs about 12 lines of core async in the entire library isolated to the depths of the plumbing
about the elide assets, it doesn't need to be advanced compilation, just adding the elision is enough to trigger the problem
Alex Miller just cut core.async 0.3.465, this includes @juhoteperi macro enhancement
@tony.kay does that (async/offer! queue e)
need to run, because if so it will obviously not run if asserts are elided
@ajs it is obviously the problemâŚI just didnât see it. I had a team of people working on this part of the lib early on. Embedding logic in an assert is something I know better than to do, and I assumed I wrote that codeâŚso, I was assuming it couldnât have asserts. My bad
@tony.kay for what it's worth, i assert things using this, because if elided the value is passed through (and it allows me to litter my code with type assumptions without having to bind to let first, keeps the code succinct) : https://github.com/astoeckley/clojure-assistant/blob/master/src/assistant/asserts.cljc#L50
Yeah, I actually lean the other way and like that assert drops the processing altogether (in case it is high-overhead assertion, like a spec check)
i this case i'm wrapping things that need to be there anyway, but allowing tests with predicates in case asserts are turned on