juji-io / editscript

A library to diff and patch Clojure/ClojureScript data structures
Eclipse Public License 1.0
485 stars 23 forks source link

Unresolved reference to goog.math.Long/getMaxValue in newer cljs #25

Closed bowbahdoe closed 2 years ago

bowbahdoe commented 2 years ago
[Figwheel:WARNING] Compile Warning   resources/public/js/compiled/editscript/diff/a_star.cljc   line:242  column:24

  Use of undeclared Var goog.math.Long/getMaxValue

  237    ((juxt get-came get-open get-g) state))
  238
  239  (defn- access-g
  240    [g cur]
  241    (get g cur #?(:clj Long/MAX_VALUE
  242                  :cljs (goog.math.Long/getMaxValue))))
                              ^---
  243
  244  (defn ^:declared diff* [ra rb came])
  245
  246  (defn- compute-cost
  247    [^Coord cur came g op]

if you're using the latest releases goog.math.Long/... isn't a valid pattern anymore because that namespace became a goog.module. basically you can longer assume it exists (because some other namespace might have loaded it), you must require it and use an alias

huahaiy commented 2 years ago

Thanks for reporting. Released 0.5.8 to make available the fix in #23 .