-
Notifications
You must be signed in to change notification settings - Fork 4k
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
EnC - Runtime capabilities support #52566
EnC - Runtime capabilities support #52566
Conversation
…removed in future when the debugger API changes.
dc27bfb
to
18bfbbe
Compare
src/Features/Core/Portable/EditAndContinue/ManagedEditAndContinueCapability.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/ManagedEditAndContinueCapabilities.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/ManagedEditAndContinueCapabilities.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/ManagedEditAndContinueCapabilities.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/ManagedEditAndContinueCapabilities.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # src/Features/Core/Portable/EditAndContinue/EditAndContinueDiagnosticDescriptors.cs # src/Features/Core/Portable/EditAndContinue/RudeEditKind.cs # src/Features/Core/Portable/FeaturesResources.resx
src/Features/Core/Portable/EditAndContinue/AbstractEditAndContinueAnalyzer.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/ManagedEditAndContinueCapability.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/ManagedEditAndContinueCapability.cs
Outdated
Show resolved
Hide resolved
Baseline = 1 << 0, | ||
AddDefinitionToExistingType = 1 << 1, |
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.
Unclear on what "Baseline" here means.
AddDefinitionToExistingType
may be too broad for Mono. I think the following will present different challenges to Mono:
- adding (non-virtual) static and instance methods
- adding static fields
- adding instance fields
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.
Baseline means capabilities that Mono 6, .NET FX and .NET 5 have in common.
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.
I've expanded out that into these constituent parts, hopefully that at least puts you in control @lambdageek
Let me know what you think.
Thanks for the feedback! A bunch of security work came up today and I ran out of time, will address it on Monday. |
"NewTypeDefinition" => ManagedEditAndContinueCapability.NewTypeDefinition, | ||
|
||
// To make it eaiser for runtimes to specify more broad capabilities | ||
"AddDefinitionToExistingType" => ManagedEditAndContinueCapability.AddMethodToExistingType | ManagedEditAndContinueCapability.AddStaticFieldToExistingType | ManagedEditAndContinueCapability.AddInstanceFieldToExistingType, |
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.
Not sure if this is being too clever, but also I imagine it would be a pain to try to get Mono and .NET runtimes to keep pace with the same breakdown of capabilities.
This could go further too, for example AddFieldToExistingType = AddStaticFieldToExistingType | AddInstanceFieldToExistingType
, or breaking up AddMethodToExistingType
. Not sure what the sweet spot is now, or if we just revisit later?
src/Features/Core/Portable/EditAndContinue/ManagedEditAndContinueCapability.cs
Outdated
Show resolved
Hide resolved
src/Features/Core/Portable/EditAndContinue/ManagedEditAndContinueCapability.cs
Outdated
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.
/// <summary> | ||
/// Creating a new type definition. | ||
/// </summary> | ||
NewTypeDefinition = 1 << 2 |
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.
@davidwengier oops! this is the same bit value as AddStaticFieldToExistingType
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.
Oops is what I said too :)
The fix missed the 4pm snap unfortunately, but has been merged to 16.10 already: #52935
Fixes #49010
This just has a dummy extension method implementation, will be removed in a vs-deps branch which has a real implementation from the debugger.