-
Notifications
You must be signed in to change notification settings - Fork 515
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
More information on attributes #104
Comments
I think it would be great to add this! I personally have often wondered how attributes work. Do you happen to know how they interact with custom drive and proc macros? |
The implementation history for libsyntax(_ext) looked roughly like "let's urgently patch things up for 1.0" -> "let's urgently implement mostly working macros 1.1" -> "let's attract new contributors to tick some boxes for the proc macros rfc here and there", and soon "let's urgently implement mostly working macros 1.2 and also attributes for tools" all while keeping the old infrastructure for legacy syntax plugins. You can imagine the amount of technical debt. |
Do you think that libsyntax2.0 will replace all of this choas (if it happens)? |
There will be discussion about libsyntax 2.0 on friday @ all hands. I pre-ask this question :) cc @matklad I hear you organise discussion for that? |
@nagisa yep! And this attribute processing actually a nice illustration for he lossy nature of the current libsyntax. However libsyntax 2 is a hypothetical far away future, so it seems to me that the more actionable item here is to try to refactor the current attribute handling? |
@phansch Did you still want to take a stab at this? |
@mark-i-m Sorry I'm currently not in the position to dig into this :/ |
Triage: attribute rework is happening in rust-lang/rust#131808 thanks to @jdonszelmann. cc tracking issue rust-lang/rust#131229. |
hi! that's right, and I'll also write some things down about it. In general, the new |
@rustbot claim |
I recently wrote a clippy lint that deals with attributes (mostly outer attributes) and found very little information on how they are implemented. Most of the information I gathered through PR comments and issues in the rust repo. The reference only explains how to use the different attributes.
Do you think it would make sense to have a chapter on attributes in the guide?
Some weird things and questions I came across:
I would be happy to start something myself, but would need some pointers as to where the attribute stuff happens.
The text was updated successfully, but these errors were encountered: