Skip to content

[1.30 beta] Macros recursion limit detection changed #54464

Closed

Description

@emilyalbini

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.

Activity

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    C-bugCategory: This is a bug.
    on Sep 22, 2018
  2. added this to the 1.30 milestone on Sep 22, 2018
  3. petrochenkov commented on Sep 22, 2018

    @petrochenkov
    Contributor

    Oh god.

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

  4. petrochenkov commented on Sep 22, 2018

    @petrochenkov
    Contributor

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

  5. nikomatsakis commented on Sep 27, 2018

    @nikomatsakis
    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?

  6. pnkfelix commented on Sep 27, 2018

    @pnkfelix
    Contributor

    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.

  7. pnkfelix commented on Sep 27, 2018

    @pnkfelix
    Contributor

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

  8. emilyalbini commented on Sep 28, 2018

    @emilyalbini
    MemberAuthor

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

  9. petrochenkov commented on Sep 28, 2018

    @petrochenkov
    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.

  10. pnkfelix commented on Oct 4, 2018

    @pnkfelix
    Contributor

    closing as wontfix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions