Repository navigation
Fix "Add placeholders for all missing methods" action - #5164
Merged
Merged
Conversation
Aster89
force-pushed
the
repro
branch
2 times, most recently
from
November 6, 2026 14:17
3110293 to
b8ddbdf
Compare
Aster89
marked this pull request as ready for review
November 6, 2026 14:25
Aster89
requested review from
crtschin and
jhrcek
and removed request for
crtschin
November 6, 2026 14:25
fendor
approved these changes
Nov 6, 2026
fendor
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, some nitpicks.
The commit message:
Implement solution
This commit actually implements the solution to https://github.com/haskell/haskell-> language-server/issues/5165:
Is not a great commit message, please write what the commit does :)
Collaborator
Author
@fendor, there's a list with 4 steps, don't you see it? |
Collaborator
The list is good, the title is not :) I should be able to guess what a commit is about by just reading the title of the commit message. |
…hods" In other words, prevent _"Add placeholders for all missing methods"_ action from erroneously inserting already implemented methods (hence duplicating them), thus fixing haskell#5165. Here's the approach: 1. extract the `instance` declarations from the "renamed AST", 2. detect the (only) one that overlaps with the given `Range`, 3. extract the methods defined in this `instance`, 4. `filter` such methods out of those "all the methods" that the plugin asks GHC for.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR consists of 4 commits, the last one of which actually implements the solution to the bug. See commit messages for details.
Fixes #5165