This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
MVC precompilation design notes 5/12/2015 #2551
Closed
Description
Today we had a design meeting with: @Alxandr @danroth27 @DamianEdwards @davidfowl @dougbu @lodejard @pranavkm @NTaylorMullen @ToddGrun @muratg
Please add your own thoughts as comments to this thread.
Agenda
- Discuss specific goals for precompilation in ASP.NET 5
- What kind of precompilation should we support? Updateable? Non-updateable?
- When should it work? Dev-time (i.e. while working in VS)? Deploy-time?
- Discuss current set of issues related to precompilation, including:
- MVC ignores precompiled views where it cannot find the source file #2462 - MVC ignores precompiled views where it cannot find the source file
- PrecompilationWebSite has troubles building in VS #2498 - PrecompilationWebSite has troubles building in VS
- TagHelper tooling does not work with pre-compilation enabled. RazorTooling#10 - TagHelper tooling does not work with pre-compilation enabled.
Meeting notes
- Precompilation should not be enabled by default in project templates (it can exist, but should not be used in DTH scenarios)
- Precompilation is for:
a. Server optimization (especially for large sites)
b. Avoiding using a compiler on the server, which is good for security purposes
c. Components with everything compiled in (including views) and ready to go - Precompilation should not require any physical files on disk
- Precompilation behaviors:
a. All view locators would always check for a file “on disk” (whether it’s physical or virtual)
b. Precompilation would embed at least empty placeholder files into a virtual embedded file system
c. You could also have a case where you embed the full files into the embedded file system, but also have precompilation enabled. You would then have updateable precompilation. - We should use precompilation (or something else that’s similar! E.g. a Roslyn Analyzer?) to enable showing Razor errors in VS
- Question: Should any of these behaviors change while in DesignTimeHost (DTH)?
- Question: How do you enable precompilation? Today it’s a CompileModule. Should it be something else?
- Action item: Need to dig into exactly why the tag helper scenario is broken, and address that specifically.
- Action item: Should we remove Roslyn dependency from Razor? (Not interesting right now)