EnC - Need a way to determine if a class already has a lambda helper class #52759
Labels
Area-IDE
Concept-Design Debt
Engineering Debt, Design Debt, or poor product code quality
Interactive-EnC
Milestone
In #49010, there are multiple capabilities that a runtime can support for Edit and Continue. Two of these are
AddDefinitionToExistingType
andNewTypeDefinition
.When the user adds a lambda to a method the resulting IL change that needs to be applied could be adding a definition to an existing type, if there is already another lambda defined anywhere in the class, or a new type definition, if the new lambda is the first one in the class. Unfortunately we have no way of determining this right now so we simply have to check for both capabilities.
It is expected this will limit what a user can do in Mono.
This issue is referenced in source.
Consider: When determining the exact capabilities is complex we could check based on the results of EmitDifference (and possibly amend the results to allow these checks). This would allow for precise validation, but we would only report potential rude edits once the user triggers "Apply" (i.e. not as they are typing).
Consoder: Avoid sharing static closure types across methods when emitting EnC deltas (we can always include generation number in the type name).
Related: #66680
The text was updated successfully, but these errors were encountered: