Skip to content

Implements support for reloadable types in the compiler#54852

Merged
tmat merged 6 commits intodotnet:mainfrom
tmat:ReloadableTypesCompiler
Jul 20, 2021
Merged

Implements support for reloadable types in the compiler#54852
tmat merged 6 commits intodotnet:mainfrom
tmat:ReloadableTypesCompiler

Conversation

@tmat
Copy link
Member

@tmat tmat commented Jul 15, 2021

When a type marked as "reloadable" is edited a new type with synthesized name {original-name}#{N} is emitted instead of updating the original type in-place (N is the generation ordinal).

Implements compiler support for emitting EnC deltas with reloadable types in EmitDifference. Adds a new SemanticEditKind.Replace to mark an edit as a replacement an existing type with its new version.

IDE changes using this API will come in a follow-up PR.

Contributes to #49006

@tmat tmat requested a review from a team as a code owner July 15, 2021 23:41
@ghost ghost added the Area-Compilers label Jul 15, 2021
@tmat
Copy link
Member Author

tmat commented Jul 15, 2021

@davidwengier PTAL

Copy link
Member

@davidwengier davidwengier left a comment

Choose a reason for hiding this comment

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

:shipit:

@davidwengier
Copy link
Member

Surprisingly simple (so far??)

@tmat
Copy link
Member Author

tmat commented Jul 16, 2021

Surprisingly simple (so far??)

Haha, yeah it takes an effort to make things simple :)

@davidwengier
Copy link
Member

Haha, yeah it takes an effort to make things simple :)

Absolutely! A few lines of code and 20+ years of experience to write them :)

@tmat tmat force-pushed the ReloadableTypesCompiler branch from 120b768 to 2fc0ec4 Compare July 19, 2021 15:44
@tmat tmat added this to the 17.0.P3 milestone Jul 19, 2021
@tmat
Copy link
Member Author

tmat commented Jul 19, 2021

@dotnet/roslyn-compiler PTAL

@RikkiGibson RikkiGibson self-assigned this Jul 19, 2021
@tmat tmat mentioned this pull request Jul 20, 2021
@tmat tmat enabled auto-merge (squash) July 20, 2021 21:33
@tmat tmat merged commit 104a98c into dotnet:main Jul 20, 2021
@ghost ghost modified the milestones: 17.0.P3, Next Jul 20, 2021
@tmat tmat removed this from the Next milestone Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants