Commit Graph

1385 Commits

Author SHA1 Message Date
N. Taylor Mullen f8d43853f8 Re-introduce RazorEditorParser.
- Revived `RazorEditorParser`.
- Made `PartialParseResult` internal and renamed it to `PartialParseResultInternal`. This fell in line with other syntax tree types.
- Moved the `RazorEditorParser` implementation away from `TextChange` and `ITextBuffer`. Instead it now relies on `SourceChange` and the VS contract `ITextSnapshot`.
- Added `RazorEditorParserTest` to ensure the changes in implementation did not impact previous functionality.
- Removed some obvious tests that unnecessarily re-tested behavior that was already verified.
- Updated tests.
- Moved several Language.Test types to the common test project so they could be reused.

#1259
2017-07-12 17:01:16 -07:00
Pranav K 0d69d98933 Merge pull request #1546 from aspnet/rel/2.0.0
Update to RoslynDev 2.6.0-* packages
2017-07-12 14:07:05 -07:00
Pranav K c812f9d885 Update to RoslynDev 2.6.0-* packages 2017-07-12 14:06:43 -07:00
Pranav K f939480372 Merge remote-tracking branch 'origin/rel/2.0.0' into dev 2017-07-12 09:06:17 -07:00
Pranav K 8a51fdb39d Revert "Update to Roslyn 2.3.0"
This reverts commit dbf57b9268.
2017-07-12 09:04:27 -07:00
Pranav K bc12fccd4d Merge pull request #1544 from aspnet/rel/2.0.0
Update to Roslyn 2.3.0
2017-07-12 08:01:20 -07:00
Pranav K dbf57b9268 Update to Roslyn 2.3.0 2017-07-12 08:00:50 -07:00
Mike Harder 452e3ccfb0 Merge remote-tracking branch 'origin/rel/2.0.0' into dev 2017-07-11 16:35:04 -07:00
Mike Harder 01fe818dcd Update dependencies to match Visual Studio 15.3 (#1534) 2017-07-11 16:34:32 -07:00
Mike Harder 121c20ef26 Merge remote-tracking branch 'origin/rel/2.0.0' into dev 2017-07-11 15:11:46 -07:00
Mike Harder b8f550fdf6 Enable Travis and AppVeyor in "rel" branches (#1539) 2017-07-11 15:11:12 -07:00
Mike Harder 6361491961 Merge remote-tracking branch 'origin/rel/2.0.0' into dev 2017-07-10 18:32:55 -07:00
Mike Harder aebb841e41 Upgrade Roslyn to 2.3.0-beta4-* (#1533) 2017-07-10 17:28:23 -07:00
Ryan Brandenburg cd81c2a48f Skip first time experience on Appveyor 2017-07-10 15:24:33 -07:00
Pranav K 3d62e8e08b Updating KoreBuild branch 2017-07-10 11:58:00 -07:00
Pranav K f8d5c0ec8d Merge branch 'rel/2.0.0' into dev 2017-07-10 11:58:00 -07:00
Pranav K f0794bfe80 Branching for 2.0.0 rtm 2017-07-10 11:45:30 -07:00
Pranav K 2a39052100 Merge branch 'rel/2.0.0' into dev 2017-07-10 11:45:30 -07:00
Ryan Nowak 1d5dfcc6b4 Update our VSIX version to 15.5 2017-07-10 08:08:09 -07:00
N. Taylor Mullen 99ff9d44a3 Update repo to utilize ApiCheck.
- Re-enabled api check for `Microsoft.AspNetCore.Razor` and `Microsoft.AspNetCore.Razor.Runtime`. This resulted in me adding known breaking changes for the packages.
- Added empty baseline files for `Microsoft.AspNetCore.Razor.Language`, `Microsoft.AspNetCore.Mvc.Razor.Extensions` and `Microsoft.CodeAnalysis.Razor`.
- Disabled ApiCheck for `Microsoft.CodeAnalysis.Razor.Workspaces`, `Microsoft.CodeAnalysis.Remote.Razor`, `RazorPageGenerator` and `Microsoft.VisualStudio.LanguageServices.Razor` to prevent ApiCheck warnings about missing baselines.

#1107
2017-07-07 15:59:36 -07:00
Ajay Bhargav Baaskaran b70815e317 Made `RazorCodeGenerationOptionsBuilder.DesignTime` getter only
- Made RazorCodeGenerationOptions consistent with RazorParserOptions
2017-07-07 14:41:53 -07:00
Ryan Nowak 9c0a8a5c96 Rename properties on taghelper nodes 2017-07-07 11:32:05 -07:00
Ryan Nowak ff40124594 Convert most of CodeWriter into extensions
We don't really want to ship what we have as a contract. As an emergency
measure we are making it into internal extension methods so we can have
a do-over in 2.1.
2017-07-07 10:55:33 -07:00
Ajay Bhargav Baaskaran 267b3fab0a Made IntermediateNodeWalker.Ancestors indexable 2017-07-06 19:24:25 -07:00
Ajay Bhargav Baaskaran 49eab41726 Made CodeTargetBuilder an abstract class 2017-07-06 19:01:28 -07:00
Ajay Bhargav Baaskaran d6e892b30c Adjusted verbosity of some property names and made
TagHelperIntermediateNode.TagHelpers and IList
2017-07-06 18:05:36 -07:00
N. Taylor Mullen 02160a04d9 Make ViewComponentTagHelperMetadata static.
#1521
2017-07-06 17:17:41 -07:00
Ajay Bhargav Baaskaran 6fdd4d653c Made InvalidNonWhitespaceHtmlCharacters internal 2017-07-06 17:12:46 -07:00
N. Taylor Mullen 45fad171a6 Reduce public surface area of some APIs.
- Change `DefaultRazorEngineBuilder.DesignTime` to be getter only
- Make `DocumentClassifierPassBase.TargetExtensions` private.

#1510
2017-07-06 16:50:11 -07:00
N. Taylor Mullen d891fae4a9 Rename ThrowForMissingEngineDependency.
- Rename `RazorEngineFeatureBase.ThrowForMissingEngineDependency` to `ThrowForMissingFeatureDependency`
- Rename `RazorEnginePhaseBase.ThrowForMissingEngineDependency` to `ThrowForMissingFeatureDependency`

#1510
2017-07-06 16:50:11 -07:00
N. Taylor Mullen bba508c7c6 Change TagHelperDescriptor APIs to use IReadOnlyList.
- Change `TagHelperDescriptor.AllowedChildTags` to be `IReadOnlyList`.
- Change `TagHelperDescriptor.BoundAttributes` to be `IReadOnlyList`.
- Change `TagHelperDescriptor.TagMatchingRules` to be `IReadOnlyList`.
- Change `TagMatchingRuleDescriptor.Attributes` to be `IReadOnlyList`.

#1510
2017-07-06 16:01:46 -07:00
N. Taylor Mullen c34a99e188 Update the TagHelperBinding API to use IReadOnlyList.
- Changed `Attributes` to return `IReadOnlyList<KeyValuePair<string, string>>`.
- Changed `GetBoundRules` to return `IReadOnlyList<TagMatchingRuleDescriptor>`.
- Updated tests to react to new signature.

#1510
2017-07-06 15:42:24 -07:00
Pranav K 93875f973b Update version suffix for 2.0.0 RTM release 2017-07-06 15:08:44 -07:00
N. Taylor Mullen cb40da4e0f Rename ParseOnlyLeadingDirectives.
- Was renamed to `ParseLeadingDirectives`.

#1510
2017-07-06 14:34:15 -07:00
N. Taylor Mullen b68290ddb7 Make `RazorParserOptions` creation more like RazorEngine
- Removed verbose `Create` methods in favor of the `RazorParserOptionsBuilder`. This is similar to how the `RazorEngine` functions.
- Added a `CreateDesignTime` method.
- Updated existing tests to use new Create syntax.

#1510
2017-07-06 14:33:33 -07:00
N. Taylor Mullen 87a5435036 Make `RazorParserOptions.DesignTime` getter only.
- Renamed `IRazorParserOptionsFeature` to `IConfigureRazorParserOptionsFeature`, the original interface was re-purposed to get the options rather than configure them.
- This involved re-designing how we set design time on the `RazorParserOptions` object. The indicator of `DesignTime` is now configured at the RazorEngine level via a parser options provider feature.
- Moved options construction from the phase into an `IRazorParserOptionsFeature` type.

#1510
2017-07-06 14:33:05 -07:00
Ryan Brandenburg 17f97397e6 TreatWarningsAsErrors 2017-07-06 12:33:35 -07:00
Ajay Bhargav Baaskaran 11c5293862 Unnest IntermediateToken.TokenKind 2017-07-06 11:15:36 -07:00
Nate McMaster 03c92fe36b React to aspnet/BuildTools#293
[ci skip]
2017-07-06 10:40:22 -07:00
N. Taylor Mullen afa61e7080 Rename LineMapping => SourceMapping.
- Also removed the == and `!=` operators for `SourceMapping`.

#1510
2017-07-06 10:34:19 -07:00
N. Taylor Mullen a78202e937 Have `@page` understand malformed directives.
- The `@page` directive will now look for malformed directives and treat a view as a Razor page based on the existence of the malformed directive.
- Updated the `PageDirective` type to contain a reference to its responsible directive node.
- Added unit tests to validate malformed directives were picked up accordingly.
- Updated code generation test baselines to reflect the new malformed directive understanding.

#1448
2017-07-05 16:57:51 -07:00
Ryan Nowak 647ce7515d Remove explicit scope managment 2017-07-05 15:47:46 -07:00
Ryan Nowak 7408bcd025 Rewrite of code rendering context 2017-07-05 15:32:54 -07:00
Ryan Nowak 8dfba25d59 Streamline collections
Makes our collections sealed instead of abstract.

Only the IntermediateNodeCollection needs to have a read only variant.
2017-07-05 13:46:37 -07:00
N. Taylor Mullen d36838ed88 Handle imported @page directives.
- Prior to this imported `@page` directives would flow through the Razor system without error. This resulted in inconsistent behavior between MVC and Razor. Now, imported `@page` directives result in diagnostics on the page directive node.
- Added two tests to verify that we still treat views with imported page directives as Razor pages BUT we also log a diagnostic on the page directive node.
- Renamed the `ViewComponentDiagnosticFactory` class to `RazorExtensionsDiagnosticFactory` so it can be used for more than just view component diagnostics. This way we can ensure that our diagnostics don't end up overlapping.

#1503
2017-07-03 17:11:17 -07:00
Ryan Nowak 8a9bf9c71a Rewrite of code rendering context 2017-07-03 16:29:34 -07:00
Ryan Nowak 35889cba81 Add properties to the body node that it needs
Removes a usage of TagRenderingContext
2017-07-03 16:29:34 -07:00
Ryan Brandenburg ddef61485b DiagnosticSource to 4.4.1 2017-07-03 15:09:38 -07:00
Pranav K 8cb1a31385 Update LICENSE.txt text 2017-07-03 14:07:34 -07:00
N. Taylor Mullen 8090216dbe Make RequiredAttributeDescriptor IEquatable.
- All the other descriptors are already `IEquatable` this should be as well.
- Moved the required attribute descriptor comparer from Legacy => Language. It wasn't in the Legacy folder to begin with so this made sense given that it's already internal.

#1495
2017-07-03 11:23:51 -07:00