Fork me on GitHub
#malli
<
2022-07-24
>
pppaul14:07:57

i'm trying to edit malli.core, i can't figure out how to step through (get into a working cider debugging state) -map-schema. i tried pulling out the validctor method into it's own fn and setting that to cider-debug-defun-at-point but without success. any tips?

pppaul15:07:11

(m/schema
    [:map {:closed true}
     [:optional {:optional true} [:enum :a :b]]
     [:specified :int]])
code i'm using to try to trigger -map-schema

pppaul16:07:18

I've also tried this, and i get a stack overflow error. i'm not really sure how to approach developing for malli.

(m/validate
  (m/schema
    [:schema {:registry {:map (-map-schema)}}
     [:map {:closed true}
      [:optional {:optional true} [:enum :a :b]]
      [:specified :int]]
     ])
  {
   ;;:hi        "valid"
   :specified 1
   ;;"bad" :error
   }
  )

pppaul16:07:26

this is where i have imported -map-schema into my ns and can eval it... i did this because of the stack overflows i'm getting when debugging. however, when i don't go into debug mode i don't get problems, when i'm in debug mode i get stack overflows pretty wild