plumatic / schema

Clojure(Script) library for declarative data description and validation
Other
2.4k stars 256 forks source link

Incorrect uuid construction #411

Closed staab closed 5 years ago

staab commented 5 years ago

When compiling my project using shadow-cljs with schema.coerce, I get the following warning:

------ WARNING #1 --------------------------------------------------------------
 File: schema/coerce.cljs:108:20
--------------------------------------------------------------------------------
 105 |
 106 |
 107 |
 108 |   #(if (string? %) (cljs.core.UUID. %) %))
--------------------------^-----------------------------------------------------
 Wrong number of args (1) passed to cljs.core.UUID
--------------------------------------------------------------------------------
 109 |
 110 |
 111 | (def ^:no-doc +json-coercions+
 112 |   (merge
--------------------------------------------------------------------------------

Unless it's done this way for compatibility with older versions of clojurescript, I would suggest using [uuid](http://cljs.github.io/api/cljs.core/uuid). Otherwise, passing nil in for __hash would take care of the warning.

staab commented 5 years ago

Nevermind; this appears to be taken care of in 1.1.10! 🍺