Commit Graph

1544 Commits

Author SHA1 Message Date
N. Taylor Mullen 99010aaea4 Change EditorSettingsManager to not be per-workspace.
- Lifted `DefaultEditorSettingsManagerInternal`s state / event handling functionality into its `DefaultEditorSettingsManager`.
- Re-purposed `EditorSettingsManagerInternal` into a less-API heavy middleman `WorkspaceEditorSettings` for any workspace services concerned with editor settings to consume.
- Moved `DefaultEditorSettingsManagerInternal` into the Editor.Razor assembly and renamed it to `DefaultWorkspaceEditorSettings` since it needed the `EditorSettingsManager` API to function properly. The contract still exists at the `CodeAnalysis.Razor.Workspace` level.

#1982
2018-01-30 16:01:55 -08:00
Ajay Bhargav Baaskaran 9244383ec7 Modified integration test infrastructure to test build server 2018-01-30 15:55:17 -08:00
Ajay Bhargav Baaskaran b677a9e43f Skip only on non-windows 2018-01-29 18:56:18 -08:00
Ajay Bhargav Baaskaran 399216730a Temporarily skip tests 2018-01-29 18:27:45 -08:00
Pranav K 13388ca6ae Make testapps run without deployment 2018-01-29 18:12:35 -08:00
N. Taylor Mullen c0cb8f009c Update RazorProjectEngine to use RazorConfiguration.
- In this PR we do away with `CreateDesignTime` on the `RazorProjectEngine`. Instead we now have an overload that takes in a configuration and does the right thing.
- Updated `RazorProjectEngineBuilder` to have a configuration.
- Updated `RazorConfiguration` to only have a `Default`. Setting up a razor configuration for design time now requires calling code to construct the configuration manually.
2018-01-29 16:08:17 -08:00
N. Taylor Mullen 80f943caef Flow RazorLanguageVersion to RazorEngine.
- Restructured RazorLanguageVersion to be a sealed concrete type to enable things like `RazorLanguageVersion.Latest`; it also allows us to make broader changes in the future. Also, in the future if we want to add support for overriding operators to enable greater than comparisons we can as well.
- Removed version validity checks because we restrict who can construct a `RazorLanguageVersion` now. This way we don't have to check for valid versions all throughout our code.
- Added a simple `ProjectExtensibilityConfiguration` => `RazorLanguageVersion` method in the `DefaultProjectExtensibilityConfigurationFactory` to temporarily enable letting the system operate on the `RazorLanguageVersion`. Eventually that entire class will change.

#1961
2018-01-29 16:08:17 -08:00
Pranav K cf578e103b Merge remote-tracking branch 'origin/release/2.1' into dev 2018-01-29 11:17:55 -08:00
Pranav K 766862390b Print an error when Razor targets are invoked from a multitargeting build 2018-01-29 11:17:32 -08:00
Pranav K ee9f9225c3 Remove unused property 2018-01-29 07:45:46 -08:00
N. Taylor Mullen 84bc0fa4c9 Change ForegroundDispatcher to be a MEF service.
- The `ForegroundDispatcher` needed to be accessible by services without requiring a workspace; given that it doesn't have any ties to the `Workspace` other than being a service of one I was able to move it into a MEF service.
- Updated all workspace inclusions of the dispatcher to use importing constructors instead.
- Updated the Mac + Windows implementations to be exported as MEF pieces.

#1979
2018-01-26 17:14:40 -08:00
Ajay Bhargav Baaskaran 004ff204aa Refactoring, naming cleanup and tests for build server
- Multiple renames and cleanup
- Added tests for ServerProtocol and RequestDispatcher
- Added ServerLifecycleTest
2018-01-26 16:19:22 -08:00
Pranav K 42c3102cd4 Changes per PR comments 2018-01-26 11:04:24 -08:00
Pranav K bd72b1bac9 Don't import the SDK when cross-targeting 2018-01-26 11:04:24 -08:00
Pranav K 44f102d6ff Remove multitargeting target 2018-01-25 16:07:44 -08:00
Pranav K 04bf7eec0f Introduce a Razor SDK package
Move parts of Razor.Design in to an SDK that ship with the CLI.
2018-01-25 14:26:30 -08:00
N. Taylor Mullen 771a7e35a4 Add MVC support for RazorProjectEngine.
- Make `RazorProjectEngine` call paths for all feature registrations.
- Add `DefaultMvcImportFeature` for latest and 1.X MVC.
- Ported `AddTargetExtension` and `AddDirective` to `RazorProjectEngineBuilderExtensions`.
- Added tests and a test file system project type.
- Moved obsolete `IRazorEngineBuilder` methods to the bottom of each file. Will actually obsolete the methods once `RazorProjectEngine` is working end-to-end.

#1828
2018-01-25 12:26:11 -08:00
Ryan Brandenburg bc6d726c36 Preview2 2018-01-25 09:37:00 -08:00
Ajay Bhargav Baaskaran d9b7ff238f Unified cli tools
- Removed GenerateTool and TagHelperTool
- rzc now handles four commands (server, shutdown, discover and
generate)
- Removed RequestCommand
2018-01-24 15:38:11 -08:00
Ajay Bhargav Baaskaran 4500de5862 Build server working end to end
- Added a UseServer switch
- Updated tasks to use the build server in enabled
2018-01-24 15:30:37 -08:00
N. Taylor Mullen 5c6ff4366f Make it so MPacks generate in Mac build.
#1966
2018-01-24 12:28:01 -08:00
N. Taylor Mullen aa3fb32220 Revert "Revert "Add contracts for RazorProjectEngine.""
This reverts commit f301d92332.
2018-01-24 11:20:18 -08:00
Pranav K 21192c6d7b Merge branch 'release/2.1' into dev 2018-01-23 15:50:47 -08:00
Pranav K c7d376dc61 Branching for 2.1.0-preview1 2018-01-23 15:32:31 -08:00
N. Taylor Mullen c1b0f10d04 Update RazorExtensions VSIX version to 15.8 2018-01-23 12:13:31 -08:00
N. Taylor Mullen 748fe8adc8 Merge branch 'rel/vs15.7' into dev 2018-01-23 12:10:18 -08:00
N. Taylor Mullen af12a455ff Update RazorExtensions VSIX version to 15.7. 2018-01-23 12:08:15 -08:00
N. Taylor Mullen f301d92332 Revert "Add contracts for RazorProjectEngine."
This reverts commit 59f2cf8e66.
2018-01-23 11:42:38 -08:00
N. Taylor Mullen 59f2cf8e66 Add contracts for RazorProjectEngine.
- These contracts introduce a new `RazorProjectEngine` concept which allows for users to configure 1 entity that's responsible for the RazorEngine and project.
- The `RazorProjectEngineBuilder` has a collection of features that are dispersed on the created `RazorEngine` and the `RazorProjectEngine`.
- Included a complete implementation of `RazorProjectEngine` it introduces the extension points for the project engine. The primary one includes the `IRazorImportFeature`, the default behavior is to return 0 imports.
- Included a complete project engine builder implementation.

#1828
2018-01-22 17:05:43 -08:00
Ryan Nowak 2d87bdf565
Add support for MvcPrecompilation settings (#1956)
* Add support for MvcPrecompilation settings

Adds support to the Razor SDK for various legacy features of the MVC
Precompilation tool.

- MvcRazorCompileOnPublish
- MvcRazorExcludeViewFilesFromPublish
- MvcRazorExcludeRefAssembliesFromPublish
- MvcRazorOutputPath
- MvcRazorEmbedViewSources
- MvcRazorFilesToCompile
2018-01-22 16:56:58 -08:00
Ryan Nowak b9db1ac7c8 update deps 2018-01-19 13:59:31 -08:00
Pranav K a00569249b Fix broken build 2018-01-19 13:48:14 -08:00
Pranav K 5232d2352b Use unique names for commonly used properties
Fixes #1948
2018-01-19 11:10:52 -08:00
Ryan Nowak 233e67d0e0 Prepare for Web SDK changes
The Web SDK is going to set a new msbuild property to tell us that the
Razor SDK should be active. This hasn't been integrated into our build
system yet, so I'm temporarily hacking it until we get that change. At
that time I'll remove the special cases in these projects.
2018-01-18 19:23:34 -08:00
Ryan Nowak d4ed8a7b77 Prefer BeforeTargets/AfterTargets over evaluation
We can't rely on property evaluation to attach targets to the build
lifecycle, as we rely on the web sdk to set these properties and they
run after us.
2018-01-18 18:37:54 -08:00
Ryan Nowak eaa201703d Fix build break
We didn't have a test for the case where RazorCompileOnPublish is false
and Publish is being called. This is breaking the precompilation repo.
2018-01-17 18:12:24 -08:00
Ryan Nowak d1cfc51c9d Add a property so the web sdk can know that the Razor compiler is available. 2018-01-17 17:21:20 -08:00
N. Taylor Mullen 49a3b6bcae Use ZipArchive task instead of powershell.
#1937
2018-01-17 16:07:07 -08:00
Ryan Nowak 0584fe3ecf Make RazorCompileOnPublish the default 2018-01-17 13:06:20 -08:00
Ryan Nowak 627696677c
Split up Razor SDK logic (#1934)
* Split up Razor SDK logic

Splitting the fragile parts of code generation into its own file. We're
possibly separating the Razor SDK into a part that ships in the dotnet
SDK and part that ships in a nupkg with the compiler.

This means defining more of a fixed lifecycle in the main file, and
treating our actual work as more like extensibility.
2018-01-17 12:52:17 -08:00
Ajay Bhargav Baaskaran eb107092d9 Upgrade dependencies 2018-01-17 12:35:26 -08:00
N. Taylor Mullen 968e033e4b Make Block and Span cache Length.
- Part of caching length required the `Span`'s `ReplaceWith` method to propagate its changes to its parent so that it can propogate the change to invalidate all parent length caches.
- Added Span and Block tests to validate the interaction of caching.

#1927
2018-01-16 21:14:46 -08:00
N. Taylor Mullen 92111ea515 Make Block and Span cache Length.
- Part of caching length required the `Span`'s `ReplaceWith` method to propagate its changes to its parent so that it can propogate the change to invalidate all parent length caches.
- Added Span and Block tests to validate the interaction of caching.

#1927
2018-01-16 20:53:35 -08:00
N. Taylor Mullen 5e0e09ac06 Remove MPack assets. 2018-01-16 20:19:11 -08:00
Nate McMaster 141b0b4763 Upgrade to build tools 2.1.0-preview1-15651 2018-01-16 20:19:11 -08:00
Nate McMaster 23e3a872af Update build tools to 2.1.0-preview1-15670 and update list of exclusions for Razor.Design 2018-01-16 20:19:11 -08:00
ASP.NET CI e35bc1176c Update dependencies.props
[auto-updated: dependencies]
2018-01-16 20:19:11 -08:00
ASP.NET CI 03ef44aa1d Update dependencies.props
[auto-updated: dependencies]
2018-01-16 20:19:11 -08:00
Nate McMaster c88f7be1ab Include the VSIX and MPack files in the bill of materials 2018-01-16 20:19:11 -08:00
ASP.NET CI f578819c6e Update dependencies.props 2018-01-16 20:19:11 -08:00