-
Notifications
You must be signed in to change notification settings - Fork 211
HIE unable to find ghc binary for stack project #1504
Comments
This is also the case for me. Are users expected to have |
@drewboardman in your LSP client, invoke hie through |
I tried this, and at least with emacs/lsp-haskell, this did not work. I
also modified the lsp-haskell elisp to be absolutely certain that the right
stack exec command was executed, and I got nothing but errors.
…On Sat, Dec 28, 2019, 20:04 Luke Lau ***@***.***> wrote:
@drewboardman <https://github.com/drewboardman> in your LSP client,
invoke hie through stack exec hie and add a hie.yaml to project to
explicitly state that you want to use stack to build your project. There
should be a section in the README with an example of the hie.yaml
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1504?email_source=notifications&email_token=AALRLUPZYJLISRQNBGSBFVLQ3AAUFA5CNFSM4KARYFH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYWABI#issuecomment-569466885>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALRLULFCD7R5AIXSU6GSALQ3AAUFANCNFSM4KARYFHQ>
.
|
@wraithm What errors did you get? |
Fixed by #1496, please try again |
@fendor do we pull and re-install HIE? Can you give a small explanation of how to check if it is fixed or not? Should I remove my |
Using the following gets HIE working in most projects
However, when I add the recommended
I get the following error
Additionally, some projects still get the following error (described in this issue I opened): |
@drewboardman Did you add this And yeah, you should pull from master and pull again. You can prove that it works if you have no ghc on the path, e.g. ghc --version Results in an error, and opening the project works. |
@fendor Yep, pulling and using stack's ghc worked. I do have a question about the |
Thank you for that feedback, if it is not clear, we must clarify that! First, you can select how to build your project, either with stack or cabal. |
Interesting. So in the example with |
I am not sure what you mean. In cradle:
stack:
component: "foo:lib" Means that in the current directory, every haskell file is part of the library of the project cradle:
stack:
- path: src/
component: "foo:lib"
- path: test/
component: "foo:test:unit-tests" This is helpful, because tests and library can have different dependencies. |
I'm on macOS, and I am using haskell-ide-engine with lsp-mode/lsp-haskell in Emacs. I do not have a global ghc binary installed on my machine. I let stack install it locally in the project for each project. HIE is unable to find a ghc binary in the workspace. I had to put the ghc binary into the PATH to get it to work.
The text was updated successfully, but these errors were encountered: