I am upgrading from 0.6.0 to 0.7.1, and my app is throwing this:
:cause ":malli.core/invalid-schema\n\n{:schema nil, :form nil}",
:data
{:type :malli.core/invalid-schema,
:message :malli.core/invalid-schema,
:data {:schema nil, :form nil},
:reitit.exception/cause #error {
:cause ":malli.core/invalid-schema"
:data {:type :malli.core/invalid-schema, :message :malli.core/invalid-schema, :data {:schema nil, :form nil}}
:via
[{:type clojure.lang.ExceptionInfo
:message ":malli.core/invalid-schema"
:data {:type :malli.core/invalid-schema, :message :malli.core/invalid-schema, :data {:schema nil, :form nil}}
:at [malli.core$_exception invokeStatic "core.cljc" 148]}]
I think it has to do with a change to coercion, but im not seeing itpretty cool, thank you
Is your malli version the latest?
It is [metosin/malli "0.16.2"], no explicit dependency on malli, getting this version through reitit.
looking at malli, looks like the answer would be "no, 0.0.1 behind latest"
I think that's good enough.
Could you post the full trace?
Another idea: pull in https://github.com/clojure/tools.trace?tab=readme-ov-file#releases-and-dependency-information, evaluate this, run your program, and post the end of the trace.
(require '[clojure.tools.trace :as t]
'[malli.core])
(t/trace-vars malli.core/schema)
(alter-var-root #'t/trace-fn-call
(fn [_]
(fn [name f args]
(let [id (gensym "t")]
(#'t/tracer id (str (#'t/trace-indent) (pr-str (cons name (take 1 args)))))
(let [value (with-bindings {#'t/*trace-depth* (inc @#'t/*trace-depth*)}
(apply f args))]
(#'t/tracer id (str (#'t/trace-indent) "=> " (pr-str value)))
value)))))
Should look like this:
TRACE t6816: (malli.core/schema [:map [:a [:tuple [:map [:b :int]]]]])
TRACE t6817: | (malli.core/schema [:map [:a [:tuple [:map [:b :int]]]]])
TRACE t6818: | | (malli.core/schema [:tuple [:map [:b :int]]])
TRACE t6819: | | | (malli.core/schema [:map [:b :int]])
TRACE t6820: | | | | (malli.core/schema :int)
TRACE t6820: | | | | => :int
TRACE t6819: | | | => [:map [:b :int]]
TRACE t6818: | | => [:tuple [:map [:b :int]]]
TRACE t6817: | => [:map [:a [:tuple [:map [:b :int]]]]]
TRACE t6816: => [:map [:a [:tuple [:map [:b :int]]]]]