Commit Graph

1134 Commits

Author SHA1 Message Date
Ajay Bhargav Baaskaran 27ac5da6d5 Add indexer null-check for preallocated tag helper attributes 2017-06-13 10:53:07 -07:00
N. Taylor Mullen e3287ae672 Add diagnostics to the IR.
- Added a `Diagnostics` and `HasDiagnostics` properties to `RazorIRNode`. The `HasDiagnostics` property was necessary in order to traverse nodes without forcibly instantiating their diagnostic lists.
- Added `GetAllDiagnostics` extension method for `RazorIRNode` to provide a way to retrieve all diagnostics that exist on and under a `RazorIRNode`.
- Updated `RazorIRNodeWriter` to display any diagnostics that exist on IR nodes.
- Internal `RazorIRNode`s do not have mutable `Diagnostics` because we don't currently add diagnostics to these elements.
- Added `DefaultIRLoweringPhaseTest` to validate that errors flow from syntax tree to IR document. Also added a missing test.
- Updated the `CSharpLoweringPhaseTest`s to properly validate that errors flow from IR document => csharp document. This resulted in movement of code to the ir lowering phase tests.

#1412
2017-06-13 10:28:41 -07:00
Ryan Nowak 6860806213 Make usage of FileName and FilePath consistent
FileName => "Foo.cshtml"
FilePath => "/Bar/Baz/Foo.cshtml"
2017-06-12 16:15:26 -07:00
Ryan Nowak 6ce71c24e5 Add RazorIRNodeReference for manipulating nodes 2017-06-12 13:46:59 -07:00
Pranav K 1fb3c8c26f Remove Roslyn from NuGet.config.
Update StreamRpcJson to 1.0.36. This package has an assembly version that matches the version shipped in VS 2017 RTM.
2017-06-12 13:33:55 -07:00
Kiran Challa 6304699bf4 Removed Roslyn feed as we are now mirroring these packages 2017-06-12 08:16:11 -07:00
Ajay Bhargav Baaskaran f099232ca4 Moved scope writer logic to BasicWriter 2017-06-09 12:10:00 -07:00
Ajay Bhargav Baaskaran 27b73d737b Set correct value style for literal tag helper bound attributes 2017-06-09 12:05:27 -07:00
Ryan Nowak 503ba669d0 Get rid of Parent from IR node 2017-06-08 19:22:14 -07:00
Ryan Nowak 14944a2791 Add collection types for IR children 2017-06-08 17:18:15 -07:00
Ryan Nowak 118fefb7e2 Rename incorrect casing 2017-06-08 17:18:15 -07:00
Ryan Nowak 17800b6055 Fix #1355 Make extension nodes check for their extensions 2017-06-08 17:08:04 -07:00
Ryan Nowak e05c697c58 Fix #1356 verify diagnostics in integration tests 2017-06-08 17:03:43 -07:00
Nate McMaster 4d18334573 Target .NET Standard 2.0 2017-06-08 16:37:27 -07:00
Ajay Bhargav Baaskaran 8bba757703 Don't ignore whitespace at the start of '<text>' tag 2017-06-08 11:56:24 -07:00
Pranav K 758be9ae13 Remove usage of TaskCache 2017-06-08 11:05:39 -07:00
Ajay Bhargav Baaskaran a6d2c04195 [Fixes #1379] Rename CSharpStatement to CSharpCode 2017-06-07 15:20:47 -07:00
Ryan Nowak 95c5049dd0 Add DisplayName and Description for directives
Renamed Name -> Directive so that it doesn't overlap with DisplayName.
2017-06-07 13:37:34 -07:00
Nate McMaster 1dfe37b55a React to downstream upgrades to .NET Standard 2.0 2017-06-07 12:51:48 -07:00
Ryan Nowak 45dec0dca4 Fix #1407 null refs in VCTH tests
Dictionary isn't thread safe YO.
2017-06-07 12:37:04 -07:00
Ajay Bhargav Baaskaran 74fef5f722 Moved VCTH types to Razor.Extensions 2017-06-06 15:49:35 -07:00
Ryan Nowak 6664efb6d9 Fixes #1296 - ItemCollection should be ICollection
A little bit more kindness for consumers.

I didn't add any tests because these are all just trivial forwards.
2017-06-06 11:11:30 -07:00
Pranav K d5c1c63d19 Generate assembly attributes as part of code generation 2017-06-05 14:24:17 -07:00
Mike Harder f658d3a080 Merge remote-tracking branch 'origin/rel/2.0.0-preview2' into dev 2017-06-05 11:15:50 -07:00
Mike Harder 48285f63c6 Revert "Update Roslyn Version to support C# 7.1"
This reverts commit 8f299c5b11.
2017-06-05 10:39:20 -07:00
Ryan Nowak 8297633445 Merge branch 'rel/2.0.0-preview2' into dev 2017-06-03 17:34:10 -07:00
Ryan Nowak 8f299c5b11 Update Roslyn Version to support C# 7.1 2017-06-03 17:27:40 -07:00
Ryan Nowak fcb8669c98 Use project.json for the VSIX project
Also did some spring cleaning on redundent references in the language
services package.

Note that the 'immutable' packages are now totally redundant with
Shell.15.0. You're supposed to use one or the other. Since our minimum VS
is 15, I just went with shell 15.0.

Now the VSIX project doesn't have many references in it.
2017-06-03 17:27:35 -07:00
Ajay Bhargav Baaskaran 9e89808457 Merge branch 'rel/2.0.0-preview2' into dev 2017-06-01 17:24:50 -07:00
Ajay Bhargav Baaskaran eb2e090e2a Fix failing test 2017-06-01 17:24:24 -07:00
Ajay Bhargav Baaskaran f390830eda Merge branch 'rel/2.0.0-preview2' into dev 2017-06-01 17:16:13 -07:00
Ajay Bhargav Baaskaran eab052d9e0 Merge branch 'rel/15.3' into rel/2.0.0-preview2 2017-06-01 17:15:07 -07:00
Ajay Bhargav Baaskaran 4c1795fc79 [Fixes #1394] Fix unexpected indentation when autoformatting in VS 2017-06-01 15:57:52 -07:00
N. Taylor Mullen 517eba930f Merge branch 'rel/2.0.0-preview2' into dev 2017-06-01 15:48:07 -07:00
N. Taylor Mullen 4fde9ca07d Merge branch 'rel/15.3' into rel/2.0.0-preview2
# Conflicts:
#	src/Microsoft.AspNetCore.Razor.Language/Legacy/CSharpCodeParser.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpAutoCompleteTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpDirectivesTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpSectionTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/CSharpSpecialBlockTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/HtmlDocumentTest.cs
#	test/Microsoft.AspNetCore.Razor.Language.Test/Legacy/HtmlToCodeSwitchTest.cs
2017-06-01 15:32:47 -07:00
N. Taylor Mullen 1f32a8322e Make invalid namespace tokens support IntelliSense.
- Added a `DirectiveTokenEditHandler` to enable IntelliSense for invalid namespace tokens.
- Added tests to verify new `DirectiveTokenEditHandler`.
- Updated test expectations for `DirectiveTokenEditHandler`.

#1393
2017-06-01 12:04:20 -07:00
N. Taylor Mullen 2e8c154fcb Make namespace tokens tolerant to EOF and invalid states.
- Updated our `QualifiedIdentifier` to properly parse invalid namespaces. This is more consistent with how the rest of the system works; we consume tokens until we determine if we're in an invalid or valid state. If invalid, we log an error and put back all invalid tokens for the parser to treat as non-directive tokens.
- Added unit tests to validate our extensible directive system can handle malformed namespace tokens at EOF and inline.
- Added a code gen test for Razor.Extensions to prove we've fixed the underlying issue for our `@namespace` directive that crashed VS.

#1393
2017-06-01 12:04:20 -07:00
Pranav K 0a75ecd3a6 Updating versions to preview3 2017-06-01 10:47:38 -07:00
Pranav K ba4a00404b Merge remote-tracking branch 'origin/rel/2.0.0-preview2' into dev 2017-05-31 20:02:43 -07:00
Pranav K e31d242122 Updating build scripts to point to 2.0.0-preview2 KoreBuild 2017-05-31 19:53:31 -07:00
Pranav K 4b415bade5 Merge remote-tracking branch 'origin/rel/2.0.0-preview2' into dev 2017-05-31 19:46:24 -07:00
Pranav K ca4b8e0b85 Branching for rel/2.0.0-preview2 2017-05-31 19:37:12 -07:00
N. Taylor Mullen 0688cd3ef7 Log errors if directives do not start at beginning of line.
- Updated tests to validate expectations.
- Added two additional tests to validate extensible directives and built-in directives get start at line verification.
2017-05-30 15:19:46 -07:00
N. Taylor Mullen 3b53f04518 Change ParserContext to take a RazorSourceDocument.
- This moves ParserContext closer to operating on a RazorSourceDocument and exposes it at the parsing layer.
- Was not able to replace the `ITextDocument` property on `ParserContext` due to its current wiring. Our tokenizers rely on a single reader that iterates over the document and take turns tokenizing characters from that reader. The reader that the tokenizers pull from is also highly coupled with the parsers implementations; they end up moving the readers pointer frequently.
2017-05-30 15:18:19 -07:00
Kiran Challa 4056e86382 Updated to use the latest shared runtime 2017-05-29 04:41:43 -07:00
Ajay Bhargav Baaskaran 2f03a39e41 Refactored attribute values IR 2017-05-26 12:34:34 -07:00
N. Taylor Mullen dcccea3004 Add Checksum computation to RazorSourceDocument.
- Renamed many of our `RazorSourceDocument` abstractions to not include the word `Razor`.
- Added a `GetChecksum()` method to `RazorSourceDocument` to allow source documents to compute their own checksums.
- Re-generated codegen tests that did not normalize new lines. Ones that did re-generate newlines converted from stream => string => normalized string and then ran the Razor parser.
- Added tests to validate `GetChecksum` for all source document types.
- Removed unused `LegacySourceDocument`.
2017-05-26 12:29:36 -07:00
N. Taylor Mullen d917311883 Make ViewComponentTagHelper's bound attribute display names nicer.
- Went from `typeName __Generated__SomeViewComponentTagHelper.PropertyName` to `typeName SomeViewComponentTagHelper.PropertyName`.
- Updated `TagHelperBoundDescriptorBuilder` to allow setting of `DisplayName`.
- Added `TagHelperBoundAttributeDescriptorBuilderTest` class to verify new `DisplayName` additions.
- Updated `ViewComponentTagHelperDescriptorFactoryTest` expectations.

#1251
2017-05-25 15:57:51 -07:00
Ajay Bhargav Baaskaran cdddaefa81 Fixed a bug in VCTH pass and added an integration test 2017-05-25 15:44:24 -07:00
Ajay Bhargav Baaskaran 1efcdafa45 Removed ExecuteTagHelpersIRNode 2017-05-22 11:03:34 -07:00