Troubles testing malli/clojurescript instrumentation: `no conversion to symbol` error

Hello,

first time poster here, hope I won’t break any rules :crossed_fingers:

I want to try malli instrumentation for clojurescript but I’m kinda stuck almost at the beginning.

I’ve setup a very simple test project here GitHub - eauc/test_malli_cljs

Basically I just have a namespace where I instrument a function then start the malli instrumentation

(ns hello.core
  (:require [malli.core :as m]
            [malli.dev.cljs :as md]))

(defn a-function
  {:malli/schema [:=> [:cat :int] :string]}
  [x]
  (str x))

(md/start!)

When I start the REPL with clj -M:repl (or try to compile) I get an execption no conversion to symbol
that points to the malli.instrument.cljs/-collect function, line 11

(defn -collect! [env simple-name {:keys [meta] :as var-map}]
  (let [ns (symbol (namespace (:name var-map)))

I’m guessing somehow the (namespace ...) resolves to nil and symbol is not happy about it.
I’m not sure where to go from here.

Have I made a mistake in my setup ?
Is this a known behaviour ?

thanks in advance,
Emmanuel

Hi! I would highly recommend using shadow-cljs to compile your clojurescript.
I forked your repo and have a working version here:

I implemented the cljs support for malli instrumentation and I just spent some time debugging your issue with the default cljs compiler and could not get a basic repl working… So yea, the default tooling is quite rough, that’s why I would suggest shadow-cljs.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.