I'm using tick (0.5.0; tick.core and tick.locale-en-us) with shadow-cljs and getting
------ WARNING #1 - -----------------------------------------------------------
File: ~/.m2/repository/tick/tick/0.5.0/tick-0.5.0.jar!/tick/locale_en_us.cljc:5:15
--------------------------------------------------------------------------------
2 | #?(:cljs (:require ["@js-joda/locale_en-us" :as js-joda-locale])))
3 |
4 | ; doing this for the one-arity tick.core/formatter. (npm users don't get js/JSJodaLocale global automatically)
5 | #?(:cljs (set! js/JSJodaLocale js-joda-locale))
---------------------^----------------------------------------------------------
constant JSJodaLocale assigned a value more than once.
Original definition at externs.shadow.js:4
Couldn't find anything with google, github issues, here or juxt zulip, and I don't have any idea what's wrong 😕 Any pointers?it's only a warning. I guess there'll be a more shadow-friendly way to assign a var that it might already have as an extern
wouldn't a simple:
(when-not (exists? js/JSJodaLocale) (set! js/JSJodaLocale js-joda-locale))
address this?no. it needs to set the value for it to work. the other def is just an extern afaict
ah i see what you're saying
maybe this then:
(goog.object/set js/global "JSJodaLocale" js-joda-locale)yep worth a go 👍