Ambrose Bonnaire-Sergeant
Ambrose Bonnaire-Sergeant
I think `#(instance? klass %)` compiles to slower code than `#(instance? LocalDate %)`, you might want to hardcode each pred in `default-date-types`.
Try `[:and [:map [:id int?]] [:map-of :keyword double?]]`. It doesn't seem to generate very rich values though. [Playground](https://malli.io/?value=%7B%3Aid%201%20%3Adata1%201.2%20%3Adata2%201%7D&schema=%5B%3Aand%20%5B%3Amap%20%5B%3Aid%20int%3F%5D%5D%20%5B%3Amap-of%20%3Akeyword%20double%3F%5D%5D)
Ah yes, probably a cljs thing. Another two options are to broaden the :map-of schemas to include the :map ones (less accurate validation) or to use :fn to manually dissoc...
@ikitommi here's another shot at the recursive gen fix, all changes are in the generators ns. Still need a few more tests, but what do you think?
@ikitommi thanks for looking. Adding the test indeed revealed a bug, and I don't think my solution is general enough. Needs more thought.
I think I figured it out--very subtle! Explained the reasoning in comments. I will try and improve the error message for infinite schemas, right now it's pretty confusing.
Still needs more work. I broke something: the generation never goes more than 1 recursion in the example in the original issue: ```clojure (mg/sample [:schema {:registry {::cons [:maybe [:tuple pos-int?...
The problem was because caching does not take into account `options`. We need to disable caching while generating recursive generators. Added a test to show that recursive generators still cache....
@ikitommi thanks. If you're happy with it, please merge. Happy to address any feedback. > Before merging, you think this is done, adds real support for recursive schemas with no...
I don't think there's a definitive reference yet for which properties are supported by which schemas. It's a little inconsistent so it's probably worth writing. eg., I think `:registry` is...