Граф коммитов

7448 Коммитов

Автор SHA1 Сообщение Дата
David Wengier 237febd635
Merge pull request #5660 from davidwengier/FixCascadingTypeParameterFormatting 2021-10-29 11:14:14 +11:00
David Wengier fb7a0094c9 Use extension method 2021-10-29 08:16:39 +11:00
David Wengier a9cf29d6dd
Merge pull request #5666 from DarCampbell/main 2021-10-28 09:24:51 +11:00
Darlisha Campbell 5b6e4f473f
Merge pull request #1 from DarCampbell/DarCampbell-defaultBrowser
Update package.json
2021-10-27 11:52:11 -04:00
Darlisha Campbell 7ff8274f42
Update package.json
Changed default value from "chrome" to "edge"
2021-10-27 10:17:39 -04:00
Allison Chou 7d22766f35
Add go-to-definition endpoint logging (#5650) 2021-10-25 21:28:28 -07:00
David Wengier e89e3026bf Prevent test flakiness that only seems to affect David Wengier's machine but still is really annoying 2021-10-26 07:46:42 +11:00
David Wengier b8143fd8f4 Add more tests 2021-10-26 07:46:24 +11:00
Ryan Brandenburg ec5cb4f1ef
Set default for startvs.cmd (#5658) 2021-10-25 09:53:42 -07:00
David Wengier 29149b1620 Add test for cascading type parameters 2021-10-25 16:17:13 +11:00
David Wengier da8752a314 Update test framework for .NET 6 stuff 2021-10-25 16:17:02 +11:00
David Wengier 4cf2007189 CascadingTypeParameters cause an extra level of indentation 2021-10-25 16:16:42 +11:00
David Wengier 230be751bb Use an int instead of a stack 2021-10-25 15:57:57 +11:00
David Wengier d1a7bae134
Merge pull request #5624 from davidwengier/FormattingPerf 2021-10-23 14:50:49 +11:00
N. Taylor Mullen 4da55d51b2
Merge pull request #5652 from dotnet/nimullen/mergerelease
Merge release/17.0-ga into main
2021-10-22 11:29:12 -07:00
N. Taylor Mullen b8a74fd80f Merge branch 'release/17.0-ga' into nimullen/mergerelease 2021-10-22 10:17:31 -07:00
Allison Chou 3319c75f89 Update azure-pipelines-richnav.yml 2021-10-22 10:15:49 -07:00
Allison Chou de9577ea05 Update azure-pipelines.yml 2021-10-22 10:15:49 -07:00
David Wengier 3fbfea9090 Merge remote-tracking branch 'upstream/main' into FormattingPerf
# Conflicts:
#	src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/Formatting/CodeDirectiveFormattingTest.cs
2021-10-22 17:09:10 +11:00
N. Taylor Mullen 49b4693a1a
Re-add ngen required dependencies. (#5651)
* Re-add ngen required dependencies.

- Accidentally broke ngen when updating our langaugeserver.client.implementation packages [here](https://github.com/dotnet/razor-tooling/pull/5604/files). This fixes it.

* Remove Microsoft.Extensions.File* bits
2021-10-22 04:15:02 +00:00
David Wengier 9d66dfa4aa If we're going to leave the code there, may as well test it! 2021-10-22 14:29:35 +11:00
David Wengier 2708f77e00 Fix build 2021-10-22 14:23:12 +11:00
N. Taylor Mullen d540566de0 Fix failing diagnostic publisher tests.
- Only clear timers on exceptions.
2021-10-21 15:57:54 -07:00
N. Taylor Mullen c6fcbdfa84
Stop crashing VS when logging errors. (#5646)
* Stop crashing VS when logging errors.

- Ultimately this is more of a workaround for this issue: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1405849. But let me share some insight as to how we got here. When I initially ["protected VS from crashing"](95b33df1d6) due to the compiler bug I added logic that would `LogError` in the case that unexpected exceptions would occur. Now the problem with my approach is that our Language Server logger can potentially explode if the language server is in the midst of shutting down. Therefore, what would happen is the compiler would unexpectedly throw, we'd then try to log an error and if we were in a shutting down state that logging of an error would then throw again resulting in VS crashing.
- Went from logging an error to an unobserved task exception. This means things will still throw; however, they'll be translated into unobserved task exceptions.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1420246

* Address code review comments.
2021-10-21 21:01:19 +00:00
David Wengier 7d31d8f2d9 Add some variables to the benchmark, and the formatting algo 2021-10-21 16:17:02 +11:00
N. Taylor Mullen 3eec3214be Update automated dependencies.
- Saw that automation was having a hard time auto-merging and noticed some stale / incorrect dependencies. Ran a few darc commands to fix things up.
- Razor no longer depends on Configuration.Json so could remove & needed to update the Extensiosn.Configuration package to have a coherent parent dependency to match.
2021-10-20 13:48:12 -07:00
N. Taylor Mullen 443bd77acf Migrate `textDocument/signatureHelp` to new use delegation APIs.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 78d8f83e4b Migrate `textDocument/hover` to new use delegation APIs.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 0c38c4be65 Migrate `textDocument/implementation` to new use delegation APIs.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen c0a89a0e96 Migrate `textDocument/definition` to new use delegation APIs.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen b685140a96 Migrate `textDocument/highlight` to new use delegation APIs.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 4faa908829 Address code review comments.
- Move ClientCapabilities check to an intelligent property
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 621de3b82e Migrate `textDocument/rename` to new use delegation APIs.
- Marked the `RenameHandler` as `#nullable enable` and cleaned up some of the null handling in the rename flow.
- Removed an unnecessary throw if cancellation requested (the following `await` would have captured it anyhow).
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 257438bd95 Migrate OnAutoInsert to new use delegation APIs.
- Marked the `OnAutoInsertHandler` as `#nullable enable`. Some of the fallout from this was that I also had to mark the HTML C# language server as nullable enable as well and react accordingly. Ultimately this made things a lot more clear on when null could be returned.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 4f5b5a7287 Migrate razor semantic token methods to new delegation APIs.
- When we fail to talk to a semantic endpoint we now indicate that we're out-of-sync.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 05febb544c Migrate razor/formatDoc/Range requests to new delegation APIs.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 9161a0d89e Addressed code review comments.
- Updated some logging language + severities
- Removed some unnecessary null checks
- In the pull diagnostic handler removed a comment on long-term goals (we do want to talk to multiple servers)
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 9e26280735 Update C# pull diagnostics to use new delegation APIs.
- Since the request diagnostics on all servers API utilizes `IAsyncEnumerable` I modified the pull diagnostic signature from returning an array which is mutable to an `IReadOnlyList` so I could build a list and then return it in an immutable format.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

#5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 765f71857d Update push diagnostic translations to use new delegation APIs.
- Had to utilize our LSP document manager on the client to lookup the appropriate `TextBuffer` for translated diagnostic requests.
- Marked translation APIs as `nullable` since our new delegation APIs were. Updated callsites accordingly.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 80ebce7899 Remove newline 2021-10-20 10:03:30 -07:00
N. Taylor Mullen 9b15c889f7 Update `razor/resolveCodeActions` to use new delegation APIs
- One issue with migrating our pre-existing code action resolve logic to the new APIs is that we needed to know what document a code action resolve request was for. To account for this I had to update all of our resolve code action APIs to flow the corresponding Razor host document so we could look it up on the client when re-invoking. This is the bulk of this changeset.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen d6db9c4e3f Update `razor/provideCodeActions` to use new delegation APIs.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen de65057ce0 Fix ReinvocationResponseHelper to work properly for `null` responses. 2021-10-20 10:03:30 -07:00
N. Taylor Mullen b37e393726 Migrate HTMLC# `completionItem/resolve` to new delegation APIs
- Had to update our completion resolve handler to take in our LSP document manager to ensure we can resolve corresponding text documents so on re-invocation the LSP platform knows which server to talk to.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen 10192c0ffb Migrate HTMLC# `textDocument/completion` to new delegation APIs
- Added a `ReinvocationResponse` extension to extract results or log to make reinvocation responses easier to handle.
- Updated the tests to reflect the new dependency on document snapshots and their virtual documents.

Part of #5017
2021-10-20 10:03:30 -07:00
N. Taylor Mullen a48bae91cb Add David to code owners
@davidwengier
2021-10-19 15:14:48 -07:00
David Wengier 1d644183c1
Merge pull request #5625 from davidwengier/FixInitializerFormatting 2021-10-19 17:49:09 +11:00
dotnet-maestro[bot] 90570978f1 Update dependencies from https://github.com/dotnet/aspnetcore build 20211018.18
Microsoft.CodeAnalysis.Razor , Microsoft.AspNetCore.Testing , Microsoft.AspNetCore.Razor.Language , Microsoft.AspNetCore.Razor.Internal.Transport , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X , Microsoft.AspNetCore.Mvc.Razor.Extensions
 From Version 6.0.0-rtm.21518.12 -> To Version 6.0.0-rtm.21518.18
2021-10-19 01:12:34 +00:00
N. Taylor Mullen fce04817b8 Address code review feedback. 2021-10-18 16:24:49 -07:00
N. Taylor Mullen df7dba0748 Migrate projection and edit remapping APIs to new re-invocation APIs.
- Migrated projection and document mapping APIs to use new re-invocation APIs. Typically these two APIs will use the top-level Razor buffer as their inspection point for requesting custom messages (language query, document edit remap) so the top-level API's for the two classes didn't really have to change because we could lookup the document snapshot and grab its buffer directly.
- Update the `LSPProjectionProvider` and `LSPDocumentMappingProvider` APIs to be `nullable`
- Updated tests to reflect the new requirement of a document snapshot / `ITextBuffer` callpoint. The tests overall are in awful shape (way toooo mocky) but that's a problem for another day.

Part of #5017
2021-10-18 16:24:49 -07:00