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

Add support for implementation edges in our LSIF indexer #64263

Merged

Conversation

jasonmalinowski
Copy link
Member

Fixes #59617

@jasonmalinowski jasonmalinowski marked this pull request as ready for review October 20, 2022 01:05
@jasonmalinowski jasonmalinowski requested a review from a team as a code owner October 20, 2022 01:05
MarkImplementationOfSymbol(overridenMember);
}

void MarkImplementationOfSymbol(ISymbol baseMember)
Copy link
Member Author

Choose a reason for hiding this comment

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

The only way this will make sense is if you look at the picture in #59617.

MarkImplementationOfSymbol(implementedMember);

// If this overrides a method, we'll also mark it the same way. We want to chase to the base virtual method, skipping over intermediate
// methods so that way all overrides of the same method point to the same virtual method
Copy link
Member

Choose a reason for hiding this comment

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

interesting - I would have thought we would have pointed to intermediate members which themselves point back to the base in a chain. This loses the intermediate member information, but I have no idea if that is OK or not (not sure how this is used).

Copy link
Member Author

Choose a reason for hiding this comment

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

We discussed this and decided to go with this way for now. We saw two potential downsides of having the full chain:

  1. It's not clear what happens if somebody removes their method of an override in the middle of a chain, since then the ends of the chain are disconnected.
  2. It means a find references in the cloud has to connect all the chains together, as opposed to doing a faster lookup.

So we're going this way for now.

@jasonmalinowski jasonmalinowski merged commit 0b11216 into dotnet:main Oct 21, 2022
@jasonmalinowski jasonmalinowski deleted the support-implementation-edges branch October 21, 2022 23:02
@ghost ghost added this to the Next milestone Oct 21, 2022
@RikkiGibson RikkiGibson modified the milestones: Next, 17.5 P1 Oct 24, 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.

Support implementation edges for interfaces to types for cross-project/repo find references
3 participants