Fork me on GitHub
#malli
<
2022-11-19
>
ikitommi08:11:48

here’s another try with PlantUML:

jeroenvandijk08:11:29

What about https://mermaid-js.github.io/mermaid/#/classDiagramUnfortunately, no experience yet and not sure if it is better than PlantUML.

ikitommi10:11:55

Thanks, but I don’t think Mermaid supports field-level mappings.

👍 1
dumrat12:11:11

@U055NJ5CC I tried graphviz dot (for the first time - so this could be improved upon I guess): https://bit.ly/3TVe9NU

ikitommi16:11:34

@UC1DTFY1G that's actually quite good, bit wonky but best so far :man-bowing:

👍 1
ikitommi10:11:36

merged the :enum & := type-inferrer with transformers into master. So, this works now:

(m/decode
 [:map
  [:enum1 [:enum :kikka :kukka]]
  [:enum2 [:enum 'kikka 'kukka]]
  [:enum3 [:enum 1 2]]
  [:enum4 [:enum 1.1 2.2]]]
 {:enum1 "kikka"
  :enum2 "kikka"
  :enum3 "1"
  :enum4 "1.1"}
 (mt/string-transformer))
;{:enum1 :kikka
; :enum2 kikka
; :enum3 1
; :enum4 1.1}

❤️ 7
rafalw12:11:32

Hi, I've started using malli's function intrumentation for cljs projects, it works great but on error I'm getting "Warning" message in browser's console, is it posible to make it to be an "error" instead of "warning"?

dvingo17:11:36

can you post a screenshot? and how are you starting the instrumentation? this is how they look with .cljs/start! https://github.com/metosin/malli/blob/master/docs/clojurescript-function-instrumentation.md#errors-in-the-browser-console

rafalw09:11:40

when its reload (shadow-cljs detects some changes) it's an warning, when page is refreshed (for example F5) it's an error

dvingo16:11:01

ah, i think this is due to the way shadow-cljs loads cljs code - it uses eval and prevents exceptions from being thrown as they normally do I've found the following pattern works to get proper malli exceptions displaying: https://github.com/matterandvoid-space/todomvc-fulcro-subscriptions/blob/766d27be316c3f2ab6a23bd8db30932ec0601a4f/src/main/space/matterandvoid/todomvc/client/dev_entry.cljs#L20

aaron5123:11:37

How can I humanize malli.instrument/instrument! failures? With large data and a large schema, it’s really hard to tell where the problem is from the invalid-input failure