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 }}
Repository navigation
[InlineArray] should not have [EditorBrowsableState(Never)] #94283
This seems... Wrong? There's no built-in C# syntax for inline arrays for now, so the attribute has to be used explicitly in user code. The fact it's hidden makes this clunkier than it needs to be. The attribute is already buried in a namespace that's explicitly documented as "unsafe" and only for advanced users, so this feels unnecessary.
Shouldn't we just remove this?
And if so, I take it the ship has sailed for .NET 8 GA at this point?
Reacted by Alex Rønne Petersen, Enderlook, neon-sunset, xparadoxical, Paulus Pärssinen, Cole Tobin, Joni Aromaa and Zintom
Activity
ghost added
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
I think the attribute was simply copied from other similar types when we still had assumptions that users will not need to put the attribute directly in the code, but instead compilers would emit it when implementing inline-array-like features.
In the final design of the feature on C# side there is indeed no special syntax to declare inline array types and thus it requires using the attribute.
Activity
MichalStrehovsky commentedon Nov 2, 2023
Cc @VSadov - I can't find where the EditorBrowsable came from. I don't see the API review mentioning this.
stephentoub commentedon Nov 2, 2023
Yes, this should not be EditorBrowsableState.Never. We should remove it, and ideally service that for 8.
Sergio0694 commentedon Nov 2, 2023
Happy to take this and make a PR if this is up for grabs. I can also add the missing XML docs while at it 🙂
tannergooding commentedon Nov 2, 2023
@Sergio0694, assigned to you
VSadov commentedon Nov 5, 2023
I think the attribute was simply copied from other similar types when we still had assumptions that users will not need to put the attribute directly in the code, but instead compilers would emit it when implementing inline-array-like features.
In the final design of the feature on C# side there is indeed no special syntax to declare inline array types and thus it requires using the attribute.
@Sergio0694 Thanks for fixing this!!