-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Fix symbol-finder crash in mixed C#/TypeScript projects #60173
Conversation
@@ -358,8 +360,7 @@ private static void AddRange(SymbolSet foundTypes, SymbolSet currentTypes, Func< | |||
// that actually supports compilations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either this comment is wrong, or your removal of the Where
is wrong, but I have no idea which
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. That's fair.
@@ -358,8 +360,7 @@ private static void AddRange(SymbolSet foundTypes, SymbolSet currentTypes, Func< | |||
// that actually supports compilations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment needs update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would love a short description of what was crashing here :)
Otherwise I think code looks reasonable and test added looks to cover scenario.
@@ -29,7 +29,7 @@ internal static partial class DependentTypeFinder | |||
var client = await RemoteHostClient.TryGetClientAsync(solution.Workspace, cancellationToken).ConfigureAwait(false); | |||
if (client != null) | |||
{ | |||
var projectIds = projects?.SelectAsArray(p => p.Id) ?? default; | |||
var projectIds = projects?.Where(p => RemoteSupportedLanguages.IsSupported(p.Language)).SelectAsArray(p => p.Id) ?? default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required for the fix, or just an optimization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is required. Oop doesn't support other languages and crashes trying to find these projects on the other side.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1464142