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

14655 Коммитов

Автор SHA1 Сообщение Дата
Dustin Campbell b5158d7b7b Ensure that the `RazorLanguageServerHost` is disposed 2024-06-11 08:44:25 -07:00
Dustin Campbell 29a48005ce Don't export `RazorProjectInfoDriver` as a MEF service
Since the lifetime of the `RazorProjectInfoDriver` is the same as the language service, we let our language server client create and initialize it during activation. This means that the driver no longer needs to check if `IsLSPEditorAvailable()` since its constructed by the LSP editor's language client.
2024-06-11 08:44:25 -07:00
Dustin Campbell a84ec47261 Rename to RazorProjectInfoDriver 2024-06-11 08:44:25 -07:00
Dustin Campbell b0ce9805e6 Merge publisher with base class and add tests 2024-06-11 08:44:24 -07:00
Dustin Campbell b38dc0f2f9 Remove FallbackProjectManager ProjectConfigurationFileStore test 2024-06-11 08:44:24 -07:00
Dustin Campbell 6735145d85 Clean up LanguageServerTestBase a bit 2024-06-11 08:44:24 -07:00
Dustin Campbell c447e69a9a Stop updating ProjectConfigurationFileStore 2024-06-11 08:44:24 -07:00
Dustin Campbell 397bdf6eab Add RazorProjectInfoListener in language server and update project service 2024-06-11 08:44:24 -07:00
Dustin Campbell 02c1f553d5 Add MEF exported VS RazorProjectInfoManager 2024-06-11 08:43:42 -07:00
Dustin Campbell e8e85ebd15 Add new RazorProjectInfoPublisher implementation 2024-06-11 08:43:40 -07:00
Dustin Campbell 01ff3d202c Rename RazorLanguageServerHost.Create parameter 2024-06-11 08:43:40 -07:00
Dustin Campbell d7137c74c4 Remove unneeded null arg checks 2024-06-11 08:43:40 -07:00
Dustin Campbell 3d0c7b28ca Rename VisualStudioHostServicesProvider parameter and field to match name 2024-06-11 08:43:40 -07:00
Jan Jones 0b7c3a0bc3
Collapse C# expression literals when they contain `@` transitions (#10442)
* Add tests

* Collapse C# expression literals when they contain `@` transitions

* Update baselines
2024-06-11 11:12:13 +02:00
Jan Jones 1122583944
Fix a tag helper test (#10440) 2024-06-11 10:08:44 +02:00
Joey Robichaud 703909b561
Update TSAConfig.gdntsa (#10465) 2024-06-10 16:48:08 -07:00
Joey Robichaud 7104e387ab
Update TSAConfig.gdntsa 2024-06-10 13:43:51 -07:00
Gen Lu 6c229687df
Set System.Security.Cryptography.Xml version (#10464)
fix [this
](https://dev.azure.com/dnceng/internal/_componentGovernance/dotnet-razor/alert/7988630?typeId=6437374)
issue
2024-06-10 12:05:39 -07:00
gel@microsoft.com 8dcd5e55a3 Set System.Security.Cryptography.Xml version 2024-06-10 11:44:38 -07:00
dotnet-maestro[bot] 7b4da28381
Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240604.1 (#10462)
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 9.0.0-alpha.1.24278.2 -> To Version 9.0.0-alpha.1.24304.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2024-06-10 15:35:50 +02:00
Dustin Campbell fed9655c34
Remove `ISnapshotResolver` from Razor (#10456)
`ISnapshotResolver` is really just a collection of methods that operate
on `IProjectSnapshotManager`. Given that, its existence has also seemed
a bit contrived. Even stranger, `ISnapshotResolver` is responsible the
miscellaneous files project in the language server.

This change ensures that the miscellaneous files project is added to the
`IProejctSnapshotManager` when the project manager is created. Then, it
transforms all of the `ISnapshotResolver` methods into extension methods
on `IProjectSnapshotManager`.
2024-06-07 13:31:04 -07:00
Dustin Campbell 308693d3b1 Rename SnapshotResolverTest to match purpose 2024-06-07 13:11:15 -07:00
Dustin Campbell a94b7f36e5 Remove SnapshotResolver 2024-06-06 16:41:18 -07:00
Dustin Campbell ecf6e10dc9 Add `IProjectSnapshotManager.TryResolveDocumentInAnyProject` extension method 2024-06-06 16:32:49 -07:00
Dustin Campbell b4d110ddcd Remove unused ISnapshotResolver methods 2024-06-06 16:17:38 -07:00
Dustin Campbell 652e3fa96c Add `IProjectSnapshotManager.TryResolveAllProjects` extension method 2024-06-06 16:13:50 -07:00
Dustin Campbell cafed7091e Add `IProjectSnapshotManager.FindPotentialProjects` extension method 2024-06-06 15:38:36 -07:00
Dustin Campbell 3159c09a57 Add `IProjectSnapshotManager.GetMiscellaneousProject()` extension method 2024-06-06 15:34:06 -07:00
Dustin Campbell 72b93ffd5f Create `LspProjectSnapshotManager` with misc files project baked in
Update `ProjectSnapshotManger` to take an optional delegate that can be used to populate the initial set of projects and documents in the constructor. In the language server, this is used to add the miscellaneous files project.
2024-06-06 15:24:46 -07:00
David Wengier ed752fd8e3
Simplify our middle layer bits (#10455)
In aid of future moves to System.Text.Json, cleaning up our middle layer
helps a bit because a) its one of the APIs that tie us and Roslyn to
Newtonsoft, but we don't actually take advantage, and b) we have to
implement an interface that is tied to Newtonsoft but we don't actually
benefit from.

I also stopped us using our own contained language library for the
middle layer bits because we weren't getting any real value of it, and
it makes this simpler in future to be able to separate what we need,
versus what contained library consumers need.
2024-06-07 04:42:53 +10:00
David Wengier 9641e7057e
Update src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/RazorCSharpInterceptionMiddleLayer.cs 2024-06-07 04:22:42 +10:00
Dustin Campbell e21a78ebe8
Clean up `RazorLogHubTraceProvider` (#10446)
I noticed a `Package.GetGlobalService(...)` call and decided to go ahead
and clean it up. While working on this, I also replaced a
`SemaphoreSlim` with a VS `ReentrantSemaphore`.
2024-06-05 14:48:14 -07:00
Dustin Campbell 9d52c01acd
Clean up `ViewCodeCommandHandler` (#10448)
This started out with a goal of removing a call to `JTF.Run(...)` and
ended up a few more tweaks.

@davidwengier: I have no idea how to invoke this command on a Razor
file. Do you have any tips?
2024-06-05 14:44:44 -07:00
David Wengier 94af32bf9e Avoid using the contained language system for inteceptors so we can more easily change serialization later 2024-06-05 10:18:45 -07:00
David Wengier 62c1451386 Remove our middle layer that did nothing but tie us to a deprecated API 2024-06-05 09:49:46 -07:00
Jan Jones 8a9b471ed5
Enable 1ES's SBOM generation (#10444) 2024-06-05 09:34:30 -07:00
dotnet bot 3123275b44
Merge release/dev17.11 to main (#10449)
This is an automatically generated pull request from release/dev17.11
into main.


Once all conflicts are resolved and all the tests pass, you are free to
merge the pull request. 🐯

## Troubleshooting conflicts

### Identify authors of changes which introduced merge conflicts
Scroll to the bottom, then for each file containing conflicts copy its
path into the following searches:
- https://github.com/dotnet/razor/find/release/dev17.11
- https://github.com/dotnet/razor/find/main

Usually the most recent change to a file between the two branches is
considered to have introduced the conflicts, but sometimes it will be
necessary to look for the conflicting lines and check the blame in each
branch. Generally the author whose change introduced the conflicts
should pull down this PR, fix the conflicts locally, then push up a
commit resolving the conflicts.

### Resolve merge conflicts using your local repo
Sometimes merge conflicts may be present on GitHub but merging locally
will work without conflicts. This is due to differences between the
merge algorithm used in local git versus the one used by GitHub.
``` bash
git fetch --all
git checkout -t upstream/merges/release/dev17.11-to-main
git reset --hard upstream/main
git merge upstream/release/dev17.11
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.11-to-main --force
```
2024-06-05 00:12:50 +02:00
Dustin Campbell 42db8213e3 Remove `DocumentInteractionManager` since it's no longer used 2024-06-04 11:52:31 -07:00
Dustin Campbell 7c8e30f866 Clean up `File.Exists(...)` cache in `ViewCodeCommandHandler`. 2024-06-04 11:51:51 -07:00
Dustin Campbell 6fcee4f86d Replace `ImmutableHashSet<string>` with `FrozenSet<string>` 2024-06-04 11:43:11 -07:00
Dustin Campbell d039f8fe08 Remove `JTF.Run(...)` from `ViewCodeCommandHandler` 2024-06-04 11:18:11 -07:00
Dustin Campbell 7f408f8fca Convert `TryGetTraceSource` to bool + out style 2024-06-04 10:28:43 -07:00
Dustin Campbell d6cec81565 Use primary constructor 2024-06-04 10:26:41 -07:00
Dustin Campbell 7cd793543b Remove defunct #pramga warning disable 2024-06-04 10:25:44 -07:00
Dustin Campbell 81a3380ad7 Remove unneeded abstract base class 2024-06-04 10:24:59 -07:00
Dustin Campbell 408c316b15 Clean up `VisualStudioWindowsLogHubTraceProvider`
This change cleans up `VisualStudioWindowsLogHubTraceProvider` in the following ways:

- Remove call to `Package.GetGlobalService(...)`and use newer `IVsService<,>` helper
- Replace `SemaphoreSlim` with a `ReentrantSemaphore`. (Related to #10390)
2024-06-04 10:21:33 -07:00
Jan Jones 31b79cb36b
Enforce code style in Compiler (#10430)
* Enforce code style in Compiler

* Fix headers

* Fix unused code

* Suppress EnableGenerateDocumentationFile
2024-06-03 21:43:01 +02:00
dotnet-maestro[bot] 6f45629522
Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240528.2 (#10441)
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 9.0.0-alpha.1.24270.1 -> To Version 9.0.0-alpha.1.24278.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2024-06-03 15:50:26 +02:00
dotnet-maestro[bot] 62b9ebeb31
Update dependencies from https://github.com/dotnet/arcade build 20240520.4 (#10438)
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24225.1 -> To Version 8.0.0-beta.24270.4

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2024-06-03 10:17:17 +00:00
Shen Chen 759c0de08d
Target release/dev17.11 to rel/d17.11 (#10433)
Prepare VS snap today.
2024-05-31 23:09:02 -07:00