Skip to content
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

Add AssemblyExtensions.GetApplyUpdateCapabilities method #51954

Merged
4 commits merged into from
Apr 28, 2021

Conversation

lambdageek
Copy link
Member

Implement a private API that returns the hot reload capabilities of the current runtime.

The corresponding Roslyn API work is dotnet/roslyn#52566

Resolves #50111

@dotnet-issue-labeler
Copy link

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
Copy link
Member Author

/cc @mikem8361 @tmat


var result = mi.Invoke(null, null);

Assert.NotNull(result);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's bit odd to check for notnull if the return value is not declared as nullable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nullable annotations are just a suggestions. They do not guarantee any behavior. We have similar checks in many other tests.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ghost
Copy link

ghost commented Apr 28, 2021

Hello @lambdageek!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 636988a into dotnet:main Apr 28, 2021
@@ -62,4 +62,13 @@
<method signature="System.Void Initialize()" />
</type>
</assembly>

<!-- methods used by hot reload.
TODO: once there's a feature flag, add it to the linker descriptor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the Debugger.IsSupported feature switch for now? That's what we did for MetadataUpdateHandlerAttribute.

<!-- Hot reload attributes-->
<type fullname="System.Reflection.Metadata.MetadataUpdateHandlerAttribute">
<attribute internal="RemoveAttributeInstances" />
</type>

I can put a PR to fix this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes sense to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #51994

@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2021
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

internal runtime API to return hot reload capabilities
6 participants