Merged
Conversation
The dotnet/roslyn#65592 the Roslyn team defined a new brokered service for communicating information from the project system to the language service. In effect, the `IWorkspaceProjectContext` and `IWorkspaceProjectContextFactory` types are being replaced by the very similar `IWorkspaceProject` and `IWorkspaceProjectFactoryService` types, but it isn't happening all at once. In preparation, this commit moves all the code depending on `IWorkspaceProjectContext` and `IWorkspaceProjectContextFactory` out of our host-agnostic layer (Microsoft.VisualStudio.ProjectSystem.Managed) and into our VS-specific layer (Microsoft.VisualStudio.ProjectSystem.Managed.VS). Specific changes: 1. Any files that actually call the old interfaces are moved as-is to the VS layer. 2. Any further files that depend on those files in 1 are moved as well. 3. Files that refer to the old interfaces only in comments or doc comments have been updated to use phrases like "language service project" instead but have otherwise been left in place. 4. The dependency on the Microsoft.VisualStudio.LanguageServices package has moved from the host-agnostic layer to the VS-specific layer. 5. The `DotNetImportsEnumProvider` has also moved to the VS layer, as it depends on the `VisualStudioWorkspace` type. The host-agnostic layer no longer references the assembly with that type. 6. Unit test files have also been moved around to reflect the new layering. There are a few further dependencies on the Roslyn `Workspace` type in Microsoft.VisualStudio.ProjectSystem.Managed; those will be moved in a future change as direct access to a `Workspace` is very much dependent on VS.
Update the comment on `LanguageServiceRules` to provide some guidance on what types will make use of these rules.
MiYanni
approved these changes
Dec 14, 2022
Contributor
Author
|
Oops, meant to request @drewnoakes review of this, not assign it to him. Apologies. |
drewnoakes
approved these changes
Dec 16, 2022
drewnoakes
added a commit
to drewnoakes/project-system
that referenced
this pull request
Nov 23, 2023
The language service is split between the VS and host-agnostic layers. Historically, we needed to call into the host from the lower layer, and did that via the `ILanguageServiceHostEnvironment` interface. In dotnet#8722, some of that code was moved up into the VS layer. As a result, this abstraction is no longer needed and we can clean things up a little and reduce the size of the MEF graph.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In dotnet/roslyn#65592 the Roslyn team defined a new brokered service for communicating information from the project system to the language service. In effect, the
IWorkspaceProjectContextandIWorkspaceProjectContextFactorytypes are being replaced by the very similarIWorkspaceProjectandIWorkspaceProjectFactoryServicetypes, but it isn't happening all at once. In preparation, this commit moves all the code depending onIWorkspaceProjectContextandIWorkspaceProjectContextFactoryout of our host-agnostic layer (Microsoft.VisualStudio.ProjectSystem.Managed) and into our VS-specific layer (Microsoft.VisualStudio.ProjectSystem.Managed.VS). Specific changes:DotNetImportsEnumProviderhas also moved to the VS layer, as it depends on theVisualStudioWorkspacetype. The host-agnostic layer no longer references the assembly with that type.There are a few further dependencies on the Roslyn
Workspacetype in Microsoft.VisualStudio.ProjectSystem.Managed; those will be moved in a future change as direct access to aWorkspaceis very much dependent on VS.Microsoft Reviewers: Open in CodeFlow