Fork me on GitHub
#malli
<
2023-03-07
>
Patrick Brown00:03:15

I’m dealing with things I truly don’t understand. By virtue of how I was bootstrapping my system all my schemas are serializable and fit to be sent across the wire. Really, I just did that by doing what made sense. Wake up and Malli gift wrapped me a feature I’m unfamiliar with. I’m imagining the possibilities. Is anyone out there utilizing this feature, in what capacity? Sounds cool. Just curious.

dgb2315:03:23

The more your program can be described as data (malli, reitit, integrant, deps.edn etc.) the easier it gets to manipulate your program through that data. You get easy opportunities to create all sorts of tooling.

cap10morgan19:03:34

I'm building a registry in one namespace (using a map of qualified keywords to vector-syntax schemas) that I would like to re-use schemas from a registry in another namespace. Is there a way to do that?

Joel19:03:54

More than just a simple merge?

cap10morgan19:03:03

:thinking_face: I was hoping there was a way to reference only the ones I need, but I suppose that's just a call to select-keys away w/ merge. I'll give it a shot, thanks!

cap10morgan19:03:31

oh, I guess the other issue is the keys will still have the other namespace

cap10morgan19:03:46

but that might be ok in this case...

Joel19:03:20

alias ’em… eg. ::ns/in-schema1

Joel19:03:50

Also 1.11 let’s you have “fake” namespaces using as-alias fwiw.

cap10morgan19:03:10

I was hoping to bring them into this registry, namespace and all

cap10morgan19:03:14

but it might be fine

cap10morgan19:03:59

actually, yeah, it is. I can just do ::this ::other/this to accomplish what I want w/ your merged registry suggestion. thanks!

✔️ 2