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

upgrading to recent versions of encore causes sente to fail #386

Closed pieterbreed closed 3 years ago

pieterbreed commented 3 years ago

In my codebase I have sente, encore & timbre. I try do be on latest versions as much as possible.

I've had to pin my encore on version 3.9.2 due to clojure.lang.ArityException: Wrong number of args (1) passed to: taoensso.truss/have?

Here is the exception I get with 3.10.1 (which is the version in sente's (1.16.1) project.clj). I get the same with [com.taoensso/encore "3.11.0"]

clojure.lang.ArityException: Wrong number of args (1) passed to: taoensso.truss/have?
    at clojure.lang.AFn.throwArity(AFn.java:429)
    at clojure.lang.RestFn.invoke(RestFn.java:412)
    at taoensso.sente$make_channel_socket_server_BANG_$connect_uid_BANG___22577.invoke(sente.cljc:422)
    at taoensso.sente$make_channel_socket_server_BANG_$fn__23418$fn__23427.invoke(sente.cljc:726)
    at taoensso.sente.server_adapters.http_kit.HttpKitServerChanAdapter$fn__25632.invoke(http_kit.clj:28)
    at org.httpkit.server$as_channel.invokeStatic(server.clj:307)
    at org.httpkit.server$as_channel.invoke(server.clj:244)
    at taoensso.sente.server_adapters.http_kit.HttpKitServerChanAdapter.ring_req__GT_server_ch_resp(http_kit.clj:25)
    at taoensso.sente$make_channel_socket_server_BANG_$fn__23418.invoke(sente.cljc:686)
ptaoussanis commented 3 years ago

Hi there!

Please see https://github.com/ptaoussanis/encore#recommended-steps-after-any-significant-dependency-update and let me know if following those directions help?

pieterbreed commented 3 years ago

Hi Peter, thanks for responding.

I went back and carefully verified dependencies and made sure the build environment was clean etc.

$ lein deps :tree | grep com.taoensso
   [com.taoensso/encore "3.10.1"]
     [com.taoensso/truss "1.6.0"]
   [com.taoensso/timbre "5.1.1" :exclusions [[args4j]]]
 [com.taoensso/sente "1.16.1" :exclusions [[args4j]]]

I only have a transitive dependency on truss.

Unfortunately, I'm still getting the exception I reported.

Does this bug possibly have something to do with the http-kit-specific integration?

ptaoussanis commented 3 years ago

Hi Pieter, thanks for the update (and for trying!).

Could you please try once more with [com.taoensso/encore "3.12.1-SNAPSHOT"] (just pushed)? Please make sure to run lein clean first.

pieterbreed commented 3 years ago

Hi Peter. 3.12.1-SNAPSHOT fixes the problem, exception gone. Thank you!!

ptaoussanis commented 3 years ago

👍 Excellent, thanks for the quick confirmation!

[com.taoensso/encore "3.12.1"] is now on Clojars.