-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Bug] error out in compilation when encounter an unknown annotation/attribute #8875
Comments
list of allowed attributes is implicitly in the constants defined here. Oops, extended_checks.rs also has a few known attributes ("legacy_entry_fun", "view", "group", "scope", "resource_group", "resource_group_member", "group"), with an odd variety of constant names associated with them. We’re also missing #[deprecated{ More from Slack discussion: Kevin Hoang Wolfgang Grieskamp Kevin Hoang |
Specific Requirements:
|
Wolfgang is apparently greatly proposed to a flag registering more attributes, so we'll just have a flag to skip checks. |
Yes, I do think we should leave user registerable attributes to the compiler v2 and language extensions. Specifically, I propose to do attributes similar as in C#/Java, so they can be declared in the language, together with typing of their parameters, as in:
Besides this being more general, the flag approach doesn't seem to cover what people expect from compiler command line options. A user would have to every single time specify this options, if he forgets, then compilation fails. Moreover, the allowed parameters of the attributes cannot be easily defined this way. I assume at this point not many people are out there which actually use there own attributes. Those few can be grandfathered by the the single flag |
🚀 Feature Request
Compiler ignores unknown annotations but actually it should just error out. Otherwise, typo must be introduced while the author doesn't know. For example -> #8866 for examples.
Motivation
#[testonly]
in #8866 for examples.Pitch
Additional context
The text was updated successfully, but these errors were encountered: