Skip to content

hie.yaml files in the parent directory are incorrectly used #3220

@expipiplus1

Description

@expipiplus1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs infoNot actionable, because there's missing informationtype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions