Yew: Recent update is causing error: recursion limit reached while expanding the macro `$crate::dispatch`

Created on 4 Jul 2019  路  2Comments  路  Source: yewstack/yew

Description

I'm submitting a ... (check one with "x")

  • question - please describe the problem you're trying to solve and give as much context as possible.
  • feature request - please describe the behavior you want and the motivation.
    x bug report - please describe shortly your bug and fill out the other sections.

Recent update is causing error when compiling app.

Expected Results

Previously code was successful with lib.rs setting:

#![recursion_limit = "160"]

Actual Results

Compilation of code fails. Error given regardless of how high the recursion limit is set (here I am trying it with 512).

   Compiling coolcats2 v0.1.0 (/Users/mahakal/Development/Apps/coolcats2/ui-src)
error: recursion limit reached while expanding the macro `$crate::dispatch`
   --> src/application/interfaces/app.rs:61:13
    |
61  | /             html! {
62  | |                 <div class="container",>
63  | |                     <div class="spinner transition500",/>
64  | |                     <div class="error transition500",/>
...   |
164 | |                 </div>
165 | |             }
    | |_____________^
    |
    = help: consider adding a `#![recursion_limit="1024"]` attribute to your crate
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to previous error

error: Could not compile `coolcats2`.

Context (Environment)

  • Rust: v1.35.0

  • yew: v0.7.0 (https://github.com/DenisKolodin/yew#446983a8)

(previously worked with https://github.com/DenisKolodin/yew#db6c6e01)

  • target: wasm32-unknown-unknown

  • cargo-web: v0.6.25

Most helpful comment

Thanks @pythagorean for the question. The increased recursion is due to the switch to using a procedural macro for html! which uses a lot of recursion due to this crate: https://github.com/dtolnay/quote#recursion-limit.

Are you able to compile if you increase your recursion limit even higher?

I guess I stopped trying too soon. If I bump my recursion limit to 640 it seems to compile now.

All 2 comments

Thanks @pythagorean for the question. The increased recursion is due to the switch to using a procedural macro for html! which uses a lot of recursion due to this crate: https://github.com/dtolnay/quote#recursion-limit.

Are you able to compile if you increase your recursion limit even higher?

Thanks @pythagorean for the question. The increased recursion is due to the switch to using a procedural macro for html! which uses a lot of recursion due to this crate: https://github.com/dtolnay/quote#recursion-limit.

Are you able to compile if you increase your recursion limit even higher?

I guess I stopped trying too soon. If I bump my recursion limit to 640 it seems to compile now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kellytk picture kellytk  路  3Comments

sanpii picture sanpii  路  3Comments

ghost picture ghost  路  4Comments

IngwiePhoenix picture IngwiePhoenix  路  4Comments

agausmann picture agausmann  路  3Comments