-
Notifications
You must be signed in to change notification settings - Fork 4.2k
EnC: Mark deleted members with an attribute #79764
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
Conversation
|
@DustinCampbell @phil-allen-msft @dotnet/roslyn-compiler ptal |
|
Actually, just realized this might cause undesired behavior in some cases. Following up... |
|
@333fred ptal again. I have reverted the rename and replaced it with emitting an attribute. See description. |
|
@dotnet/roslyn-compiler PTAL |
src/Compilers/Core/Portable/Emit/EditAndContinue/DeletedSourceEventDefinition.cs
Outdated
Show resolved
Hide resolved
src/Compilers/Core/Portable/Emit/EditAndContinue/DeletedSourceEventDefinition.cs
Outdated
Show resolved
Hide resolved
src/Compilers/Core/Portable/Emit/EditAndContinue/DeltaMetadataWriter.cs
Outdated
Show resolved
Hide resolved
|
|
||
| System_Runtime_CompilerServices_HotReloadException__ctorStringInt32, | ||
| System_Runtime_CompilerServices_MetadataUpdateOriginalTypeAttribute__ctor, | ||
| System_Runtime_CompilerServices_MetadataUpdateDeletedAttribute__ctor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we aiming to add the BCL type in .NET 10 or did we miss the window? At least, we should get the API design proposal approved before .NET 10 ships
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My question was about timing. Talked to Jeff Handley just now and it looks like there's still a window to add APIs in .NET 10 (RC2 code complete late September). Sounds like he's the area owner, so he'll follow-up with Tomas to get this through API review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking with @steveisok
src/Compilers/Core/Portable/Emit/EditAndContinue/DeletedSourcePropertyDefinition.cs
Outdated
Show resolved
Hide resolved
src/Compilers/Core/Portable/Emit/EditAndContinue/DeltaMetadataWriter.cs
Outdated
Show resolved
Hide resolved
src/Compilers/Core/Portable/Emit/EditAndContinue/DeletedSourceEventDefinition.cs
Show resolved
Hide resolved
src/Compilers/Core/Portable/Emit/EditAndContinue/DefinitionMap.cs
Outdated
Show resolved
Hide resolved
src/Test/PdbUtilities/EditAndContinue/EditAndContinueTest.GenerationVerifier.cs
Show resolved
Hide resolved
src/Test/PdbUtilities/EditAndContinue/EditAndContinueTest.GenerationVerifier.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Test/Emit2/Emit/EditAndContinue/EditAndContinueTests.cs
Show resolved
Hide resolved
jcouv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with review pass (commit 4)
jcouv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (commit 6)
Prefixes the name of deleted methods, properties and events withdeleted_and sets their SpecialName flag to true.This will allow Reflection to filter out deleted members.
Contributes to dotnet/runtime#75154
Implements #69834
UPDATE:
Just realized that renaming the method is not desirable for public methods. If we rename method
Mtodeleted_ManyMemberReftoken that refers toMfrom outside of the assembly will fail to resolve when JIT compiles the caller. That will throwMissingMethodException, which is not what we want. We want the deleted method to be called and its body throwsHotReloadException.Instead we emit
System.Runtime.CompilerServices.MetadataUpdateDeletedAttributeon the deleted member, if the attribute is defined.[jcouv:] API proposal for MetadataUpdateDeletedAttribute