Skip to content

Add tests for references to record fields and update symbol retrieval to only include source nodes #4641

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

Conversation

soulomoon
Copy link
Collaborator

@soulomoon soulomoon commented Jun 23, 2025

Fix #4412
Very small change, Change getNamesAtPoint to only include names in the source.

@soulomoon soulomoon requested a review from wz1000 as a code owner June 23, 2025 19:14
@soulomoon soulomoon changed the title Add tests for references to record fields and update symbol retrieval Add tests for references to record fields and update symbol retrieval to only include source nodes Jun 25, 2025
References to record fields gives too many results
This commit adds tests for references to record fields and
updates the symbol retrieval logic to ensure that references to record
fields are handled correctly. The changes is small:
- The `getNamesAtPoint` function in `AtPoint.hs` now
  only searches for `Name` that are in the source node from `HieAst`.
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

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

LGTM

@soulomoon soulomoon force-pushed the 4412-textdocumentreferences-on-a-record-field-in-a-definition-returns-way-too-many-things-with-ghc-964 branch from 1e912c3 to 8277c93 Compare June 25, 2025 14:40
@soulomoon soulomoon added the merge me Label to trigger pull request merge label Jun 25, 2025
…eld-in-a-definition-returns-way-too-many-things-with-ghc-964
Copy link
Contributor

mergify bot commented Jun 25, 2025

This pull request has been removed from the queue for the following reason: checks failed.

The merge conditions cannot be satisfied due to failing checks:

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@soulomoon
Copy link
Collaborator Author

@Mergifyio requeue

Copy link
Contributor

mergify bot commented Jun 25, 2025

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

@mergify mergify bot merged commit 5d221b9 into master Jun 25, 2025
50 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

textDocument/references on a record field in a definition returns way too many things with ghc 9.6.4
2 participants