New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error processing large numbers of items #22
Comments
Almost certainly yes. We have discussed that there is a limit, but I've never reached it myself. I may happen to be possible to refactor the macro to make the limit bigger, but probably I will not have any time for this soon. |
@cmsd2 simplay add @tailhook a few 3-4 months ago I worked on a tail-call-optimization scheme for rust macros. This was the exact use case I had in mind. It uses higher-order-macros as callbacks + branching to amplify the recursion limit exponentially (roughly like However, if you are interested, you can have a look yourself at this proof-of-concept code, which recursively prints 26 characters with a recursion limit of only 7: https://github.com/colin-kiegel/enum-transform/blob/tailcall_optimization/src/tailcall_optimization.rs. Even if the drawbacks outweigh the benefits this is quite interesting stuff. :-) |
PS: After the great macro reform, this crate could be re-implemented as a procedural macro and all this pain should be gone. ;-) So we are only talking about temporary workarounds here - even if temporary might be quite a while... |
Hm, if increasing recursion limit is enough I don't see any problem here. We just need to add it to the docs. |
crikey. i got more than i bargained for. Thanks for the workaround at least -- that fixes my problem. |
i have an error type with 17 possible error types. is that too many? it works if i delete one. doesn't seem to matter which one i get rid of.
The text was updated successfully, but these errors were encountered: