Skip to content

Conversation

@kinto0
Copy link
Contributor

@kinto0 kinto0 commented Nov 7, 2025

Summary:
fixes #1525

If I rename a method, I want to rename all children as well. Similarly, references to base.method() should find child.method(). But I don't think references to child.method() should find child2.method().

This diff, a precursor to "go to implementations", makes find-references find all overrides and references to overrides as well.

I do this by adding a new index from method -> base class that implements that method. That way, when searching tdeps of a class, we can find all implementations.

Bug: if our tdeps include a method not in our children, we will find these references. I imagine storing the full MRO in the index would be too large and calculating this on the fly would take too long (I think we throw this out after getting answers?).

Differential Revision: D85617964

Summary:
fixes facebook#1525

If I rename a method, I want to rename all children as well. Similarly, references to base.method() should find child.method(). But I don't think references to child.method() should find child2.method(). 

This diff, a precursor to "go to implementations", makes find-references find all overrides and references to overrides as well. 

I do this by adding a new index from method -> base class that implements that method. That way, when searching tdeps of a class, we can find all implementations. 


Bug: if our tdeps include a method not in our children, we will find these references. I imagine storing the full MRO in the index would be too large and calculating this on the fly would take too long (I think we throw this out after getting answers?).

Differential Revision: D85617964
@meta-cla meta-cla bot added the cla signed label Nov 7, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 7, 2025

@kinto0 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D85617964.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

find-references on methods finds reimplementations

1 participant