haskell / haskell/haskell-language-server

Import/export errors block import/export re-scanning

Open
#2,897 6 comments 3 reactions 0 assignees View on GitHub
component: ghcide component: hie-bios type: bug
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
2d 19h
Merged PRs (30d)
11

Description

### Your environment

Which OS do you use:
Ubuntu 20.04
Which LSP client (editor/plugin) do you use:
VS Code+Haskell+enabled autosave there
Describe your project (alternative: link to the project):
[link](https://github.com/br4ch1st0chr0n3/import-test/tree/master/src)

### Steps to reproduce
1. Clone the project's repo and switch to the second commit ([link](https://github.com/br4ch1st0chr0n3/import-test/commit/81178cec65fb87ef68d29d882cbff9b391d6bd3c)). In module `A`, module `B` will be highlighted red.
![image](https://user-images.githubusercontent.com/48378098/167290996-11625658-6b1e-47bf-8a0f-39a5e88f8919.png)
1. Create `B.hs` as in the third commit ([link](https://github.com/br4ch1st0chr0n3/import-test/commit/8fab92b777675bcc24350b05f58c5ae59ac5bb6c)). Though B does export `b`, in module `A`, module `B` will still be highlighted red.
![image](https://user-images.githubusercontent.com/48378098/167291111-aed58991-da76-4921-ae5c-762f1ef06e3e.png)
And there will be an error
![image](https://user-images.githubusercontent.com/48378098/167291130-32ca8614-ae0c-4f69-82e1-c691561d4eb8.png)

### Expected behaviour
When a module exports a function, the errors for modules which expected such function should be re-checked.

### Actual behaviour
Instead, if there happens an error, HLS blocks further export/import checks, and there is no way to make checks start again without restarting the HLS

### Include debug information

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.