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
Recursion limit reached when using vec of tuples #661
Comments
Interesting, does this happen for you on rust stable? |
Yep - same issue on stable. This is on the component struct for a component only 1 level down from the top-level component too. |
@mdtusz Dang, that's not good. Do you think you could put together a minimal example showing this issue? That would be the quickest way to getting this fixed |
Yep. I'll try to reproduce it in a small toy example. It is pretty strange though because I can create a vec of tuples in other places - just not in this one component struct. Any hints for ways to inspect more under-the-hood for this? I'm still relatively new to rust so don't know all the debug tricks yet. |
I got same error here with latest cargo: thread 'main' panicked at 'failed to parse cargo output: Error("recursion limit exceeded", line: 1, column: 39083)', src/libcore/result.rs:1084:5 |
As far as I can tell, this seems to be resolved in 0.9.2. I couldn't seem to make a minimal reproduction case either, but just changing the version number and recompiling solved the issue. |
Interesting, well glad to hear it's no longer an issue! @godadada if you are still experiencing this issue, feel free to reopen |
So I also encountered this issue (with yew 0.9.2) and here's what I was able to dig up. In the error message
the After adding more logging to that part of cargo-web, the reason for the error turned out to be prosaic: in my project a typo in the use of the "message": {
"message": "this close tag has no corresponding open tag",
"code": null,
"level": "error",
"spans": [
{
<...>
"expansion": {
"span": {
"file_name": "<::proc_macro_nested::count macros>",
<...>
"expansion": {
"span": {
"file_name": "<::proc_macro_nested::dispatch macros>",
<...>
"expansion": {
"span": {
"file_name": "<::proc_macro_nested::dispatch macros>",
<...> This goes on for 157 levels, and as far as I can tell serde sets its recursion limit to 128 by default. Thus the panic in cargo-web. The good news is that the root cause of the problem (HTML syntax error inside an tl;dr for end-users: If you see the |
Here's a minimal example to reproduce the problem: https://github.com/dmit/yew-recursion-limit |
Description
I'm submitting a question:
Starting with an application that builds with no errors using
cargo web deploy --release
, when changing a field in a struct fromlisting: Vec<Entry>
tolisting: Vec<(Entry, bool)>
the following error occurs:Even setting the
recursion_limit
to ridiculously high values does not seem to fix this - there must be infinite recursion somehow, but I'm unsure of how to debug what or where this may come from.I've encountered recursion issues in the past as well but typically they are from the
html!
macro and can be avoided by restructuring the view, but I can't seem to solve this one.Context (Environment)
rustc 1.39.0-nightly
The text was updated successfully, but these errors were encountered: