haskell / haskell/haskell-language-server
hie.yaml files in the parent directory are incorrectly used
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 11
Description
I've made a minimal repro here https://github.com/expipiplus1/hie-yaml-find
### Your environment
```
haskell-language-server-wrapper --version
haskell-language-server version: 1.8.0.0 (GHC: 9.0.2) (PATH: /nix/store/idqsj8zvg1kw4b3q2bcdxbqffckiwm4a-haskell-language-server-1.8.0.0/bin/haskell-language-server-wrapper)
```
neovim + coc
### Steps to reproduce
- clone https://github.com/expipiplus1/hie-yaml-find
- Navigate to `./foo`
- Run `haskell-language-server`
- Observe that it checks `foo` correctly with the `foo/hie.yaml` cradle
- Run vscode in `foo` and open `Foo.hs`
- Observe that it fails because it tries to read the invalid hie.yaml file in the root directory
This also happens in nvim+coc
### Expected behaviour
HLS should stop at the first hie.yaml file it finds, searching upwards from the root/current directory
### Actual behaviour
HLS seems to prefer `hie.yaml` files further up
### Debug information
Can be observed in the logs like
```
Root dir path: /home/e/projects/vulkan/examples
hie.yaml path: /home/e/projects/vulkan/hie.yaml
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.