Hi Sean, thank you for pinging about this.

The upgrade to v1.0.0 *is* actually breaking *if* you've been reading from 
the client-side :ch-recv directly. Most folks use the provided router 
utils, so it slipped my mind to document that - I'm really sorry.

Will update the README and CHANGELOG now.

In the meantime, the change you need to make:
Server-side :ch-recv used to receive `event-msg` maps, and still does (no 
change).
Client-side :ch-recv used to receive `event` vectors, and now instead 
receives `event-msg` maps like the server.

Server-side `event-msg` maps contain keys: :ch-recv, :send-fn, 
:connected-uids, :client-uuid, :ring-req, :event, :?reply-fn.
Client-side `event-msg` maps contain keys: :ch-recv, :send-fn, :state, 
:event.

So (:event <event-msg>) will get you the old event vector.

Motivations behind this change:
1. Client+server :ch-recv values are now consistent (both receive 
`event-msg`s).
2. Client+server routing is therefore now consistent.
3. The extra data in `event-msg`s makes it easier to write functional event 
handlers (i.e. that don't need access to a global send-fn or ch-recv).
4. That all event handlers now take a map makes future changes 
easier/non-breaking (we can add extra interesting keys in time w/o needing 
event handlers to change, etc.).

Definitely should be documented though, again - really sorry about that!
Please feel free to drop me an email if you run into any more trouble.

Cheers! :-)

- Peter Taoussanis

>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to