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

Issue with 1.18.0-RC1 Cljs build #429

Closed danielsz closed 1 year ago

danielsz commented 1 year ago

Hi,

I've been using Sente 1.17 stable for years, am now trying to upgrade to 1.18.0-RC1. I am very much aware of the breaking changes, but they don't seem to be affecting my use case. I have no issues starting the server side of Sente, however the client side doesn't load in the browser due to logging output. Here are the first lines of the compiled sente file.

// Compiled by ClojureScript 1.11.60 {:optimizations :none}
Loading initial Timbre config from: :default
goog.provide('taoensso.sente');
goog.require('cljs.core');
goog.require('clojure.string');
goog.require('cljs.core.async');
goog.require('taoensso.encore');
goog.require('taoensso.timbre');
goog.require('taoensso.sente.interfaces')

As can be seen, the second line is not commented out and causes a reference error.

Uncaught SyntaxError: Unexpected identifier 'initial'

When using Sente 1.17, I was not touching the timbre logging system at all and everything worked without configuring anything. Has that change in Sente 1.18?

ptaoussanis commented 1 year ago

@danielsz Hi Daniel, it's good to hear from you!

Thanks a lot for pinging about this, and for the clear report. Apologies for the trouble!

It looks like you're being affected by this.

Would you please try again, after placing [com.taoensso/timbre "6.2.0-alpha1"] before Sente in your Leiningen/etc. dependencies?

I'll aim to cut new stable Timbre and Sente releases that include this fix before the end of the month.

danielsz commented 1 year ago

Hi Peter, it's good to meet you again! :smiley: What you suggested I do is actually something I figured out. I am using [com.taoensso/timbre "6.2.0-alpha1"]. The difference with[com.taoensso/timbre "6.1.0"]is that it got rid of the occurrence of the offending log output in timbre.js but it is also and still present in sente.js.

ptaoussanis commented 1 year ago

Just to clarify:

Is that all correct?

danielsz commented 1 year ago

Absolutely. That is exactly right. I've done exactly what you wanted to clarify. I will say: it is late and I've been at it for a while, so it might be wise for me to retry tomorrow morning and confirm again.

danielsz commented 1 year ago

Oh the wonders of a good night sleep. Cleaning the build was not enough, I had to switch a compiler option, namely setting :aot-cache to false. Clojurescript does aggressive caching otherwise. The documentation says:

Controls whether the shared AOT cache is used for compiler artifacts produced from JARs.

So once Sente is compiled, it won't be recompiled, no matter that its dependencies ([com.taoensso/timbre "6.2.0-alpha1"]) may have changed.

Anyway, I am happy to report that everything is fine now. Thank you, Peter!

ptaoussanis commented 1 year ago

Thanks for the update Daniel, happy to hear that you found a solution!

Again, apologies for the trouble on this. I'll have updated Timbre & Sente stable releases up later this week.

Will keep this issue open till then.

danielsz commented 1 year ago

Thank you so much, Peter. I am very grateful.

ptaoussanis commented 1 year ago

Pushing update in a moment, closing 👍