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

Support go to definition for unknown receiver calls #1961

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

st0012
Copy link
Member

@st0012 st0012 commented Apr 23, 2024

Motivation

Instead of providing no candidates for possible definitions on unknown receiver calls, we now provide 10 candidates (the exact number is subject to change in the future).

This will allow the user to navigate to the definition of more methods without overwhelming them with too many candidates in some cases.

Implementation

When we can't derive the receiver of the target method, instead of return early we get 10 methods of the same name from the index.

Automated Tests

A new test case was added for this new feature.

Manual Tests

@st0012 st0012 added the enhancement New feature or request label Apr 23, 2024
@st0012 st0012 self-assigned this Apr 23, 2024
@st0012 st0012 requested a review from a team as a code owner April 23, 2024 17:16
@st0012 st0012 requested review from andyw8 and vinistock April 23, 2024 17:16
@vinistock vinistock added the server This pull request should be included in the server gem's release notes label Apr 23, 2024
Copy link
Member

@vinistock vinistock left a comment

Choose a reason for hiding this comment

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

Awesome!!!

@vinistock
Copy link
Member

Step towards #899.

Instead of providing no candidates for possible definitions on unknown
receiver calls, we now provide 10 candidates (the exact number is subject
to change in the future).

This will allow the user to navigate to the definition of more methods
without overwhelming them with too many candidates in some cases.
@st0012 st0012 force-pushed the go-to-definition-for-unknown-receiver-calls branch from cca71a8 to 59c9b93 Compare April 23, 2024 20:22
@st0012 st0012 enabled auto-merge (squash) April 23, 2024 20:35
@st0012 st0012 disabled auto-merge April 24, 2024 14:27
@st0012 st0012 merged commit 5338a9a into main Apr 24, 2024
40 of 42 checks passed
@st0012 st0012 deleted the go-to-definition-for-unknown-receiver-calls branch April 24, 2024 14:27
@andyw8 andyw8 mentioned this pull request Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants