anoma / juvix

A language for intent-centric and declarative decentralised applications
https://docs.juvix.org
GNU General Public License v3.0
454 stars 53 forks source link

After adding support for cabal, HLS no longer works with VSCode #1683

Closed lukaszcz closed 1 year ago

lukaszcz commented 1 year ago

After merging #1667, cleaning and building from scratch, I get the error message in VSCode:

Failed to find the GHC version of this Cabal project. Error when calling cabal exec -v0 -- ghc --print-libdir

As a result, HLS doesn't work.

lukaszcz commented 1 year ago

Installing ghc 9.2.5 with ghcup solved the problem. But I'm not sure if this should be required, especially if we continue using ghc versions which are not yet in ghcup as we did often in the past.

paulcadman commented 1 year ago

After https://github.com/anoma/juvix/pull/1672 was merged you need to copy the relevant hie file to indicate your preference for HLS to use cabal vs stack. See https://github.com/anoma/juvix#lsp-support.

If you don't want to preinstall GHC then you must use stack, run cp stack.hie.yaml hie.yaml.

lukaszcz commented 1 year ago

Okay, I think Paul's answer closes the issue.