You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 1.4.0 we introduced completions for all local identifiers in the project. These completions automatically insert missing imports. It turns out that we don't verify whether the imports are actually missing, leading to some problems:
Redundant imports, if the import already exists
Conflicting import, if it's a redundant import that conflicts with something that already exists
Circular imports, if the completed identifier is defined in the module being edited
All the above are painful, but 2 and 3 are specially annoying.
The solution for this would be:
for 1, to perform an isNeeded check in the command that inserts the new import.
for 3, to verify that the inserted module and the current module are different
2 is a bug in the ordering of the completion suggestions. For example the user could legitimally want to use ByteString from Data.ByteString.Lazy even if Data.ByteString is already imported. The bug is in suggesting the non-imported completion before the imported one.
The text was updated successfully, but these errors were encountered:
* Clean up previous entries in the exports map when updating it
* Add typeText for local completions of type/class declarations
helps with #2270
* add typeText for all local completions
* fix test
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
In 1.4.0 we introduced completions for all local identifiers in the project. These completions automatically insert missing imports. It turns out that we don't verify whether the imports are actually missing, leading to some problems:
All the above are painful, but 2 and 3 are specially annoying.
The solution for this would be:
ByteString
fromData.ByteString.Lazy
even ifData.ByteString
is already imported. The bug is in suggesting the non-imported completion before the imported one.The text was updated successfully, but these errors were encountered: