Skip to content
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

Include source generators in TryGetMethodDescriptorAsync #51686

Merged
merged 3 commits into from
Mar 5, 2021

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Mar 5, 2021

Fixes #51633

@@ -246,7 +246,7 @@ private static async Task<ReferenceMethodDescriptor> TryGetMethodDescriptorAsync
return null;
}

var document = solution.GetDocument(doc.Id);
var document = await solution.GetDocumentAsync(doc.Id, includeSourceGenerated: true, cancellationToken).ConfigureAwait(false);
Copy link
Member

Choose a reason for hiding this comment

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

i honestly don't understand the point of the before/after line in teh first place. Right above this, we already found teh 'doc', so why not just use that?

Copy link
Member Author

Choose a reason for hiding this comment

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

@CyrusNajmabadi Honestly, me too. Let me delete it and see if there are any failures that explains this.

Copy link
Member

Choose a reason for hiding this comment

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

I'm guessing this got refactored over the years and ended up in this form without anybody realizing it.

Copy link
Member Author

Choose a reason for hiding this comment

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

This goes back to b83e577

Copy link
Member

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

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

@jasonmalinowski any SG concerns here?

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.

:shipit:

{
return null;
}

var document = solution.GetDocument(doc.Id);
Copy link
Member

Choose a reason for hiding this comment

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

I am terrified to wonder how this code ever happened in the first place.

@jasonmalinowski
Copy link
Member

@CyrusNajmabadi My only concern is the that the original code ever existed in our codebase in the first place.

@jinujoseph jinujoseph added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Mar 5, 2021
@jasonmalinowski jasonmalinowski merged commit ea82195 into dotnet:main Mar 5, 2021
@jasonmalinowski
Copy link
Member

Merging this so it's in this at least in going forward; we're still having a conversation about a backport for 16.9.

@jasonmalinowski
Copy link
Member

And to follow up since a few other folks have ran into this: this will be fixed with 16.10. Based on internal schedules if we got a patch out for 16.9 it wouldn't get in your hands that much faster than just waiting for 16.10, so just best to sit tight and wait for a bit longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Community The pull request was submitted by a contributor who is not a Microsoft employee.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CodeLens references unhandled exception
6 participants