-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
feat: add expansion_growth_limit
attr as another expansion limit
#103029
base: master
Are you sure you want to change the base?
feat: add expansion_growth_limit
attr as another expansion limit
#103029
Conversation
e01efdc
to
897095d
Compare
This comment has been minimized.
This comment has been minimized.
897095d
to
c419f77
Compare
expansion_grow_limit
attr as another expansion limit expansion_growth_limit
attr as another expansion limit
@rustbot r? rust-lang/compiler |
Not going to be able to review this for a while. r? parser |
This comment was marked as resolved.
This comment was marked as resolved.
c419f77
to
f41a9e0
Compare
This comment has been minimized.
This comment has been minimized.
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki |
95bb7d6
to
031b127
Compare
This comment has been minimized.
This comment has been minimized.
bf2f70c
to
c7d9291
Compare
r? rust-lang/compiler |
I'm on vacation and will review in 2-3 weeks |
I need to be aware of what happens here, but right now I'm taking some break from reviewing, I'll hope to return to this some time later in January. Right now this PR seems to set a limit on number of tokens produced by a macro (*), which is not right because macros can simply produce a lot of code without any recursion. (*) Only a fn-like macro, but not an attribute or derive macro, which also doesn't look correct. |
One day I'll learn how to use crater properly 😓 (it needs a try build...) @bors try |
⌛ Trying commit 7ddb63a with merge d42a007e04d1d7df0de258d39ac2402f35aba932... |
☀️ Try build successful - checks-actions |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
@vincenzopalazzo any updates on this? |
@Dylan-DPC thinking how to move on on it, I guess it need a MCP and a compile team discussion |
Signed-off-by: Vincenzo Palazzo <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
7ddb63a
to
95d23d5
Compare
@vincenzopalazzo any updates on this? |
Now really @Dylan-DPC I was unable to work on anything in the past few months, so I think I will start the discussion again. Now that we have the @rust-lang/wg-macros I think the discussion should start from there before creating the MCP |
I'll set this to S-blocked to signal that it needs design work @rustbot S-blocked |
This PR required a little bit of content, as discussed on Zulip
The following code triggers a recursion that will keep adding tokens inside the list of tokens, as described here
This PR adds a new attribute
expansion_growth_limit
which allows us to fix this corner case where this happens and also can catch some performance problems in case of macros resolution.Closes #95698
@rustbot r? @Aaron1011