Fork me on GitHub
#malli
<
2021-11-16
>
Eddie17:11:30

I am having trouble with mutually recursive schemas raising :malli.core/potentially-recursive-seqex. The intention is for the schemas to be recursive so my question is: why is the exception is being raised? I assume I have expressed recursion in an improper way, but I can’t quite figure it out. https://gist.github.com/erp12/5f7a46ff4a960feeed155da6cf89b0db the schemas and the invocation of m/validate that raises the error. Any help would be much appreciated!

ikitommi17:11:07

In App, you should wrap the :refs in :schena , like [:schema [:ref :lit]] so that they are not inlined in the :cat.

Eddie17:11:52

Thanks, that works. I think I understand what you mean by “inlined by the :cat” but I am surprised that :ref must be wrapped. I thought only seqex schemas (`:cat` , :*, :alt, etc) had to be wrapped to prevent inlining. I am probably not understanding something about seqex in general. I’ll keep reading. Thanks again!