-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge release/dev17.10 to main #10092
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change removes the implementation and usages of IProjectSnapshotManagerAccessor from the language server. Instead, services can just import an IProjectSnapshotManager. This requires updating more tests to just use tooling components directly, rather than mocking them out. In particular, updating RenameEndpointTest required extra work because the mocks were inconsistent with reality.
This updates DefaultProjectSnapshotManager to stop importing IProjectSnapshotManagerTrigger instances.
This change removes IProjectSnapshotChangeTrigger implementations in the language server and introduces the concept of an IRazorStartupService. Start up services will be created when Razor tooling is started up.
…ger completely Fixes #9950 This is a pretty significant change that requires refactoring of how the project snapshot manager is exported within Visual Studio. The IProjectSnapshotManagerAccessor implementations and usages have been completely removed, and IProjectSnapshotChangeTrigger has also been deleted. Now, if a service wants to subscribe to project change events, they can import an IProjectSnapshotManager. And, if that service wants to be loaded when the Razor tooling is boot-strapped, they can export themselves as an IRazorStartupService.
This change updates the VS Razor start up service initialization to include the three entry points that bootstrap Razor tooling: 1. LegacyTextViewConnectionListener: If the legacy editor is enabled and a project is loaded with an editor already opened, Razor tooling bootstraps when a subject buffer is connected. 2. RazorLSPTextViewConnectionListener: If the LSP editor is enabled and a project is loaded with an editor already opened, Razor tooling bootstraps when a subject buffer is connected. 3. WindowsRazorProjectHostBase: If a project is loaded and there aren't any open editors, Razor tooling bootstraps at the first update to the project manager.
These methods just call into IErrorReporter.ReportError(...). Without them, ProjectSnapshotManager no longer needs to take an IErrorReporter in its constructor.
Microsoft.DotNet.Arcade.Sdk From Version 8.0.0-beta.24161.1 -> To Version 8.0.0-beta.24161.7
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk From Version 8.0.0-beta.24161.1 -> To Version 8.0.0-beta.24161.7
This pull request updates the following dependencies [marker]: <> (Begin:c4beac37-eae4-4f6a-0368-08dc3deb80bb) ## From https://github.com/dotnet/arcade - **Subscription**: c4beac37-eae4-4f6a-0368-08dc3deb80bb - **Build**: - **Date Produced**: March 11, 2024 11:36:09 PM UTC - **Commit**: cd10e5d3748676d70ae2b4d9c84f073eeb203cac - **Branch**: refs/heads/release/8.0 [DependencyUpdate]: <> (Begin) - **Updates**: - **Microsoft.DotNet.Arcade.Sdk**: [from 8.0.0-beta.24161.1 to 8.0.0-beta.24161.7][1] [1]: dotnet/arcade@5c3fdd3...cd10e5d [DependencyUpdate]: <> (End) [marker]: <> (End:c4beac37-eae4-4f6a-0368-08dc3deb80bb)
This pull request updates the following dependencies [marker]: <> (Begin:0022737c-8efd-4919-ecf2-08dc3decc073) ## From https://github.com/dotnet/arcade - **Subscription**: 0022737c-8efd-4919-ecf2-08dc3decc073 - **Build**: - **Date Produced**: March 11, 2024 11:36:09 PM UTC - **Commit**: cd10e5d3748676d70ae2b4d9c84f073eeb203cac - **Branch**: refs/heads/release/8.0 [DependencyUpdate]: <> (Begin) - **Updates**: - **Microsoft.SourceBuild.Intermediate.arcade**: [from 8.0.0-beta.24161.1 to 8.0.0-beta.24161.7][1] - **Microsoft.DotNet.Arcade.Sdk**: [from 8.0.0-beta.24161.1 to 8.0.0-beta.24161.7][1] [1]: dotnet/arcade@5c3fdd3...cd10e5d [DependencyUpdate]: <> (End) [marker]: <> (End:0022737c-8efd-4919-ecf2-08dc3decc073)
dotnet-bot
added
area-infrastructure
auto-merge
Squash merge once all PR checks are complete and reviewers have approved
Merge Conflicts
labels
Mar 13, 2024
⚠ This PR has merge conflicts. @davidwengier |
… the Razor Language Server (#10063) Fixes #9950 Fixes #9515 I recommend reviewing commit by commit. The primary goal of this pull request is to change how `IProjectSnapshotManger` is created and how listeners subscribe to it. Primarily, `IProjectSnapshotChangeTrigger` and `IProjectSnapshotManagerAccessor` have been removed. To make sure that services previously exported as `IProjectSnapshotChangeTriggers` are still loaded, I've introduced the notion of an `IRazorStartupService`. This is a service that is guaranteed to be loaded when Razor tooling is bootstrapped in both the VS and Language Server. Often, these startup services are responsible for keeping the project snapshot manager up-to-date and need to be loaded before any project updates have occurred. In order to remove `IProjectSnapshotManagerAccessor`, I needed to re-work several tests to use real Razor tooling objects, rather than mocks. In particular `RenameEndpointTest` received a lot of attention, though there's still more work that can be done there.
Told you I'd break MEF 😛 The failures are just fallout from all of the cohosting moves and removals, they don't impact users.
This is an automatically generated pull request from release/dev17.9 into release/dev17.10. 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.9 - https://github.com/dotnet/razor/find/release/dev17.10 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.9-to-release/dev17.10 git reset --hard upstream/release/dev17.10 git merge upstream/release/dev17.9 # Fix merge conflicts git commit git push upstream merges/release/dev17.9-to-release/dev17.10 --force ```
jjonescz
approved these changes
Mar 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-infrastructure
auto-merge
Squash merge once all PR checks are complete and reviewers have approved
Merge Conflicts
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an automatically generated pull request from release/dev17.10 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:
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.
git fetch --all git checkout -t upstream/merges/release/dev17.10-to-main git reset --hard upstream/main git merge upstream/release/dev17.10 # Fix merge conflicts git commit git push upstream merges/release/dev17.10-to-main --force