Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lukaszcz opened this issue Jan 2, 2023 · 3 comments
Closed

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

lukaszcz opened this issue Jan 2, 2023 · 3 comments

Comments

@lukaszcz
Copy link
Collaborator

lukaszcz commented Jan 2, 2023

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
Copy link
Collaborator Author

lukaszcz commented Jan 2, 2023

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.

@lukaszcz lukaszcz changed the title After supporting cabal VSCode HLS no longer works out of the box After adding support for cabal, HLS no longer works with VSCode Jan 2, 2023
@paulcadman
Copy link
Collaborator

paulcadman commented Jan 5, 2023

After #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
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants