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

cabal-install is not installed. Check the README... #131

Closed
janat08 opened this issue Jan 20, 2019 · 11 comments · Fixed by haskell/haskell-ide-engine#1406
Closed

cabal-install is not installed. Check the README... #131

janat08 opened this issue Jan 20, 2019 · 11 comments · Fixed by haskell/haskell-ide-engine#1406

Comments

@janat08
Copy link
Contributor

janat08 commented Jan 20, 2019

cabal-install is not installed. Check the README for more information appears, what it's actually referring to I don't know.

@delreluca
Copy link

I get the same, here is the output after startup in addition.

macOS 10.14.2 x64

VSCode
Version 1.30.2 (1.30.2)
Extension
Name: Haskell Language Server
Id: alanz.vscode-hie-server
Description: Language Server Protocol for Haskell via HIE
Version: 0.0.24
Publisher: Alan Zimmerman
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=alanz.vscode-hie-server
HIE
make hie-8.6.3
make build-doc-8.6.3
(Revision is in log below)

2019-01-31 09:01:01.949021 [ThreadId 4] - Using stack GHC version
2019-01-31 09:01:02.32697 [ThreadId 4] - Run entered for HIE(hie) Version 0.5.0.0, Git revision c4a9e7cfce86194493834839271c2aa390483048 (2382 commits) x86_64 ghc-8.6.3
2019-01-31 09:01:02.329237 [ThreadId 4] - Current directory:...
2019-01-31 09:Using hie version: Version 0.5.0.0, Git revision c4a9e7cfce86194493834839271c2aa390483048 (2382 commits) x86_64 ghc-8.6.3
01:02.382134 [ThreadId 10] - Using stack GHC version
[Warn  - 9:01:02 AM] cabal-install is not installed. Check the README for more information
Using hoogle db at: ...

@delreluca
Copy link

delreluca commented Feb 2, 2019

It's from HIE, not from the extension, the source is here: https://github.com/haskell/haskell-ide-engine/blob/e1aeb180ab8065bd6a8413e050c6277191d0d33f/src/Haskell/Ide/Engine/Transport/LspStdio.hs#L443

The warning basically says that there is no executable with the name cabal in the path. So either add Stacks's bin folder to the PATH environment variable (which sucks for macOS since changing the path for packaged .apps like VSCode needs a reboot and change in launchd configuration) or create a link to it in a location that is already in the path.

Maybe this could be improved in the future? In the extension I am able to provide a custom path to hie, would be nice to be able to provide one for cabal to. Of course with the current implementation of HIE it is not possible.

@alanz
Copy link
Collaborator

alanz commented Mar 2, 2019

The install instructions on https://github.com/haskell/haskell-ide-engine suggesting using either the Makefile or (preferred now) Shake install process, which does install cabal-install, as it is needed by cabal-helper

@jchia
Copy link

jchia commented Oct 7, 2019

Has this issue been resolved? I still see the warning. I installed HIE using shake with stack ./install.hs stack-hie-8.2.2 stack-hie-8.6.5 but I don't see cabal-anything in ~/.local/bin.

@jneira
Copy link
Member

jneira commented Oct 8, 2019

@jchia the hie build script don't install cabal by default anymore, cause it should not be needed if you are using stack. If you want to use hie with projects that uses exclusively cabal (they dont have a stack.yaml file in root) you should install cabal:

  • running stack install.hs cabal will install the appropiate version for hie

Maybe we should add to stack install help this option (currently is missing)

@jneira
Copy link
Member

jneira commented Oct 8, 2019

I've added a visible new target to build script: stack install.hs stack-install-cabal to cover the use case: haskell/haskell-ide-engine#1405

@jchia
Copy link

jchia commented Oct 8, 2019

@jneira I was getting the warning on stack projects. The warning went away after I did stack install.hs cabal, which added ~/.local/bin/cabal. However, after I delete it and run stack install.hs cabal, nothing happens and I did not get back the ~/.local/bin/cabal. Is that the expected behavior?

@jneira
Copy link
Member

jneira commented Oct 8, 2019

I was getting the warning on stack projects

Yeah the warning should not be displayed if the project is stack based.

Is that the expected behavior?

No, i've just reproduced the error, it seems stack finds the cabal it just installed inside $STACK_ROOT, i will change the mentioned pr to take in account that behaviour and install it every time (if it is not in the original $PATH).
Thanks for testing!

@jneira
Copy link
Member

jneira commented Oct 9, 2019

Finally make the install script ignore the cached cabal executable is trickier than i expected so the fix will be in another separate pr

@jneira
Copy link
Member

jneira commented Oct 17, 2019

I've updated the README to make clear cabal is optional and the way to install it with stack: haskell/haskell-ide-engine#1414

@jneira
Copy link
Member

jneira commented Jan 9, 2020

hie not longer requires cabal by default and no warning message is show

@jneira jneira closed this as completed Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants