Commit Graph

30 Commits

Author SHA1 Message Date
Ryan Nowak f3fecabe04 Bump Roslyn to a 2.6.0 build
Fixes #1654
2017-08-30 15:30:57 -07:00
Nate McMaster 471722eba1 Use PackageLineup to manage PackageReference versions
This uses a feature of KoreBuild which will select PackageReference
versions based on a lineup file. This helps unify versions between repos
and helps us ensure we are consistent across multiple components.
2017-08-25 15:44:05 -07:00
Ryan Nowak d87e0f7fbd Fixes #1632 - track textviews in the document tracker
I've stripped out some of the dead code and complexity from the document
tracker in an attempt to simplify it. I will bring this back as part of
the multi-targeting work.
2017-08-24 10:47:33 -07:00
Nate McMaster 4cadee2762 Use Directory.Build.props/targets (#1641) 2017-08-23 12:24:57 -07:00
N. Taylor Mullen 24154ec4c2 Create a VisualStudio parser to handle the editing loop.
- Renamed `RazorEditorParser` => `VisualStudioRazorParser` (maintained a copy of the original in Legacy)
- Tried to make as little changes as possible to the `BackgroundParser` due to its complexity; mostly just removed the TreeStructureChanged logic since this is re-done on the Razor editor side of things.
- Split the `RazorEditorParserTest`s into two separate tests. Partial parser tests and the VS parsing tests.
- Updated `StringTextSnapshot` to support changes in order to test the VS parser.

#1536
2017-08-23 11:38:11 -07:00
Ajay Bhargav Baaskaran 4fcad1548e Added support for multitargeting
- Added 1_X src project for multitargeting

- Added 1_X test project for multitargeting

- Added 1_X test MvcShim for multitargeting

- Make section directive generate the correct code the appropriate version

- Added another sln
2017-08-04 15:39:18 -07:00
Mike Harder 35c8da94bf Temporarily disable package downgrade warnings (#1576)
- Revert when RoslynDevVersion >= RoslynVersion
2017-07-20 13:13:04 -07:00
Mike Harder 01fe818dcd Update dependencies to match Visual Studio 15.3 (#1534) 2017-07-11 16:34:32 -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
Ryan Brandenburg 17f97397e6 TreatWarningsAsErrors 2017-07-06 12:33:35 -07:00
Ryan Brandenburg f5c55727a4 Remove AssetTargetFallback 2017-06-30 14:42:00 -07:00
Kiran Challa dea8948249 Merge branch 'rel/2.0.0-preview2' into dev-gate
# Conflicts:
#	build/dependencies.props
#	test/Microsoft.AspNetCore.Mvc.Razor.Extensions.Test/Microsoft.AspNetCore.Mvc.Razor.Extensions.Test.csproj
#	test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Microsoft.VisualStudio.LanguageServices.Razor.Test.csproj
2017-06-15 04:23:55 -07:00
Mike Harder 5eea3f50c5 Changed all references of PackageTargetFallback to AssetTargetFallback (#1441) 2017-06-14 15:16:56 -07:00
Nate McMaster 4d18334573 Target .NET Standard 2.0 2017-06-08 16:37:27 -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
Ryan Nowak 3969c23316 Adds a tracking system for Razor documents
This is a MEF service that can actively or passively track open ITextViews
and give us information about the Razor initialization state and eventing
when it changes.

The purpose of this is to act as a bridge between the VS mef world and the
roslyn world.

For now this doesn't do any passive tracking of Razor documents, it's only
on demand. That means it will only be initialized and used right now when
you are using the Razor developer tools. This is just to reduce our risk,
it's not ideal to ship code in VS that's doing something without anyone
looking at the result.
2017-05-11 08:24:37 -07:00
N. Taylor Mullen 1696e2aebf Upgrade Razor's Roslyn dependency to 2.0.0.
- Added C# 7 test to validate questionable features work end-to-end.
- Had to add several explicit package references to let our VS specific packages work as expected.

#1046
2017-04-21 11:40:21 -07:00
N. Taylor Mullen 0618bae3bd Rename Microsoft.AspNetCore.Razor.Evolution => Microsoft.AspNetCore.Razor.Language.
- Also updated corresponding test project to go from Evolution => Language.
- Regenerated test files to reflect new file paths.

#1169
2017-04-10 10:20:04 -07:00
Pranav K ac176f8671 Revert package version changes
Fixes #1098
2017-04-03 15:46:46 -07:00
Ryan Nowak bc9b9876e5 Add a service for initializing tooling
This is a new API for tooling to call to get a RazorTemplateEngine that's
initialized correctly. For now this is hardcoded to use MVC's conventions.

This is also a very temporary design to get us past the next wave of
changes.

We'll eventually want to change this to an ILanguageService, but this will
require some new plumbing in the editor, so let's defer that for another
day.

(cherry picked from commit a73b5f58a8713076433d24668b99705388b6d6b3)
2017-03-27 14:04:10 -07:00
Ajay Bhargav Baaskaran f3744efc5c Use Version 8.0.3 of Json.Net 2017-03-20 16:31:10 -07:00
N. Taylor Mullen 8f9ff1abd9 Clean up TagHelperDescriptor APIs.
- Removed all design time descriptors and put their API surface into their corresponding descriptor. Part of removing the design time API surface was removing the tracking of `<Remarks>`, it wasn't used so there's on need to track it until we need it.
- Removed the Type requirement from `TagHelperDescriptor`. With this separation we'll be able to have abstract `TagHelper`s that aren't based on a class implementation.
- Removed Prefix from the `TagHelperDescriptor` API surface. It was a legacy requirement based on how the Razor parser was put together. We can work around this now.
- Stripped correlation information from the immediate `TagHelperDescriptor` API surface. Instead this information is now tracked in `TagMatchingRule`s. This change means that you will not have multiple `TagHelperDescriptor`s per `TagHelper`; instead it's all tracked in a single descriptor. A side effect of this change was the transformation of `IsIndexer` => 3 new properties.
- Renamed many descriptor types and property names.
- Added builder APIs to construct TagHelpers since they're inherently immutable in their API surface.
- Added `ITagHelperDescriptorBuilder` to represent `TagHelper`s that are built from an `ITagHelper` implementing class. It re-introduces the `TypeName` association of a `TagHelper`.
- Added `ITagHelperBoundAttributeDescriptorBuilder` to represent that an attribute was associated with a property.
- Added validation methods to the descriptor builders to enable consumers to validate the current state of the builder and add diagnostics as necessary.
- Moved descriptors away from RazorError.
- Updated the various comparers to understand the descriptors new API.
- Added a new `RazorDiagnosticFactory` abstraction to handle `RazorDiagnostic`s and their corresponding errors/ids etc. This new API should allow for easy addition of new `RazorDiagnostic` errors.
- Updated the `DefaultTagHelperDescriptorFactory` to construct `TagHelperDescriptor`s using the new builder APIs and in the new descriptor format (1 descriptor per type).
- Updated `ViewComponentTagHelperDescriptorFactory` to construct `TagHelperDescriptor`s with the builder API.
- With both factory implementations code was duplicated because the ViewComponent work will be moving outside of Razor once we have the proper hooks.
- Updated `TagHelper` binding bits to capture a binding result in order to query which rules appy to a given tag name.
Addressed feedback
- Update tests to react to new `TagHelperDescriptor` API.
- Remove case sensitive comparers and some cleanup
- Added TagHelperDescriptorJsonConverter, RazorDiagnosticJsonConverter and added serialization tests
2017-03-17 12:18:05 -07:00
Nate McMaster 43a41398ac Unify dependency versions to one file 2017-03-15 16:44:00 -07:00
Ryan Nowak 1330b7792d Add editor references to LanguageServices 2017-03-09 15:25:54 -08:00
Ryan Nowak 871f9e43ca Update versions of VS and Roslyn 2.0.0 dependencies
VS has gone RTM so, updating to the RTM versions of those dependencies.

Roslyn does not publish our shim packages on NuGet.org, so updating those
to a non-ancient version for projects that use 2.0.0. The projects that
use 1.3.x are staying put for now.

The code change is dealing with something that was obsoleted.
2017-03-08 08:57:49 -08:00
Pranav K 3772c7c343 Downgrade versions of new packages to 1.0.0 2017-02-27 15:45:17 -08:00
Ryan Nowak f177648c88 Add activity log for TagHelper exceptions
This will log to the VS activity log any time we fail to discovery
taghelpers due to an exception. There's no real user experience around
this... if someone is having an issue we can ask them to send us the log
or post the relevant portion.
2017-02-23 15:43:17 -08:00
Ryan Nowak 615d8e71d6 ifdef all the Razor Info window code
We don't want to ship this in VS yet :) Now the Razor Info window will
only be available in debug builds.
2017-02-23 11:03:25 -08:00
Nate McMaster 279855d947
Downgrade to stable packages 2017-02-14 16:15:35 -08:00
Ryan Nowak c31475af4e Move the LanguageServices package to src
Moves the LanguageServices package to src so it will build on the CI.
2017-01-20 16:43:21 -08:00