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

14582 Коммитов

Автор SHA1 Сообщение Дата
Dustin Campbell 6cfeab00ff Don't dispose services twice
For types that have a `CancellationTokenSource` that is triggered during `Dispose()`, we should check to see if it has already been cancelled to avoid disposing twice. Implicitly, there's a race here if there are multiple threads calling `DIspose()`, but these are all handled by the DI containers we use.
2024-06-12 12:36:02 -07:00
Dustin Campbell 76ab7e465f Remove RazorProjectInfoFileSerializer 2024-06-12 10:32:26 -07:00
Dustin Campbell cb203a189d RazorProjectService shouldn't implement IOnInitialized
`RazorProjectService` doesn't need to force itself to be initialized when the language server is initialized. It's registered as an `IRazorStartupService`, so it starts initializing right away. Since all `RazorProjectService` public entry points await initialization, we don't need to force it to finish initializing in `OnInitialized`. This is especially true if the driver itself implicitly waits for `OnInitialized`.
2024-06-12 08:57:20 -07:00
Dustin Campbell 22e2511770 Trim "Microsoft.CodeAnalysis.Razor." from ILogger category name 2024-06-12 08:48:32 -07:00
Dustin Campbell 0d449f3bd5 Don't open file for reading twice 2024-06-12 08:46:45 -07:00
Dustin Campbell d6eb60cd62 Make IWorkspaceRootPathProvider.GetRootPath(...) async 2024-06-11 16:56:02 -07:00
Dustin Campbell 6f50764383 Ensure that RazorProjectInfoService waits for driver to initializer 2024-06-11 16:41:24 -07:00
Dustin Campbell 34969dedb9 Make a couple of tweaks to FileWatcherBasedRazorProjectInfoDriver
A couple of changes to match the original implementation in ProjectConfigurationFileChangeDetector
2024-06-11 15:55:12 -07:00
Dustin Campbell 72ed38a6a1 Don't add extra IWorkspaceRootPathProvider to the service collection 2024-06-11 15:06:06 -07:00
Dustin Campbell 06644b96d4 Remove RazorProjectInfoDeserializer 2024-06-11 15:06:06 -07:00
Dustin Campbell b448b99ebd Remove MonitorWorkspaceFolderForConfigurationFiles option 2024-06-11 15:06:02 -07:00
Dustin Campbell 9860d0e690 Remove UseProjectConfigurationEndpoint option and feature flag 2024-06-11 14:36:29 -07:00
Dustin Campbell 7699f2600e Remove ProjectConfigurationFileChangeEventArgs 2024-06-11 14:31:22 -07:00
Dustin Campbell 25bc05dcd9 Remove unused IProjectFileChangeListener interface 2024-06-11 14:27:54 -07:00
Dustin Campbell cb0923ffdb Remove ProjectConfigurationStateSynchronizer 2024-06-11 14:27:34 -07:00
Dustin Campbell 8bf003147b Log errors in FileWatcherBasedRazorProjectInfoDriver 2024-06-11 14:21:38 -07:00
Dustin Campbell a61c4e1a50 Remove ProjectConfigurationFileChangeDetector 2024-06-11 14:09:56 -07:00
Dustin Campbell 5f6036ef39 Remove ProjectInfoEndpoint 2024-06-11 14:06:29 -07:00
Dustin Campbell 4ac135e7f9 Remove MonitorProjectConfigurationFilePathEndpoint
This is no longer used by Visual Studio and VS Code never used it.
2024-06-11 13:56:57 -07:00
Dustin Campbell 439aa7a03d Implement FileWatcherBasedRazorProjectInfoDriver 2024-06-11 13:53:17 -07:00
Dustin Campbell c437c02fe8 Convert WorkspaceDirectoryPathResolver to interface and implement on CapabilitiesManager 2024-06-11 10:34:21 -07:00
Dustin Campbell caaa0d7c20 Remove ProjectConfigurationFilePathStore 2024-06-11 09:20:57 -07:00
Dustin Campbell 7d199604a0 Remove RazorProjectInfoEndpointPublisher 2024-06-11 09:17:45 -07:00
Dustin Campbell f27289748a Improve ProjectWorkspaceStateGenerator logging 2024-06-11 08:44:26 -07:00
Dustin Campbell 7211fd8e2d Remove old RazorProjectInfoPublisher 2024-06-11 08:44:26 -07:00
Dustin Campbell c9d68ae5f3 Add extra logging and don't attempt to add misc-project a second time 2024-06-11 08:44:25 -07:00
Dustin Campbell 23997ca6be Make `RazorProjectService` implement `IRazorProjectInfoListener`
As part of this change, I've made `RazorProjectService` own the misc files project, rather than `SnapshotResolver`, which fixes a potential issue with initialization order.
2024-06-11 08:44:25 -07:00
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