Skip to content

Fix symbol-finder crash in mixed C#/TypeScript projects#60173

Merged
CyrusNajmabadi merged 2 commits intodotnet:mainfrom
CyrusNajmabadi:depTypeCrash
Mar 15, 2022
Merged

Fix symbol-finder crash in mixed C#/TypeScript projects#60173
CyrusNajmabadi merged 2 commits intodotnet:mainfrom
CyrusNajmabadi:depTypeCrash

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

@CyrusNajmabadi CyrusNajmabadi commented Mar 14, 2022

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner March 14, 2022 22:48
@ghost ghost added the Area-IDE label Mar 14, 2022
@@ -358,8 +360,7 @@ private static IEnumerable<Project> GetProjectsToExamineWorker(
// that actually supports compilations.
Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Contributor Author

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 IEnumerable<Project> GetProjectsToExamineWorker(
// that actually supports compilations.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment needs update

Copy link
Copy Markdown
Contributor

@ryzngard ryzngard left a 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.

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;
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Contributor Author

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.

@CyrusNajmabadi CyrusNajmabadi merged commit ca64a6d into dotnet:main Mar 15, 2022
@ghost ghost added this to the Next milestone Mar 15, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the depTypeCrash branch March 15, 2022 16:02
@allisonchou allisonchou modified the milestones: Next, 17.2.P3 Mar 28, 2022
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.

5 participants