-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Allow LanguageServerProjectSystems to load into more than one workspace #78975
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
Allow LanguageServerProjectSystems to load into more than one workspace #78975
Conversation
...er/Microsoft.CodeAnalysis.LanguageServer/FileBasedPrograms/FileBasedProgramsProjectSystem.cs
Outdated
Show resolved
Hide resolved
...ageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/LanguageServerProjectLoader.cs
Outdated
Show resolved
Hide resolved
src/LanguageServer/Protocol/Workspaces/LspMiscellaneousFilesWorkspaceProvider.cs
Show resolved
Hide resolved
src/LanguageServer/Protocol/Workspaces/ILspMiscellaneousFilesWorkspaceProvider.cs
Outdated
Show resolved
Hide resolved
...er/Microsoft.CodeAnalysis.LanguageServer/FileBasedPrograms/FileBasedProgramsProjectSystem.cs
Outdated
Show resolved
Hide resolved
Manual testing shows this works for F12 and Code Lens. The toast indicating this is a misc file is back, though. I'll want to figure out how to avoid showing that until we know whether it's a file-based program or not. |
@RikkiGibson Wait, this actually worked? Do you want me to undraft the PR then? |
That seems reasonable enough to me. I'll do a more thorough review pass in that case and I can open a follow up PR to do more quality of life stuff. For example, the misc files warning box does not go away, even when the file moves into the host workspace. |
@RikkiGibson Was there more to do for having the virtual project to work, or right now is that working because of run-api? |
It is working now, it even works today without this change but simply treats the project reference like a metadata reference. |
f4b00c7
to
2d7fd4c
Compare
src/LanguageServer/Protocol/Workspaces/LspMiscellaneousFilesWorkspaceProvider.cs
Show resolved
Hide resolved
...er/Microsoft.CodeAnalysis.LanguageServer/FileBasedPrograms/FileBasedProgramsProjectSystem.cs
Outdated
Show resolved
Hide resolved
...ageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/LanguageServerProjectLoader.cs
Outdated
Show resolved
Hide resolved
...ageServer/Microsoft.CodeAnalysis.LanguageServer/HostWorkspace/LanguageServerProjectLoader.cs
Show resolved
Hide resolved
d448780
to
48ec5bb
Compare
This allows us to place file-based programs in the host workspace so project-to-project references work; truly "miscellaneous files" projects will still stay in the MiscellaneousFiles workspace.
I'm doing an assert here rather than throwing because although this is an expectation, I don't imagine anything will be terribly wrong for the user if it's violated. But throwing would definitely make things bad.
48ec5bb
to
22c8394
Compare
Closes #78945
This allows us to place file-based programs in the host workspace so project-to-project references work; truly "miscellaneous files" projects will still stay in the MiscellaneousFiles workspace.