Description
Subject of the issue
It seems that precompiled binary (at least for GHC 8.6.5) doesn't accept stackYaml
configuration item supported by hie-bios >= 0.7, as described in the hie-bios repo.
Your environment
-
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
haskell-language-server version: 0.4.0.0 (GHC: 8.6.5) (PATH: ~/Library/Application Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-0.4.0-darwin-8.6.5) (GIT hash: 0a18edde24923251a148cbbc0ae993a6aac83b9c) Tool versions found on the $PATH cabal: 3.2.0.0 stack: 2.3.3 ghc: 8.6.5
-
Which lsp-client do you use: VSCode
-
Describe your project (alternative: link to the project)
- Include
stack.yaml
andstack-prof.yaml
- Include
-
Contents of
hie.yaml
:cradle: stack: stackYaml: stack-prof.yaml components: - path: "src" component: "hie-fail-test:lib" - path: "app/Main.hs" component: "hie-fail-test:exe:hie-fail-test-exe" - path: "test" component: "hie-fail-test:test:hie-fail-test-test"
Steps to reproduce
-
stack new hie-fail-test
-
Create a copy
stacl-prof.yaml
which has an identical contents asstack.yaml
-
Create a
hie.yaml
with the above contents -
Open, e.g.
src/Lib.hs
in VSCode -
VSCode complains that:
Couldn't figure out what GHC version the project is using: ~/Library/Application Support/Code/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-0.4.0-darwin --project-ghc-version exited with exit code 1: Found "/path/to/hie-fail-test/hie.yaml" for "/path/to/hie-fail-test/a" haskell-language-server-wrapper-0.4.0-darwin: AesonException "Error in $.cradle: Not a valid Configuration type, following keys are allowed: component"
-
or just invoking
haskell-language-server-wrapper-0.4.0-darwin
, downloaded automatically from GitHub by VSCode, onsrc/Lib.hs
halts with the following error:Found "/Users/hiromi/Documents/Programming/Haskell/git/hie-fail-test/hie.yaml" for "/path/to/hie-fail-test/a" haskell-language-server-wrapper-0.4.0-darwin: AesonException "Error in $.cradle: Not a valid Configuration type, following keys are allowed: component"
Expected behaviour
hls
should work properly using the flags/settings in stack-prof.yaml
.
Actual behaviour
Doesn't accept stackYaml
option at a..
Include debug information
Execute in the root of your project the command haskell-language-server --debug .
and paste the logs here:
Debug output:
Found "/path/to/hie-fail-test/hie.yaml" for "/path/to/hie-fail-test/a"
haskell-language-server-wrapper-0.4.0-darwin: AesonException "Error in $.cradle: Not a valid Configuration type, following keys are allowed: component"
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
NO LOGS