haskell-ide-engine icon indicating copy to clipboard operation
haskell-ide-engine copied to clipboard

Can not load HIE exe component with stack

Open fendor opened this issue 4 years ago • 2 comments

Open Haskell IDE Engine app/MainHie.hs with the implicit stack cradle and an error should be produced, such as cannot satisfy -packge haskell-ide-engine-<some numbers>.

cc @Gurkenglas

fendor avatar Jan 26 '20 22:01 fendor

The steps to reproduce seems to be (from #1682): In a simple stack based project without explicit hie.yaml with a lib, an exe and a test component:

  • Delete .stack-work and $(stack path --snapshot-install-root)
  • Open in vscode Main.hs (main executable module of the exe component) ---> error
  • stack build
  • Reopen vscode in the Main.hs file --> works

Another workaround is use an explicit hie.yaml for stack following the README instructions.

jneira avatar Mar 06 '20 07:03 jneira

It seems that with the previous workaround the error could arise again so a more stable one would be use a explicit hie.yaml specific for stack, folowwing: https://github.com/haskell/haskell-ide-engine#project-configuration

jneira avatar Mar 08 '20 10:03 jneira