Commit Graph

70 Commits

Author SHA1 Message Date
Pranav K 59db8143da Updating CompilerCache to use IMemoryCache and file system watcher to
expire files in razor file cache.

Add a functional test to ensure the compiler cache does not get
initialized until the first request to a View.

Fixes #1708
2015-02-05 09:52:17 -08:00
Pranav K 7c7eaa264d Use CRC32 instead of MD5 for hashing the file content.
Fixes #1800
2015-01-30 18:01:24 -08:00
Chris Ross d51dad9560 Handle IFileSystem rename. 2015-01-20 12:16:30 -08:00
Pranav K a94d5223e1 Modify RoslynCompilationService to read MetadataReferences from the target 2015-01-16 12:39:04 -08:00
Pranav K b7d44666b8 Adding support for flowing compilation errors to Diagnostics middleware
Fixes #872
2015-01-13 07:32:58 -08:00
Doug Bunting 6df288bce7 Correct StyleCop violations
- StyleCop working again (handles C# 6.0 additions) though only locally for me
- disable some new rules:
 - ConstFieldNamesMustBeginWithUpperCaseLetter
 - InstanceReadonlyElementsMustAppearBeforeInstanceNonReadonlyElements
 - StaticReadonlyElementsMustAppearBeforeStaticNonReadonlyElements
 - StaticReadonlyFieldsMustBeginWithUpperCaseLetter
 - PrefixCallsCorrectly
- correct remaining violations
 - lots of long lines for example
 - use more `var`; some manual updates since StyleCop doesn't check seemingly-unused blocks

nit: remove new trailing whitespace (was paranoid about adding it w/ fixes)
2015-01-06 16:23:57 -08:00
Troy Dai bc6833ee72 Fix build break 2015-01-06 11:01:20 -08:00
Pranav K 110ee28e3e Adding support for flowing compilation settings to views
Fixes #871
2015-01-02 15:34:52 -08:00
Pranav K c6eaf00b02 Reacting to FileSystem changes 2014-12-19 17:38:29 -08:00
Pranav K e078076408 Adding functional test for RazorViewEngineOptions.FileSystem 2014-12-16 12:08:40 -08:00
Praburaj 3dfcc884fe Changes to address IFileSystem.Watch method addition
Absorbs the new IFileSystem interface. This change is to just address the breaking change introduced in IFileSystem.
Razor has to do the necessary changes to subscribe to the Watch event for expiring the modified files.
2014-12-11 10:00:46 -08:00
Pranav K 275d03a958 Compilation of Views should be affected by changes to _ViewStart files
that are applicable to the view.

Fixes #974
2014-12-05 14:44:36 -08:00
Praburaj cfd5630cf2 Addressing breaking IFileSystem changes
@pranavkm
2014-12-02 15:58:05 -08:00
Doug Bunting 315908af5f Apply VS' FormatDocument and RemoveAndSort to all *.cs files
- #EngineeringDay
- VS does not yet format auto-properties nicely; reverted what it did

Also revert changes under
- test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles
2014-11-20 21:15:46 -08:00
Pranav K 74da350086 Remove enableInstrumentation from CompilerCache and IMvcRazorHost 2014-11-02 18:15:39 -08:00
David Fowler 653d31b336 Don't lock metadata references 2014-10-27 16:14:32 -07:00
David Fowler 4cddf880ec React to KRuntime change 2014-10-22 23:21:41 -07:00
YishaiGalatzer f9661dfcd0 Fix pdb generation for win7/coreclr 2014-10-22 17:09:39 -07:00
Hao Kung 448ac5a0dc React to options and hosting changes 2014-10-14 19:20:28 -07:00
Pranav K 2d67f2fc27 Modify precompilation to always generate instrumentation 2014-10-14 16:10:33 -07:00
Pranav K 3f29de5a5f Ensure PDB writer component is available before emiting PDB
Ported from
36cd4901f6

Fixes #1324
2014-10-14 06:17:52 -07:00
Pranav K a633ef4f97 Modify Razor components to use RazorViewEngineOptions.FileSystem
Fixes #1302
2014-10-13 14:34:31 -07:00
YishaiGalatzer 0d603a38cf PR feedback and sort/clean MvcServices 2014-10-12 16:37:17 -07:00
Pranav K 20eadb94ee Remove instrumentation from public API surface
Fixes #1262
2014-10-12 12:57:04 -07:00
YishaiGalatzer 75084ba0cd Move caching of compilation results to its own layer.
This will allow only creating the razor compilation when really needed, with the right lifetime.
2014-10-11 15:35:11 -07:00
YishaiGalatzer 275f63e91f Prevent Roslyn from loading prematurely on cold start 2014-10-09 23:34:02 -07:00
David Fowler f076fc7dcf React to roslyn changes 2014-10-03 03:23:04 -07:00
Pranav K 12477c9f52 Changes to make EnableInstrumentation conditionally enabled 2014-10-02 17:55:40 -07:00
Pranav K ad8ab4b8fd Adding support for ViewLocationExpanders to allow modifying view locations
without changing the view engine.

Fixes #1039
2014-10-01 16:15:25 -07:00
Pranav K a4fff7a2e0 Removing declaration expressions 2014-10-01 14:41:13 -07:00
David Fowler b9d433168e Convert memory streams to the byte[] before passing it to roslyn 2014-09-26 16:56:15 -07:00
David Fowler 8b62057aa3 Don't close the stream when reading AssemblyMetadata 2014-09-26 03:06:02 -07:00
YishaiGalatzer 6600e68fc0 Create a pre compilation module and apis to allow meta programming
to precompile razor pages.

This is limited to sites where the .cshtml are still deployed. It's
current purpose is to speed up startup. Deploying without the razor
files is a separate feature.
2014-09-25 11:26:11 -07:00
Pranav K a468986155 Removing unused variable from RoslynCompilationService 2014-09-15 14:44:39 -07:00
Wei Wang 447336b4f3 React to renaming TargetFramework to RuntimeFramework 2014-09-11 11:49:53 -07:00
Pranav K 764b1e64b8 RoslynCompilationService should set the generated code when compilation is successful
Fixes #895
2014-08-19 09:24:28 -07:00
dougbu 75525ab525 Wrap a long URI 2014-08-13 11:08:42 -07:00
David Fowler 079fe5749d Added comment about the source of the Covert method 2014-08-13 09:30:01 -07:00
David Fowler 6f54d05105 Made razor compilation more robust
- Support other kinds of references when compiling razor views
- Cache application references since they can't change throughout the lifetime
of the running application
2014-08-12 21:44:21 -07:00
Pranav K 74bb8288b0 Making RoslynCompilationService a singleton.
* Minor code cleanup from previous compilation related PR.
2014-08-11 14:36:58 -07:00
Pranav K c12a4795ca Removing AdditionalInfo from CompilationResult since we can't always pass
it into exception thrown

All values in Exception.Data need to be serializable which is not true for
the diagnostics. Removing this property since we can't pass it through.
2014-08-11 10:25:12 -07:00
Pranav K 5e010597cd Propogate additional compilation data from RoslynCompilationService
* Update CompilationFailedException to include path of file being compiled
* Pass in path being compiled to Rolsyn.
* Adding doc comments for compilation pieces

Fixes #869
2014-08-08 18:22:13 -07:00
David Fowler 5708f7592b Changing GetLibraryExport to GetAllExports 2014-07-31 16:55:01 -07:00
Pranav K cc0dadc6b6 More Stylecop cleanup for ModelBinding and Razor 2014-06-09 14:27:12 -07:00
David Fowler 812d5328d2 React to aspnet/KRuntime#65 2014-05-28 02:00:03 -07:00
Andrew Peters f13865dedc Updating copyright headers 2014-05-08 23:01:20 -07:00
David Fowler 3b31df3d29 React to renames 2014-05-08 03:24:18 -07:00
anpete 8208cd6b2f Update file headers 2014-05-01 17:42:33 -07:00
David Fowler 8d53d40647 CR feedback 2014-04-28 11:19:36 -07:00
David Fowler cff4a21e08 Make razor roslyn compilation work on mono
- Added a metadata cache (we need this for core clr). Will consider
moving this into the core
- Skip pdb generation on mono
2014-04-28 11:19:36 -07:00