Fork me on GitHub
#meander
<
2023-01-11
>
Jamie Walkerdine15:01:43

Hi folks, so we're working on a project that involves meander quite heavily and we've been relying on the search macro (or rather we've been compiling search and then evaluating) but we realised that because it's relying on eval then when we start introducing large blocks of data and trying to evaluate programmatically, we have issues with the methods being too large and resulting in syntax errors. The transform itself works but since we need to compile these transforms programmatically it becomes an issue- tried a solution similar to compile-match-args and deconstructing search (a la https://www.metosin.fi/blog/transforming-data-with-malli-and-meander/) but it still relies on eval at the end, for which we need to insert our large pieces of data into a syntactic expression yielding the same error, and we've also tried relying on the interpreter endpoint (which seems to be too slow) Does anyone know how to get around this issue?

noprompt06:01:51

This might sound crazy but have you tried writing the macroexpansion to a file?

noprompt06:01:24

I have experimented with this and it does work provided you write out the ns form with all the necessary :require s which is pretty easy to get with something like

(into []
  (comp (filter qualified-symbol?)
        (map (comp symbol namespace))
        (distinct))
  (tree-seq coll? seq expanded-form))

noprompt06:01:33

If this doesn't work, I can try to come up with some other ideas but I might need some more information/examples to be the most helpful.

noprompt06:01:13

The next several days are pretty busy for me but I will check back as soon as I have a chance.

noprompt20:01:31

@U04A9F0Q1GU Hello! I’m following up to see if you are still need help.