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

14582 Коммитов

Автор SHA1 Сообщение Дата
David Wengier 36eeb135c4 Move boiler plate logging and error handling into the service 2024-05-16 19:32:47 +10:00
David Wengier 8de1a27532
Fix asset manifest generation (#10370)
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2056346

I made a mistake when I originally authored this, but we didn't notice
because we were shipping .NET Framework services so there were files at
the specified location too. Now that we've removed those, this started
to cause exceptions.
2024-05-16 15:03:24 +10:00
David Wengier b22daa322d Fix asset manifest generation 2024-05-16 09:11:27 +10:00
David Wengier e2128d0775
[Cohost] Remove unnecessary indirection in semantic tokens (#10369)
Being the first endpoint created, semantic tokens had a little bit of
over design. I did not YAGNI 😁
2024-05-16 08:30:35 +10:00
David Wengier c2bca03d57 Remove unnecessary indirection 2024-05-15 21:28:07 +10:00
David Wengier 6e83c9ea2e
Bump CLaSP (#10366)
Funny story.

When I did my previous PR, I had to bump Roslyn but thought I'd leave
CLaSP alone to simplify the PR, and not confuse this. So this PR is
bumping CLaSP to match and dealing with all of the breaking changes.

There were 2 😁
2024-05-15 10:00:31 +10:00
David Wengier a595af82f9 Fix various messages in the error list window 2024-05-14 20:55:24 +10:00
David Wengier 606e3db4d2 Respond to the enormous breaking changes 2024-05-14 20:53:50 +10:00
David Wengier 0527ce2228 Bump CLaSP 2024-05-14 20:53:16 +10:00
David Wengier 5ec07b35c5
Uri Presentation Part 2, aka Cohost Html on-demand generation (#10359)
Part of https://github.com/dotnet/razor/issues/9519

Commit at a time might be easier. Not really sure.

This PR finished off Uri Presentation in cohosting, but more importantly
it brings html document generation to cohosting. The generation is done
completely on-demand as we get a request for a document, and in general
is much simpler than the current system, because whilst we still need to
push the document to a VS buffer, we don't have to wait for the document
to be pushed to VS from the LSP server, and synchronize those two
pushes. This isn't doing any buffer management specifically for
cohosting yet, but all of that is still needed for C# anyway, at the
moment.
2024-05-14 17:19:32 +10:00
David Wengier d81c2cebc3 Bump to a real Roslyn version now that they've inserted 2024-05-14 16:55:33 +10:00
dotnet-maestro[bot] 92c46cff09
[main] Update dependencies from dotnet/arcade (#10321)
* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

* Update dependencies from https://github.com/dotnet/arcade build 20240425.1

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24204.3 -> To Version 8.0.0-beta.24225.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: David Wengier <david.wengier@microsoft.com>
2024-05-14 08:46:30 +02:00
David Wengier b1844e9add
[main] Update dependencies from dotnet/source-build-reference-packages (#10365)
This pull request updates the following dependencies

[marker]: <> (Begin:011df26a-fbd1-45b0-94b9-08db3601dcca)
## From https://github.com/dotnet/source-build-reference-packages
- **Subscription**: 011df26a-fbd1-45b0-94b9-08db3601dcca
- **Build**: 20240506.2
- **Date Produced**: May 6, 2024 2:52:27 PM UTC
- **Commit**: a4c02499bef24d0e16255657ccdb160d26c82c32
- **Branch**: refs/heads/main

[DependencyUpdate]: <> (Begin)

- **Updates**:
-
**Microsoft.SourceBuild.Intermediate.source-build-reference-packages**:
[from 9.0.0-alpha.1.24252.1 to 9.0.0-alpha.1.24256.2][1]

[1]:
9c1cc994f8...a4c02499be

[DependencyUpdate]: <> (End)


[marker]: <> (End:011df26a-fbd1-45b0-94b9-08db3601dcca)
2024-05-14 15:39:12 +10:00
David Wengier 25ba33cc86
Remove unnecessary dependencies from formatting (#10363)
All of our formatting passes took an `IClientConnection` but only Html
actually uses it. Cleaning this up gives us a more accurate picture for
cohosting.
2024-05-14 07:09:58 +10:00
Alex Gavrilov 822475f265
using directive should be available in Razor components (#10360)
* using directive should be available in Razor components

* Fixing test name

* Field/property rename per CR suggestion

* Fixing field capitalization
2024-05-13 20:52:44 +00:00
Jan Jones f239b13745
Allow components in global namespace (#10086)
* Allow components in global namespace

* Update existing tests

* Fixup baseline

* Test formatting of component in global namespace

* Add design-time codegen test

* Automatically determine where empty root namespace is allowed

* Fixup tooling

* Test more formatting in global namespace

* Fix global namespace testing

* Fix formatting in global namespace

* Check global namespace flag instead of empty string
2024-05-13 15:26:00 +00:00
dotnet-maestro[bot] ff04269672 Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240506.2
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 9.0.0-alpha.1.24252.1 -> To Version 9.0.0-alpha.1.24256.2
2024-05-13 12:58:17 +00:00
David Wengier d4ca69fde1 Remove unnecessary dependencies from formatting, and minor cleanup 2024-05-13 10:48:20 +10:00
David Wengier 836ab71fc8 We all make mistakes. Some of us make two. 2024-05-11 09:02:43 +10:00
Jan Jones 8376bdbfc2
Verify C# diagnostics in `CodeGenerationIntegrationTest` (#10337)
* Verify C# diagnostics

* Update baselines

* Improve diagnostics diffing code

* Handle emit diagnostics

* Load dynamic support runtime assembly

* Update baselines
2024-05-10 09:13:47 +00:00
David Wengier 6604eab58d Update version details xml 2024-05-10 15:37:26 +10:00
David Wengier 885012924d Fix after rebase 2024-05-10 15:29:15 +10:00
David Wengier 37552bfff5 Tests 2024-05-10 15:13:58 +10:00
David Wengier d11f843af7 Tweak logging 2024-05-10 15:13:58 +10:00
David Wengier 17b2a93f5b Fix a bug when successful results as disposed 2024-05-10 15:13:58 +10:00
David Wengier 00ae336df5 Move version creation into static method 2024-05-10 15:13:58 +10:00
David Wengier ce3c26be4d Synchronize Html documents for LSP methods that haven't been ported to cohosting yet 2024-05-10 15:13:58 +10:00
David Wengier ad16e26b99 Wire it all up 2024-05-10 15:13:54 +10:00
David Wengier ffb9ccc9b3 Create a service to manage publishing of Html for a specific Razor TextDocument version 2024-05-10 15:12:58 +10:00
David Wengier 5a67db7927 Create a service to request Html from OOP, and publish it to VS buffers 2024-05-10 15:12:58 +10:00
David Wengier 957b83319b Don't annoy the compiler with IDE services changes 2024-05-10 15:12:58 +10:00
David Wengier 3c84e652a2 Whitespace 2024-05-10 15:12:58 +10:00
David Wengier b288eb0c46 Use real Roslyn API 2024-05-10 15:12:58 +10:00
David Wengier 6760ae20ea Checking the language really shouldn't be in the helper 2024-05-10 15:12:58 +10:00
David Wengier 98ec289393 Bump Roslyn to get new APIs 2024-05-10 15:12:57 +10:00
Dustin Campbell ffac493e26
Avoid image load due to co-hosting and CLaSP (#10357)
There's a long discussion about this, but it turns out that CLaSP relies on MEF metadata that exposes System.Types. This means that MEF must load assemblies in order to produce metadata. Recently, one of our co-hosting endpoints unintentionally pulled in Microsoft.CodeAnalysis.Razor.Workspaces by using a protocol type from MS.CA.Razor.Workspaces as generic type argument. Since, CLaSP loads the type, it had to additionally load MS.CA.Razor.Workspaces to satisfy the generic argument.

The fix is easy -- just don't use that protocol type. However, that's not sustainable and this change has started a conversation about potential re-architecture to CLaSP to avoid eagerly loading assemblies.
2024-05-09 22:25:57 +00:00
David Wengier 6cda30bbee
Fix disco colors when modifying documents during project load (#10354)
Fixes an issue Andrew found in speedometer tests. When opening files and
modifying them, before we migrate the document to the "real" project,
things get out of sync.

Also matches some stacks on PRISM, but I think this bug was only
introduced in the last two weeks, so I don't think its the only cause
thats for sure.
2024-05-10 07:02:21 +10:00
David Wengier 35b302e594 PR Feedback 2024-05-10 06:42:01 +10:00
David Wengier 1a1d246e69
Don't put Razor.Diagnostics.Analyzers in the VSIX (#10355)
Fixes https://github.com/dotnet/razor/issues/10309
2024-05-10 06:38:22 +10:00
Dustin Campbell cf13db4812
Don't use CancellationTokenSource for disposal (#10352)
This change should address issues in ProjectWorkspaceStateGenerator
where update cancellation was tied to the base IDisposable
implementation in a complex way. This could cause exceptions to be
thrown unnecessarily if the generator is disposed while an update is in
flight. Now we just track a boolean field as we did in the past.

Validation PR to determine impact:
https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/549802
2024-05-09 07:23:15 -07:00
David Wengier d4452f6291 Don't put Razor.Diagnostics.Analyzers in the VSIX 2024-05-09 21:33:49 +10:00
David Wengier bd9e9a54d9 Update target path when migrating documents so less work is done later 2024-05-09 16:29:44 +10:00
David Wengier f4d78d115c Maintain document text when updating documents that have the same file path 2024-05-09 16:29:25 +10:00
Dustin Campbell 2c32c756c3 Don't use CancellationTokenSource for disposal
This change should address issues in ProjectWorkspaceStateGenerator where update cancellation was tied to the base IDisposable implementation in a complex way. This could cause exceptions to be thrown unnecessarily if the generator is disposed while an update is in flight. Now we just track a boolean field as we did in the past.
2024-05-08 12:09:49 -07:00
Alex Gavrilov 2e6e65fd8a
Support Linked Editing Ranges in Cohosting. (#10349)
* Support Linked Editing Ranges in Cohosting.

Factored out common code into a static helper and created the remote part of the code as well as cohosting endpoing.

* Removed unnecessary code and comment (CR feedback)

* Adding RazorDocumentServiceBase to deal with common document-related code

* Fixing build break (removing unnecessary using)

* Additional methods that allows not to duplicate work
2024-05-08 06:24:19 +00:00
David Wengier baf6f6a38c
[main] Update dependencies from dotnet/source-build-reference-packages (#10345)
This pull request updates the following dependencies

[marker]: <> (Begin:011df26a-fbd1-45b0-94b9-08db3601dcca)
## From https://github.com/dotnet/source-build-reference-packages
- **Subscription**: 011df26a-fbd1-45b0-94b9-08db3601dcca
- **Build**: 20240502.1
- **Date Produced**: May 2, 2024 2:10:44 PM UTC
- **Commit**: 9c1cc994f8123ec2a923c5179c238c13da1b4ab7
- **Branch**: refs/heads/main

[DependencyUpdate]: <> (Begin)

- **Updates**:
-
**Microsoft.SourceBuild.Intermediate.source-build-reference-packages**:
[from 9.0.0-alpha.1.24162.2 to 9.0.0-alpha.1.24252.1][1]

[1]:
c0b5d69a1a...9c1cc994f8

[DependencyUpdate]: <> (End)


[marker]: <> (End:011df26a-fbd1-45b0-94b9-08db3601dcca)
2024-05-07 13:40:23 +10:00
David Wengier db9b1d01c7
Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2445952 (#10348) 2024-05-07 06:56:26 +10:00
Dustin Campbell 0947714887
Write RazorProjectInfo to temporary file and notify language server via LSP (#10333)
Related to #10173

This change updates the work to pass `RazorProjectInfo` via LSP to
instead write `RazorProjectInfo` instances to temporary files and pass
the file names via LSP. The files are deleted in the language server
after they are deserialized.
2024-05-06 11:20:38 -07:00
dotnet bot 5fcea2e315 Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2445915 2024-05-06 11:17:06 -07:00
dotnet bot cf2af85984 Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2445915 2024-05-06 11:16:56 -07:00