-
Notifications
You must be signed in to change notification settings - Fork 10.7k
DocumentSnapshot system needs to understands imports better #5095
Copy link
Copy link
Closed
Labels
Needs: DesignThis issue requires design work before implementating.This issue requires design work before implementating.area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis 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-razor-pages
Milestone
Metadata
Metadata
Assignees
Labels
Needs: DesignThis issue requires design work before implementating.This issue requires design work before implementating.area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesenhancementThis 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-razor-pages
Type
Fields
Give feedbackNo fields configured for issues without a type.
tl;dr; Getting imports today isn't guaranteed to be correct in the DocumentSnapshot world.
When you go through the process of adding documents to the project system you can get into an invalid state where documents you pull from the project system may generate invalid output. Basically, adding all .cshtml files => generating their output and then adding a _ViewImports.cshtml to the project system results in all of the previous files not seeing the _ViewImports.cshtml file.
So we need to design some mechanism when every time an important import file enters the system the ProjectSnapshotManager needs to update all documents in the project to be aware.
This isn't an issue in VS windows today because we don't rely on the DocumentSnapshot system for import updates.
/cc @rynowak @ajaybhargavb