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

EnC - Need a way to determine if a class already has a lambda helper class #52759

Open
davidwengier opened this issue Apr 20, 2021 · 1 comment
Labels
Area-IDE Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality Interactive-EnC
Milestone

Comments

@davidwengier
Copy link
Contributor

davidwengier commented Apr 20, 2021

In #49010, there are multiple capabilities that a runtime can support for Edit and Continue. Two of these are AddDefinitionToExistingType and NewTypeDefinition.

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

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Apr 20, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@jinujoseph jinujoseph added Concept-Continuous Improvement and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Apr 20, 2021
@jinujoseph jinujoseph added this to the Backlog milestone Apr 20, 2021
@jinujoseph jinujoseph added Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality and removed Concept-Continuous Improvement labels Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-Design Debt Engineering Debt, Design Debt, or poor product code quality Interactive-EnC
Projects
None yet
Development

No branches or pull requests

3 participants