Open tmat opened 2 years ago
Tagging subscribers to this area: @dotnet/area-system-reflection See info in area-owners.md if you want to be subscribed.
Author: | tmat |
---|---|
Assignees: | - |
Labels: | `area-System.Reflection` |
Milestone: | - |
@lambdageek
@tommcdon (FYI: I added area-EnC-CLR
label)
@davidwengier
cc @mikelle-rogers
Mono has had this code since time immemorial (but only for fields, not methods, properties, events, etc):
/* a field is ignored if it's named "_Deleted" and it has the specialname and rtspecialname flags set */
#define mono_field_is_deleted(field) (((field)->type->attrs & (FIELD_ATTRIBUTE_SPECIAL_NAME | FIELD_ATTRIBUTE_RT_SPECIAL_NAME)) \
&& (strcmp (mono_field_get_name (field), "_Deleted") == 0))
Perhaps we could formalize something like this? (on the other hand, this affects more than reflection in Mono, it's also used in the instance layout calculation, for example)
In any case, the ECMA "special name" attribute flags on members might be useful
Can you rename the label to area-EnC-coreclr
to match with the others' naming style (and I will keep only this because issues have only one area)? docs/area-owners.md
needs to be updated as well.
Tagging subscribers to this area: @tommcdon See info in area-owners.md if you want to be subscribed.
Author: | tmat |
---|---|
Assignees: | mikelle-rogers |
Labels: | `area-Diagnostics-coreclr`, `feature-request`, `area-EnC-mono` |
Milestone: | 8.0.0 |
I deleted area-enc-clr and added the area label area-diagnostics-coreclr
Throwing MissingMethodException
seems dubious because this exception usually means a mismatch between binaries from different compilations/versions. This is going to be misleading.
Roslyn now allows to delete type members. Deleted method bodies are updated to throw MissingMethodException or to call to the new method (WIP). The deletions are however not reflected in metadata returned by Reflection which may affect app frameworks that depend on Reflection information.
Consider adding a naming convention for names of deleted members that Roslyn can use to mark deleted members and that Reflection skips over when enumerating type members.