Skip to content
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

Regression in 3.3.4 (reached the instantiation recursion limit) #172

Closed
ordian opened this issue Jun 30, 2018 · 5 comments
Closed

Regression in 3.3.4 (reached the instantiation recursion limit) #172

ordian opened this issue Jun 30, 2018 · 5 comments

Comments

@ordian
Copy link
Contributor

ordian commented Jun 30, 2018

toml_edit fails to compile with combine 3.3.4:

error: reached the recursion limit while instantiating `<parser::datetime::date_time<combine::easy::Stream<combine::stream::state::State<&str, combine::stream::state::SourcePosition>>> as combine::Parser>::parse_mode::<combine::parser::FirstMode>`
@Marwes
Copy link
Owner

Marwes commented Jun 30, 2018

It seems that 5257988 increased the function nesting just enough to bring toml_edit over the recursion limit for monomorphizing (which seems to be 64). Increasing it with #![recursion_limit = "87"] seems to enough to make it compile again whereas 61 is enough with combine 3.3.1. Since the function that hit the limit is so close already I don't think I can fix this in combine unfortunately (without reverting the bug fix).

@ordian
Copy link
Contributor Author

ordian commented Jun 30, 2018

Ok, if it can't be reverted, I'm going to close this issue.

@Marwes
Copy link
Owner

Marwes commented Jun 30, 2018

@ordian I opened an issue on rust-lang/rust to see why the limit is so low rust-lang/rust#51951 (compared to macro expansion)

@nikklassen
Copy link

I was also having this issue. I assume that the only solution is to convert a subset of the parsers to use Boxed parsers (given that the grammar I'm parsing can't change). Is that correct?

@Marwes
Copy link
Owner

Marwes commented Jun 30, 2018

@nikklassen You can bump the recursion limit by specifying #![recursion_limit = "256"] at your crate's root (default is 64 for this type of recursion).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants