Closed crofty closed 3 years ago
Hi,
Thanks for reporting this, I'll have to see what flags are exposed by the compiler and see if there's a way to optionally require/define.
Cheers
From #clojurescript on slack:
oliy Today at 14:46 hello, does anyone know if there a way to detect the compiler version (or closure version) and branch code depending on that? i'm trying to work out how to cope with the changes to closure in the latest release in a backwards compatible way, namely decide whether to use goog.debug.Logger.Level.SEVERE or goog.Logger.Level.SEVERE
3 replies
rakyi 2 hours ago without knowing the cljs/closure compiler specifics, I’d assume (exists? goog.Logger) could be one way to find out if you are on the newer version
nilern 1 hour ago That is probably more robust than reading the version anyway.
oliy < 1 minute ago ah perfect, thank you i didn't know about exists? . it looks to be exactly what i want
Hi,
This should be fixed in the latest 0.1.16-SNAPSHOT
with a slight change to the signature of the re-graph.logging/set-level!
cljs fn
Thanks,
Awesome, thank you!
Hi @oliyh,
would you consider releasing 0.1.16
?
Hi @daveduthie it's now released
Awesome, thanks!
Unfortunately the version of Google Closure used by Clojurescript 1.10.844 has breaking changes to logging, as described here: https://clojurescript.org/news/2021-04-06-release.
This affects this part of re-graph: https://github.com/oliyh/re-graph/blob/master/src/re_graph/logging.cljc#L9-L18
Leading to these warnings:
I'd take a stab at fixing it, but i'm unsure what the approach needs to be to make this work with both the previous and current versions of Google Closure.