metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.43k stars 204 forks source link

A composite registry cannot be used a local registry #1048

Open fuadsaud opened 2 months ago

fuadsaud commented 2 months ago

From an ancient thread in the clojurians slack.

The following schema

[:map {:registry
       (malli.registry/composite-registry
         (malli/default-schemas)
         (malli.time/schemas))}
  ...]

Yields the following error message

Exception: java.lang.IllegalArgumentException: Don't know how to create ISeq from: malli.registry$composite_registry$reify__6973

Is there a reason why this isn't possible? Is there a recommended, alternative way to combine schemas like this other than setting the global registry? Perhaps in this particular case just merging the registries would suffice.

fuadsaud commented 2 months ago

I guess merging is also not possible due to https://github.com/metosin/malli/issues/780