Skip to content

Only pass the lsp misc files workspace for non-VS scenarios. #56989

Merged
dibarbet merged 1 commit intodotnet:mainfrom
dibarbet:fix_misc
Oct 7, 2021
Merged

Only pass the lsp misc files workspace for non-VS scenarios. #56989
dibarbet merged 1 commit intodotnet:mainfrom
dibarbet:fix_misc

Conversation

@dibarbet
Copy link
Member

@dibarbet dibarbet commented Oct 6, 2021

Misc files in VSwill be handled by the VS misc files workspace instead of the lsp misc files workspace

https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/356545

The previous misc files change broke RPS because we started loading dlls needed by the default mef host which was used by the LSP misc files workspace. We don't have access to the VS workspace mef composition (and it might not even exist when this is created). And we don't necessarily have a host workspace. So we just avoid creating it in VS

@ghost ghost added the Area-IDE label Oct 6, 2021
…es in VSwill be handled by the VS misc files workspace instead of the lsp misc files workspace
@dibarbet dibarbet marked this pull request as ready for review October 7, 2021 06:35
@dibarbet dibarbet requested a review from a team as a code owner October 7, 2021 06:35
@dibarbet dibarbet merged commit 47ea798 into dotnet:main Oct 7, 2021
@ghost ghost added this to the Next milestone Oct 7, 2021
@dibarbet dibarbet deleted the fix_misc branch October 7, 2021 16:05
Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dibarbet Did this break something? I would have assumed that if we were still using the "regular" misc files workspace that would have just taken priority and the LSP one would have never done anything?

private static Document? GetMiscellaneousDocument(TestLspServer testLspServer)
{
return testLspServer.GetQueueAccessor().GetLspMiscellaneousFilesWorkspace().CurrentSolution.Projects.SingleOrDefault()?.Documents.Single();
return testLspServer.GetQueueAccessor().GetLspMiscellaneousFilesWorkspace()!.CurrentSolution.Projects.SingleOrDefault()?.Documents.Single();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the ! here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants