taoensso / sente

Realtime web comms library for Clojure/Script
https://www.taoensso.com/sente
Eclipse Public License 1.0
1.74k stars 193 forks source link

Unrelated ring dependencies cause Sente to fail: Assert failed: (every? valid-attr? attrs) #322

Closed timothypratley closed 5 years ago

timothypratley commented 6 years ago

Sometimes when adding a dependency, you get an older version of ring

Repro

Edit the example project of sente by adding bidi as a dependency:

[bidi "2.1.3"]

Now when you run the example with lein start you get Assert failed: (every? valid-attr? attrs).

lein deps :tree reveals that bidi brought in an older version of ring.

Workaround

Prevent the older version from being brought in:

[bidi "2.1.3" :exclusions [ring/ring-core]]

It would be great if Sente could somehow raise a better exception, but I don't see a way to do that... I'm filing this issue just so that other people searching for it can find the cause.

ptaoussanis commented 5 years ago

Thanks Timothy, your suggested workaround will be implemented in the next release (via @tooke7's PR) 👍