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

Import extension plugin: don't suggest imports from deprecated modules #2415

Open
michaelpj opened this issue Nov 29, 2021 · 2 comments · May be fixed by #2949
Open

Import extension plugin: don't suggest imports from deprecated modules #2415

michaelpj opened this issue Nov 29, 2021 · 2 comments · May be fixed by #2949
Labels
component: imports plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@michaelpj
Copy link
Collaborator

Your environment

Which OS do you use:
NixOS
Which lsp-client do you use:
emacs
Describe your project (alternative: link to the project):
cabal.project

Steps to reproduce

With extra in your package db:

module Test where

foo :: [a] -> Int -> a
foo l i = l |? i

Import extension plugin will suggest importing |? from Extra, but Extra is deprecated (you're supposed to use Data.List.Extra).

Expected behaviour

Don't suggest imports from deprecated modules (just filter them out).

Actual behaviour

It suggests importing |? from Extra.

@michaelpj michaelpj added type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. status: needs triage labels Nov 29, 2021
@pepeiborra
Copy link
Collaborator

Probably shouldn't suggest imports from *Internal* modules either.

@michaelpj
Copy link
Collaborator Author

Yeah, it should probably use the same heuristic as the completions code does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: imports plugin type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants