-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Move the metadata update related APIs to the MetadataUpdater class #54590
Conversation
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
@lambdageek, I'm sure the mono version of MetadataUpdater.IsSupported isn't complete, but there is a place holder. |
src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs
Outdated
Show resolved
Hide resolved
src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs
Show resolved
Hide resolved
src/mono/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime.Loader/ref/System.Runtime.Loader.cs
Outdated
Show resolved
Hide resolved
src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs
Show resolved
Hide resolved
src/coreclr/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs
Outdated
Show resolved
Hide resolved
src/mono/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs
Show resolved
Hide resolved
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.
Mono bits LGTM. CoreCLR looks ok, too, but I'm not super-familiar with the code.
One thing to watch for: the ApplyUpdateTest
testsuite only runs in environments where ApplyUpdateUtil.IsSupported
is true - for CoreCLR that's basically everywhere, but for Mono in environments where we can't use the remote executor (ie mobile and webassembly) the whole class will only run when DOTNET_MODIFIABLE_ASSEMBLIES
is already set appropriately by the launcher.
So MetadataUpdater.IsSupported
will always return true if the AssemblyUpdateTest class is not skipped under Mono.
All I'm waiting for now is for @eerhardt to approve the feature switch changes and for the API review for making MetadataUpdater.GetCapabilities() public. |
src/coreclr/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.xml
Outdated
Show resolved
Hide resolved
src/mono/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs
Show resolved
Hide resolved
The old APIs AssemblyExtensions.ApplyUpdate() and AssemblyExtensions.GetApplyUpdateCapabilities() will be removed after all the references to them have been changed to the new APIs. Add the new IsSupported API described in issue dotnet#51159. Change the tests to use the MetadataUpdater APIs.
Fix the ApplyUpdate qcalls and icalls Add the ILLink substitutions for MetadataUpdater.IsSupported property Change the old APIs to call the new ones
…) internal. Fixed the argument checking in coreclr's MetadataUpdater.ApplyUpdate().
7e2722a
to
fa0b55d
Compare
src/mono/System.Private.CoreLib/src/System/Reflection/Metadata/MetadataUpdater.cs
Show resolved
Hide resolved
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
We should also update runtime/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml Line 34 in b1a4178
|
How would one make the attribute do that? The xml file just seems to be the attribute type. |
It's currently in the section for the debugger switch: runtime/src/libraries/System.Private.CoreLib/src/ILLink/ILLink.LinkAttributes.Shared.xml Line 3 in b1a4178
A new section should be added for the new switch and this attribute moved to that section. |
The old APIs AssemblyExtensions.ApplyUpdate() and AssemblyExtensions.GetApplyUpdateCapabilities() will be removed
after all the references to them have been changed to the new APIs.
Add the new IsSupported API described in issue #51159.
Change the tests to use the MetadataUpdater APIs.
/cc: @pranavkm, @eerhardt