Commit Graph

100 Commits

Author SHA1 Message Date
Ajay Bhargav Baaskaran ca3e094bee Fixed an assumption in ComponentLoweringPass (dotnet/aspnetcore-tooling#226)
\n\nCommit migrated from 87bb138304
2019-02-20 09:25:12 -08:00
Ryan Nowak 54e79153ec Add compiler support for EventCallback (dotnet/aspnetcore-tooling#222)
* Add new APIs to ComponentShim

* Add new APIs to ComponentsApi

* Add EventCallback metadata

* Add discovery of EventCallback properties

* Errata for Runtime APIs

* Add ability to use EventCallback as parameter

* Add support for bind to component

* Use EventCallback for bind-... to elements

* Use EventCallback<T> for event handlers
\n\nCommit migrated from a0b6bc0e52
2019-02-19 12:39:34 -08:00
N. Taylor Mullen 1243e07e56 Make TagHelper & Razor comments locatable at design time.
- Added a step to full fidelity verification that does a `LocateOwner` at every source location. If we find a `null` owner we build a snippet with a detailed response to enable us to diagnose the problem.

Addresses aspnet/AspNetCoredotnet/aspnetcore-tooling#7718
\n\nCommit migrated from 08587a30fd
2019-02-19 12:31:36 -08:00
Steve Sanderson 82d850d3a7 Components that accept bind-Something can request SomethingExpression (dotnet/aspnetcore-tooling#213)
* In binding to components, automatically supply FooExpression when requested

* Fix tests

* CR feedback
\n\nCommit migrated from ca9de74f4e
2019-02-18 09:37:41 +00:00
Ajay Bhargav Baaskaran 0ab2a1e586 Fix an assumption in ComponentBindLoweringPass (dotnet/aspnetcore-tooling#212)
\n\nCommit migrated from 315f804d6e
2019-02-14 17:25:52 -08:00
N. Taylor Mullen 67ef6b7e3c Merge branch 'release/vs16.0-preview4'
\n\nCommit migrated from f547905bc6
2019-02-12 12:40:11 -08:00
Pranav K 8b61ae7196 Use new PreserveCompilationReferences in Razor Sdk (dotnet/aspnetcore-tooling#187)
* Use new PreserveCompilationReferences in Razor Sdk

Fixes https://github.com/aspnet/AspNetCore/issues/6512
\n\nCommit migrated from f58c436961
2019-02-11 19:54:04 -08:00
N. Taylor Mullen abd5ab8080 Add @await foreach for C# 8
- Added general C# 8 tests that we can use to include nullability when the time comes.
- Added statement test to ensure syntax tree is correct for await foreach.

aspnet/AspNetCoredotnet/aspnetcore-tooling#5078
\n\nCommit migrated from 27e1d8c011
2019-02-11 09:45:02 -08:00
N. Taylor Mullen 824796b4e4 Add IVT to LanguageServer.Common project.
\n\nCommit migrated from b18dcbff57
2019-02-08 17:32:39 -08:00
Ajay Bhargav Baaskaran 990c585eba Merge branch 'release/vs16.0-preview4'
\n\nCommit migrated from 408b123a64
2019-02-07 15:08:16 -08:00
Ajay Bhargav Baaskaran daeb4f80d1 Fix invalid cast with end script tag containing code (dotnet/aspnetcore-tooling#193)
\n\nCommit migrated from 56fa17b094
2019-02-07 15:06:26 -08:00
Ajay Bhargav Baaskaran 73ca91f603 Handle multiple nested sections correctly (dotnet/aspnetcore-tooling#196)
\n\nCommit migrated from 26e8d86b21
2019-02-07 14:04:57 -08:00
Ajay Bhargav Baaskaran 57c10c0321 Fixed null-ref with reserved word inside a code block (dotnet/aspnetcore-tooling#192)
\n\nCommit migrated from 10dbc434ee
2019-02-07 14:03:23 -08:00
Ajay Bhargav Baaskaran b15af76917 Fix crash with code blocks in tag helper attributes (dotnet/aspnetcore-tooling#190)
* Fix crash with code blocks in tag helper attributes

* Better fix

* Fixed another case
\n\nCommit migrated from 9e97ba9b97
2019-02-07 14:02:10 -08:00
Pranav K 1cbc513cfb Restore packages as part of build to avoid restore timeouts as part of running tests
Fixes https://github.com/aspnet/AspNetCore-Internal/issues/1701
\n\nCommit migrated from 7f49b97eb5
2019-02-06 14:04:24 -08:00
N. Taylor Mullen cbaadeff26 Merge branch 'release/vs16.0-preview4'
\n\nCommit migrated from ce9f141521
2019-02-05 12:06:56 -08:00
N. Taylor Mullen 1ad018c1ff Merge remote-tracking branch 'origin/release/vs16.0-preview4'
\n\nCommit migrated from ef2f8975db
2019-02-04 09:55:15 -08:00
N. Taylor Mullen 3c6f99b3f1 Merge branch 'release/vs16.0-preview4'
\n\nCommit migrated from 5af7556663
2019-02-01 11:08:57 -08:00
N. Taylor Mullen 83c8c0cba2 Don't associate Roslyn workspace project with ProjectSnapshot.
- Removed the differences of workspace project and `HostProject` in regards to `ProjectSnapshotManager` methods. We now just have `ProjectAdded`, `ProjectRemoved` etc.
- Obsoleted Workspace related members from the `ProjectSnapshot`in order to ensure that current LiveShare continues to work. Once LiveShare has been incorporated into Razor we can remove these members from the project snapshot.
- Removed several TagHelper calculating logic pieces from the document tracker. This is now done entirely from the ProjectSnapshotManager so there's no secondary route that needs to be taken in order to resolve TagHelpers for VS windows cases.
- Updated the `ProjectState` to take in TagHelpers and removed the internal logic it had to resolve TagHelpers.
- Added a TagHelpers property to ProjectSnapshot to indicate that they're no longer calculated, they're part of the project inputs.
- Added a ProjectWorkspaceChange generator to be responsible for calculating any workspace related information that is needed for a `ProjectSnapshot`. For now, this just calculates TagHelpers but in the future it may do more.
- Added a `FilePathComparison` static helper class which acts similarly to `FilePathComparer`.
- Changed our dynamic file info provider to no longer care about `ProjectIds`. Before this, it kept track of the project ids internally but never used them so this is a noop functional change.
- Changed how the out of process remote TagHelper resolution flow works. Prior to this you'd pass a Project across the wire as part of a project snapshot handle and then resolve TagHelpers the old fashioned way.
- Updated all existing tests to respect the new `ProjectWorkspaceState` flows.
- Added tests for new APIs.

dotnet/aspnetcore-tooling#6672
\n\nCommit migrated from a5621641f8
2019-02-01 11:06:20 -08:00
N. Taylor Mullen 12a6864710 Prioritize local dotnet when running SDK Razor tests.
- The SDK tests were occasionally failing with access denied due to the test using the machines dotnet.exe (instead of the local projects dotnet.exe).

dotnet/aspnetcore-tooling#1667
\n\nCommit migrated from 1a96714921
2019-02-01 11:06:19 -08:00
Ajay Bhargav Baaskaran b87b984902 Merge branch 'release/vs16.0-preview3'
\n\nCommit migrated from 77532db903
2019-02-01 10:59:34 -08:00
Ajay Bhargav Baaskaran 57211a33db Fix: Exception for empty data- attributes in tag helpers (dotnet/aspnetcore-tooling#173)
\n\nCommit migrated from 6d71b6a265
2019-01-30 09:12:37 -08:00
Pranav K 4505f76987 Ensure TagHelpers from the current project are discovered for projects targeting 2.x
As part of migrating the CodeGeneration targets in to the Razor.Sdk,
the SDK broke the contract that RazorReferencePaths includes the full closure
of assemblies during tag helper discovery.

This change restores the behavior to be compatible with the 2.x Razor.Design
package and adds tests to verify TagHelper discovery works in a range of projects.

Fixes https://github.com/aspnet/AspNetCore/issues/6825
\n\nCommit migrated from 99938c9b7e
2019-01-29 11:21:27 -08:00
Ryan Nowak d4c3a2fbd9 Fix dependency to aspnet/AspNetCore-Tooling (dotnet/aspnetcore-tooling#170)
* Remove unused package versions
* Remove references to Html.Abstractions
Removing this package since it's from the aspnet/AspNetCore.

* Remove System.ValueTuple package inside remove
* Add versions.details.xml items from corefx
* Add Microsoft.NETCore.App
* Fill up Version.Details.xml
* Update dependencies
* Fix failing test
\n\nCommit migrated from bd7fc9ddf6
2019-01-24 16:57:16 -08:00
Ajay Bhargav Baaskaran 642a2f5789 Final cleanup to remove all traces of ParseBlockTest (dotnet/aspnetcore-tooling#169)
\n\nCommit migrated from e160872142
2019-01-24 12:42:10 -08:00
N. Taylor Mullen 67588374aa Convert HtmlAttributeTest to use ParseDocument
aspnet/AspNetCoredotnet/aspnetcore-tooling#6470
\n\nCommit migrated from 61b7265bed
2019-01-24 09:05:52 -08:00
Ajay Bhargav Baaskaran 18ef06a442 Merge branch 'release/vs16.0-preview3'
\n\nCommit migrated from 5e05f5ff63
2019-01-22 16:09:47 -08:00
Ajay Bhargav Baaskaran cdaad2964d Fix tag grouping for tags with no name
\n\nCommit migrated from f5c1068d88
2019-01-22 15:32:22 -08:00
Ajay Bhargav Baaskaran 6c6e048dcc Fix missing transition in using keyword
\n\nCommit migrated from 02781b17cd
2019-01-22 15:32:22 -08:00
Ajay Bhargav Baaskaran 542d17bbfa Fix tag grouping for tags with no name
\n\nCommit migrated from e24c9b25a4
2019-01-22 14:49:21 -08:00
Ajay Bhargav Baaskaran f97ab076b5 Fix missing transition in using keyword
\n\nCommit migrated from dd45375f72
2019-01-22 14:38:28 -08:00
Ajay Bhargav Baaskaran 12ec14327f Convert CSharpTemplateTest, CSharpToMarkupSwitchTest, CSharpVerbatimBlockTest and CSharpWhitespaceHandlingTest to use ParseDocument (dotnet/aspnetcore-tooling#151)
\n\nCommit migrated from ca891b4101
2019-01-22 10:45:53 -08:00
Pranav K ada61cf03d Ensure updates to Razor components trigger design time build
* Use _RazorComponentInclude to determine the set of files to set Generator property for
* Run RazorGenerateComponentDeclarationDesignTime instead of RazorComponentGenerate during design time builds
* Update design time targets to set Generator for content files with .razor extension.

Fixes https://github.com/aspnet/AspNetCore/issues/6859
Fixes https://github.com/aspnet/AspNetCore/issues/6860
\n\nCommit migrated from 37d96aa417
2019-01-22 09:37:18 -08:00
Ajay Bhargav Baaskaran 2bbd247b13 Convert CSharpNestedStatementsTest, CSharpReservedWordsTest, CSharpSpecialBlockTest and CSharpStatementTest to use ParseDocumentTest (dotnet/aspnetcore-tooling#148)
\n\nCommit migrated from 45b304a348
2019-01-18 13:26:58 -08:00
Ajay Bhargav Baaskaran e7d5ee95ed Port: Fix failing file comparison tests (dotnet/aspnetcore-tooling#135)
\n\nCommit migrated from 5166fec846
2019-01-18 08:50:22 -08:00
NTaylorMullen 237d2ec515 Merge branch 'release/vs16.0-preview3'
# Conflicts:
#	eng/AfterSigning.targets
\n\nCommit migrated from 1dd62799dd
2019-01-17 19:41:34 -08:00
Ajay Bhargav Baaskaran 31e2271134 Enable full fidelity check for ParseBlock tests as well (dotnet/aspnetcore-tooling#137)
\n\nCommit migrated from 6ca6a37f9b
2019-01-17 17:30:15 -08:00
Ajay Bhargav Baaskaran 299db398fe Merge pull request dotnet/aspnetcore-tooling#136 from aspnet/release/vs16.0-preview3
Merge branch release/vs16.0-preview3 to master\n\nCommit migrated from abb01b0653
2019-01-17 14:15:35 -08:00
Ajay Bhargav Baaskaran e6b8c86a48 Better structure for Tag helper start/end tags (dotnet/aspnetcore-tooling#132)
\n\nCommit migrated from f6ab4cc1d1
2019-01-17 13:38:17 -08:00
NTaylorMullen 060c8e63b1 Remove RazorTemplateEngine and friends.
- Also nuked tests and resource entries specific to the template engine.

Addresses aspnet/AspNetCoredotnet/aspnetcore-tooling#5079
\n\nCommit migrated from d5f0b4c0b4
2019-01-16 14:26:31 -08:00
N. Taylor Mullen 439349899b Prioritize local dotnet when running SDK Razor tests.
- The SDK tests were occasionally failing with access denied due to the test using the machines dotnet.exe (instead of the local projects dotnet.exe).

dotnet/aspnetcore-tooling#1667
\n\nCommit migrated from bb2134a536
2019-01-15 15:38:52 -08:00
N. Taylor Mullen 7eb90cbbbd Remove obsolete RazorProject ViewEngine based create method.
aspnet/AspNetCoredotnet/aspnetcore-tooling#4876
\n\nCommit migrated from 57df0ea9cf
2019-01-15 15:36:02 -08:00
Ajay Bhargav Baaskaran ceb4d0853a Some minor cleanup (dotnet/aspnetcore-tooling#123)
\n\nCommit migrated from 97930b91f8
2019-01-15 15:26:44 -08:00
Ryan Nowak 40633dde21 Add attribute only bindings and fix dotnet/aspnetcore-tooling#6373
Adds a new API for WTE to call given a TagHelperBinding to determine if
the binding should colorize/classify only the attributes of the HTML
element in source code. This is driven by a new metadata item that the
Components 'directive attributes' all set. There's no way for a user to
access this feature via tag helpers currently, but it could be added
easily in the future.

Also fixing dotnet/aspnetcore-tooling#6376 while I'm in there. 👍
\n\nCommit migrated from df449beea9
2019-01-14 15:25:49 -08:00
Pranav K 148bc99cce Use a property to allow specifying component globbing pattern
Workaround for https://github.com/aspnet/AspNetCore/issues/6500
\n\nCommit migrated from cee0223732
2019-01-14 14:53:24 -08:00
Ajay Bhargav Baaskaran 56695d17c9 Set ParserContext.StartOfLine to true when parsing starts (dotnet/aspnetcore-tooling#116)
* Set ParserContext.StartOfLine to true when parsing starts

* Missed baselines
\n\nCommit migrated from a80c3a981a
2019-01-14 14:17:22 -08:00
Ajay Bhargav Baaskaran d5e9a153c7 Correctly handle whitespace that precedes a Razor directive (dotnet/aspnetcore-tooling#117)
\n\nCommit migrated from 15556c8ff3
2019-01-14 11:59:37 -08:00
Ryan Nowak 9541938327 Fix A VS issue
The issue here is that the downlevel SDK (2.1/2.2) don't define the
component-related targets needed for the component design time build.
Depending on the ordering of targets, this can break all features in VS
that depend on the design-time build.

Since we want this to noop in those cases, the best fix is to make our
targets depend on a target property that will be empty in the downlevel
SDKS, but will contain our targets in the 3.0 SDK.

(cherry picked from commit dotnet/aspnetcore-tooling@b88b32c73a)
\n\nCommit migrated from 1c4b19ae88
2019-01-14 08:55:39 -08:00
Ajay Bhargav Baaskaran b0e2dc2add Added check to ensure we generate syntax tree with full fidelity (dotnet/aspnetcore-tooling#111)
* Added check to ensure we generate syntax tree with full fidelity

* Better check

* Feedback
\n\nCommit migrated from 88653fc348
2019-01-10 13:55:28 -08:00
Ajay Bhargav Baaskaran b449a44440 Fix void tags grouping logic (dotnet/aspnetcore-tooling#110)
* Fix void tags grouping logic

* Handle bang in tag name
\n\nCommit migrated from 2c41ae9550
2019-01-09 11:41:10 -08:00