Skip to content

[1.30 beta] Macros recursion limit detection changed #54464

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

Closed
pietroalbini opened this issue Sep 22, 2018 · 8 comments
Closed

[1.30 beta] Macros recursion limit detection changed #54464

pietroalbini opened this issue Sep 22, 2018 · 8 comments
Labels
C-bug Category: This is a bug. regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@pietroalbini
Copy link
Member

In the 1.30 beta the counter of macro recursions is increased by one compared to the 1.29 stable release. This causes build failures for crates with a macro with exactly 64 recursions.

@pietroalbini pietroalbini added I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. regression-from-stable-to-beta Performance or correctness regression from stable to beta. C-bug Category: This is a bug. labels Sep 22, 2018
@pietroalbini pietroalbini added this to the 1.30 milestone Sep 22, 2018
@petrochenkov
Copy link
Contributor

Oh god.

This most likely happens due to #[test] being (correctly) counted as a macro expansion (#53410).

@petrochenkov
Copy link
Contributor

This turns out to be a known regression #53410 (comment), so I assume wontfix.

@nikomatsakis
Copy link
Contributor

I'd probably be ok with calling this a WONTFIX for now, though I'd like to think about possible ways to "future proof" things like the recursion depth better. It's worth pointing out that this particular regression won't affect consumers of the crate, right? Only its original author?

@pnkfelix
Copy link
Member

discussed at T-compiler meeting. Team is generally leaning towards closing as WONTFIX.

We did discuss various work-arounds (e.g. increasing the limit by +1 or x2... and generalizations thereof, like applying that transform also to user-provided recursion limits).

But in general no one seemed too eager to actually deploy any such "fix", and its not clear whether a better solution is available.

So, if this is still open next week in the same state with no objections, we'll close as WONTFIX.

@pnkfelix
Copy link
Member

(leaving priority unassigned since the priority is somewhat fuzzy, given our leaning towards WONTFIX)

@pietroalbini
Copy link
Member Author

Maybe we could ignore macros expanded by the compiler in the recursion limit?

@petrochenkov
Copy link
Contributor

Please no, this cure would be much worse than the disease.
Recursion limit is hit in polish_notation 0.1.0 in a test that's specifically testing recursion limit, it didn't happen accidentally.

@pnkfelix
Copy link
Member

pnkfelix commented Oct 4, 2018

closing as wontfix.

@pnkfelix pnkfelix closed this as completed Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants