[hot reload] Validate / Implement support for adding static extern
methods
#102080
Labels
area-Diagnostics-coreclr
area-EnC-mono
Hot Reload for WebAssembly, iOS/Android, etc
enhancement
Product code improvement that does NOT require public API changes/additions
Milestone
Related Roslyn issue: dotnet/roslyn#73421
The
[UnsafeAccessorAttribute]
(API Proposal) is used onstatic extern
functions to instruct the .NET runtime to generate an accessor method to a type member that bypass the normal .NET visibility checks.With
[UnsafeAccessor]
it becomes possible to use source-generated reflection-free serializers that can serialize and deserialize fields of user-defined classes. For example, a user may add a new field_hidden
toMyClass
and the source generator will add a new accessor method toAccessHelpers
and generate a methodDeserializeMyClass
that uses the access method to populate the hidden field.Currently if the user adds a second private field
_hidden2
and the generator adds a newstatic extern
method, EnC will report a rude edit:Note that it should work with generics, too
After Roslyn adds support for EnC deltas to include
static extern
methods, we need to validate that such deltas are processed appropriately by the .NET runtimes:static extern
methodsstatic extern
methodsThe text was updated successfully, but these errors were encountered: