Reputation: 135
When I open some haskell project in VS Code I get this message:
Couldn't figure out what GHC version the project is using: /home/andrej/.config/Code - OSS/User/globalStorage/haskell.haskell/haskell-language-server-wrapper-1.2.0-linux --project-ghc-version exited with exit code 1: No 'hie.yaml' found. Try to discover the project type! Failed get project GHC version, since we have a none cradle
How to solve it?
Edit:
Here is tree structure of the project:
.
├── .exercism
│ └── metadata.json
├── package.yaml
├── README.md
├── src
│ └── ResistorColors.hs
├── stack.yaml
└── test
└── Tests.hs
Upvotes: 12
Views: 12218
Reputation: 297
None of them working, until I delete /Users/sweirich/.ghc/x86_64-darwin-8.10.4/environments/default
Once you delete the default, and reopen the vs code. VS Haskell extension will reset the setting, and the error seems to go away.
Found the answer at https://issueexplorer.com/issue/haskell/haskell-language-server/2224
Upvotes: 5
Reputation: 2515
Since your project has stack project config files, The Haskell extension should be able to figure out what it needs and a hie.yaml
file to configure the extension is typically not needed for simple projects like this.
haskell-language-server
, the project upon which the VS Code Haskell exension is based, is still under active development and often gets a bit stuck. The folllowing can help sort a lot of common issues:
stack clean
stack build
Happy Haskelling!
Upvotes: 6