-
Notifications
You must be signed in to change notification settings - Fork 13.3k
fix for new attributes failing issue #22964 #23056
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nrc (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
I'm not clear on why these cfgs shouldn't be removed on snapshot? Isn't bootstrapping then done? Perhaps I don't understand the motivation here. |
cc @Manishearth |
from my limited understanding during stage0 a new rust attribute isn't recognized. So we don't fail for #[foo] until stage1. bootstrap might of been the wrong word to use.e |
cc @huonw |
What is the motivation for using these blanket cfgs, rather than a cfg(not(stage0)) when you use a new attribute (like we do with everything else that is a struggle due to bootstrapping)? |
@huonw would probably be the best person to ask about this. He pointed out over irc that @Manishearth proposed fix #[cfg(not(stage0))] would have some sort of staging issue. |
@nrc This is because we want people to be able to add new custom attributes easily. The current process is:
This is a permanent fix allowing them to use these features without any issues at stage0. |
@Manishearth That is the same procedure for making any compiler changes, not really sure why we should give special treatment to new attributes |
Because custom_attribute isn't supposed to apply to the compiler anyway. It's for back compat only, so it's annoying to have this break what is otherwise a straightforward workflow. |
Basically, this removes an extra annoyance from bootstrapping and makes us require less snapshots. |
I don't think it means fewer snapshots, it means you get to avoid faffing around with cfgs, which is still a good thing (because it is so annoying). I do worry that this is a bit of a footgun every time someone does a snapshot (it means they're less automatic to do). I also like having a uniform process rather than exceptions, even if those exceptions make things easier. Still it is simple to rewind, and look likes a win overall, so @bors: r+ 1e68dfd |
Oh, I guess squashing the commits would be better too |
@bors: r- |
Sorry, please get rid of the merge commit - rebase and squash the commits please, r+ with that |
@nrc all finished up |
@bors: rollup r=nrc |
No description provided.