-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Reimplement the Razor compiler using source generators & support incrementality #26902
Copy link
Copy link
Closed
Closed
Copy link
Labels
DoneThis issue has been fixedThis issue has been fixedEpicGroups multiple user stories. Can be grouped under a theme.Groups multiple user stories. Can be grouped under a theme.Priority:0Work that we can't release withoutWork that we can't release withoutTheme: inner-loopaffected-allThis issue impacts all the customersThis issue impacts all the customersenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-source-generatorsseverity-blockingThis label is used by an internal toolThis label is used by an internal tool
Milestone
Metadata
Metadata
Assignees
Labels
DoneThis issue has been fixedThis issue has been fixedEpicGroups multiple user stories. Can be grouped under a theme.Groups multiple user stories. Can be grouped under a theme.Priority:0Work that we can't release withoutWork that we can't release withoutTheme: inner-loopaffected-allThis issue impacts all the customersThis issue impacts all the customersenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-source-generatorsseverity-blockingThis label is used by an internal toolThis label is used by an internal tool
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
The Razor compiler today represents a significant portion of time experienced by developers in inner-loop scenarios. We should investigate reimplementing it to be based on source generators to avoid the cost of an extra discrete step and removal of another process associated with building.
Today, the Razor compilation process is non-incremental, meaning even the smallest change to any Razor file results in a complete build of all Razor assets in a project. We should investigate the potential for adding further incrementality to Razor compilation so that unnecessary compilation time is not spent between edits.
Notes
The hypothesis is that an additional compile step can be eliminated along with state management if we are able to use source generators. We might also benefit of not producing janky types in design time builds.
Tasks