Closed FieryCod closed 7 months ago
Can you provide a bit more context on how to reproduce this? We tested extensively with 0.14.0, but there were some last-minute pretty-printing changes and this is quite likely related to that, given that it seems to involve virhe.
@gnl let me please know if you can reproduce using the following snippets:
src/main/main.clj
(ns main
(:require
[com.fulcrologic.guardrails.malli.core :refer [>defn]]))
(>defn hello
[x]
[:string => :int]
:s)
(hello 30)
guardrails.edn
{:defn-macro nil
:async? true
:guardrails/mcps 150
:expound {:show-valid-values? true
:print-specs? true}
:guardrails/stack-trace :none ; or :full or :none
:guardrails/use-stderr? true
:guardrails/compact? true
:guardrails/trace? true
:throw? false
:tap>? false}
deps.edn
{:deps {}
:aliases {:dev {:jvm-opts ["-Dguardrails.enabled"]
:deps {metosin/malli {:mvn/version "0.14.0"}
com.fulcrologic/guardrails {:mvn/version "1.2.0-2"}}}
:test {:extra-paths ["test"]
:deps {com.clojure-goes-fast/clj-java-decompiler {:mvn/version "0.3.4"}
criterium/criterium {:mvn/version "0.4.6"}}}}
:paths ["src/main"]}
I see that you have malli 0.13.0 in your deps.edn – is it possible that there's been a mix-up and the problem occurs with 0.13.0 but not 0.14.0? There were breaking changes in 0.14.0 in the pretty-printing APIs, it's possible that Guardrails' custom pretty-printing is not backwards compatible.
I tweaked my project to use 0.13.0 to avoid above mentioned error and forgotten to change it to 0.14.0 in repro.
Corrected the repro case.
I assume that with :guardrails/compact?
set to false
it works fine?
Fixed in 1.2.1
It seems Malli has changed the arity of some internal function in Malli 0.14.0: