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

14809 Коммитов

Автор SHA1 Сообщение Дата
Dustin Campbell 8e085c4e66 Fix initialization contract for RazorProjectInfo drivers
`AbstractRazorProjectInfoDriver`can't call `InitializeAsync(...)` in its constructor because the driver will only be partially constructed. To address that, add a `StartInitialization` method that drivers call from their constructor. This will kick off initialization and set the result of a `TaskCompletionSource` when it finishes.
2024-06-13 10:36:01 -07:00
dotnet bot 9f10012f7b
Merge release/dev17.11 to main (#10483)
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-13 12:06:46 +02:00
Jan Jones 692783799f
Merge branch 'release/dev17.11' into main 2024-06-13 10:48:00 +02:00
Dustin Campbell af6e0d8735 Remove version of OpenExistingProject_WithReopenedFile integration test that deleted bin file 2024-06-12 17:11:57 -07:00
Dustin Campbell b8808996e4 Remove OpenExistingProject_WithReopenedFile_NoProjectRazorJson integration test 2024-06-12 17:10:30 -07:00
Dustin Campbell 547ad38251 Fix ValidateMultipleJsonFiles integration test 2024-06-12 16:59:06 -07:00
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
dotnet bot 7d3f31d88b
Merge release/dev17.10 to release/dev17.11 (#10477)
This is an automatically generated pull request from release/dev17.10
into release/dev17.11.


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.10
- https://github.com/dotnet/razor/find/release/dev17.11

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.10-to-release/dev17.11
git reset --hard upstream/release/dev17.11
git merge upstream/release/dev17.10
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.10-to-release/dev17.11 --force
```
2024-06-12 12:24:09 +02:00
Jan Jones 3985539661
Merge branch 'release/dev17.10' into release/dev17.11 2024-06-12 12:00:31 +02:00
Jan Jones d8690ff270
Do not create insertions as drafts (#10476) 2024-06-12 09:00:41 +00:00
dotnet-maestro[bot] c0bfb39f20
Update dependencies from https://github.com/dotnet/arcade build 20240610.5 (#10469)
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24270.4 -> To Version 8.0.0-beta.24310.5

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2024-06-12 10:10:56 +02:00
dotnet-maestro[bot] 1057453c85
Update dependencies from https://github.com/dotnet/arcade build 20240610.5 (#10468)
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24270.4 -> To Version 8.0.0-beta.24310.5

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2024-06-12 09:42:21 +02:00
David Wengier 752e6fa603 Workaround FAR test failure 2024-06-12 17:29:04 +10:00
Andrew Hall 74bed8ee11
Publish rzls as a nuget package for vs-code (#10453)
The majority of this was just copied from the way Roslyn packages their language server. Publish each of our RIDs for rzls as nuget packages instead of zipping them for the cdn.
2024-06-11 17:01:39 -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
Fred Silberberg 7345c294cf
Add more testing from submitted user cases. (#10471) 2024-06-11 13:43:36 -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