You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Inconsistencies in RequiresAttribute argument validation #2554
When checking for RequiresAttribute, we sometimes validate the arguments, and sometimes don't (look for VerifyAttributeArguments - currently this is only called when looking for attributes on the ctor of a type substituted for a generic parameter with a new constraint).
We should be consistent - most likely by validating the attribute arguments for every RequiresAttribute instance.
There were some problems with the implementation - I remember discussing this with @tlakollo . We intentionally split the validation - but I don't remember the details.
I'm thinking a safer thing would be to call "Validate" on the attribute as well - it basically checks that the attribute is in the form we recognize. As a safe guard against potential future changes which could for example add some kind of "feature condition" to the RUC attribute (I know we've discussed this), in which case the attribute is not always "active", so it's safer to NOT recognize it.
Activity
vitek-karas commentedon Jan 28, 2022
There were some problems with the implementation - I remember discussing this with @tlakollo . We intentionally split the validation - but I don't remember the details.
sbomer commentedon Jan 31, 2022
@vitek-karas in #2553 (comment)
@vitek-karas in #2553 (comment)