Fork me on GitHub
#malli
<
2022-04-03
>
Carlo10:04:41

Quick question: does generative checking work in cljs? If not, why not? If I try to write (mi/check) I get:

------ WARNING #1 - :undeclared-var --------------------------------------------
 File: /home/carlo/code/clojure/visualizerTestCljs/src/main/core.cljs:12:1
--------------------------------------------------------------------------------
   9 | (defn badd [x y]
  10 |   "z")
  11 | 
  12 | (mi/check)
-------^------------------------------------------------------------------------
 Use of undeclared Var malli.generator/check
--------------------------------------------------------------------------------
edit: solution in thread

Carlo10:04:05

Ok, it works if I manually include an import on malli.generator , even if I don't directly use the namespace. This is probably due to how shadow-cljs includes the files. I'm going to leave it here in case it's useful to someone else in the future.

dvingo00:04:46

I made an github issue to fix this. you shouldn't have to require that ns - I'll fix it in the coming days

😍 2