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

Deprioritise deprecated modules in Quick fix suggestions #4154

Closed
MatthewDaggitt opened this issue Mar 28, 2024 · 3 comments
Closed

Deprioritise deprecated modules in Quick fix suggestions #4154

MatthewDaggitt opened this issue Mar 28, 2024 · 3 comments
Labels

Comments

@MatthewDaggitt
Copy link

Is your enhancement request related to a problem? Please describe.

When I have an out of scope error:

image

then the quick fix doesn't take into account whether a module is deprecated or not. For example, here Monad.Control.Error is the top hit in the list despite the fact that Monad.Control.Error is deprecated in favour of Monad.Control.Except.

image

This means I frequently end up importing the former instead of the latter and then having to change it.

image

Describe the solution you'd like

Deprecated modules should appear at the bottom of the suggestions list, and ideally should have some sort of visual indication that they are deprecated.

Describe alternatives you've considered

None.

Additional context

None.

@Anrock
Copy link
Contributor

Anrock commented Mar 28, 2024

and ideally should have some sort of visual indication that they are deprecated.

LSP spec has this, actually. Either via deprecated CompletionItem.deprecated or the recommended way by putting CompletionItemTag.Deprecated into CompletionItem.tags list. I guess it should be trivial change if deprecation info is easily available from Haskell side of things in HLS.

Nevermind, I thought it was about completions.

@MatthewDaggitt MatthewDaggitt changed the title Don't suggest deprecated modules in Quick fix Deprioritise deprecated modules in Quick fix suggestions Mar 28, 2024
@michaelpj
Copy link
Collaborator

Duplicate of #2415, I think?

@michaelpj
Copy link
Collaborator

Note that there's an unfinished PR here, if someone wants to pick it up: ;#2949

@michaelpj michaelpj closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants