taoensso / sente

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

Dependency conflict when using sente and nippy in the same project #377

Closed jwr closed 3 years ago

jwr commented 3 years ago

The current stable version of sente (1.15.0) depends on encore 2.117.0. But for people who also use nippy in their projects, there is a problem:

[com.taoensso/sente "1.15.0"] -> [com.taoensso/encore "2.117.0"]
 overrides
[com.taoensso/nippy "2.15.0"] -> [com.taoensso/encore "2.122.0"]

And nippy requires a newer version of encore, otherwise the software does not compile:

#error {                                                                                                                                                                                    
 :cause No such var: enc/srng                                                                 
 :via                                                                                         
 [{:type clojure.lang.Compiler$CompilerException                               
   :message Syntax error compiling at (taoensso/nippy/crypto.clj:14:79).
   :data #:clojure.error{:phase :compile-syntax-check, :line 14, :column 79, :source taoensso/nippy/crypto.clj}
   :at [clojure.lang.Compiler analyze Compiler.java 6808]}                                    
  {:type java.lang.RuntimeException                                                           
   :message No such var: enc/srng                                                             
   :at [clojure.lang.Util runtimeException Util.java 221]}]                                   

Not a critical problem (can be worked around), but I thought you'd want to know. I think it would make sense for the stable version of sente to depend on encore "2.122.0".

Incidentally, while working around this, I discovered that timbre depends on an even older version of encore.

ptaoussanis commented 3 years ago

@jwr Hi Jan, thanks for letting me know. This definitely happens from time to time- it's inevitable when there's multiple libraries using encore, and encore gets updated semi-frequently.

It'd be too much hassle to cut new releases of every library each time encore is updated.

Once the next Sente release is cut, its dependency will also be updated.

In the meantime, instructions for this at https://github.com/ptaoussanis/encore/blob/master/DEP-CONFLICT.md

I normally recommend folks routinely run lein clean and lein deps :tree whenever they update any dependencies. This'll help ensure that stale artifacts are removed, and that any possible dependency conflicts are highlighted.

jwr commented 3 years ago

Oh, I didn't even know the DEP-CONFLICT.md document existed :-)

Thanks — as I said, it's not a big problem, I only reported this because I thought you wanted to manage this between libraries.