Open mgajda opened 6 years ago
I am getting the same error! @mgajda Were you able to get intero to work with Neovim? I am very new to Haskell and its toolchain, so I am not sure how to prevent intero from "being taken from ~/.local/bin/intero". The way your post is worded makes me think that there is a way to get it to work. Thanks!
I have the similar issues.
If I simply stack build intero
and thus don't have intero
on my PATH, I am stuck with the following error:
Note: No local targets specified, so a plain ghci will be started with no package hiding or package options.
You are using snapshot: lts-13.27
If you want to use package hiding and options, then you can try one of the following:
* If you want to start a different project configuration
than /Users/xxx/.stack/global-project/stack.yaml, then you can use stack init to create a new stack.yaml for the
packages in the current directory.
* If you want to use the project configuration
at /Users/xxx/.stack/global-project/stack.yaml, then you can add to its 'packages' field.
Configuring GHCi with the following packages:
Executable named intero not found on path: ["/Users/xxx/.stack/global-project/.stack-work/install/x86_64-osx/c86de29a567b768096
170638cc1215cdb26d83e7d03090cd41c6b73f1f843c35/8.6.5/bin","/Users/xxx/.stack/snapshots/x86_64-osx/c86de29a567b768096170638cc121
5cdb26d83e7d03090cd41c6b73f1f843c35/8.6.5/bin","/Users/xxx/.stack/compiler-tools/x86_64-osx/ghc-8.6.5/bin","/Users/xxx/.stack
/programs/x86_64-osx/ghc-8.6.5/bin","/Users/xxx/.local/bin","/Users/xxx/go/bin","/usr/local/sbin","/Users/xxx/.local/bin","
/Users/xxx/go/bin","/usr/local/sbin","/Users/xxx/.cargo/bin","/usr/local/bin","/usr/bin","/bin","/usr/sbin","/sbin","/Library
/TeX/texbin","/usr/local/MacGPG2/bin","/Users/xxx/go/bin","/usr/local/sbin","/Users/xxx/.cargo/bin"]
[Process exited 1]
If I stack install intero
which puts it in my PATH, I get
Intero is installed in your PATH, which may cause problems when using different resolvers.
This usually happens if you run `stack install intero` instead of `stack build intero`.
Aborting.
Intero is still compiling
Press ENTER or type command to continue
the first time I try to open it. Any subsequent :InteroOpen
commands during the same vim session garner a simple Intero is still compiling
compiling and nothing more.
So, should intero
be installed via stack? If so, should it or should it not be on the PATH?
@jmcclell I have the same issue and was looking for clues here. I don't have a solution but I am pretty sure you are not supposed to install intero or have it existing anywhere on your normal path. What I remember is that when you run this plugin for the first time in a project, it will compile intero specifically for the project.
In the error it can't find intero on the path, but the first items on the path listed in the error are inside the .stack-work
folder of your project. So, this issue comes from perhaps intero not compiling properly or the executable not getting placed in .stack-work properly.
Personally, I wasn't going to dig into it too much more. I want to try using this plugin using plain ghci as the backend instead of intero, and failing that probably move to a plain ghci/ghcid workflow (which the author of this plugin and others recommend for simplicity).
If you guys are on macOS, the Haskell compiler config is busted, resulting in an incorrect install. Using stack version 1.9 fixed the problem for me, and this plugin started working out of the box.
More details here: https://github.com/commercialhaskell/stack/issues/4926 @jmcclell @johnmendonca
Ah! Thank you @ain2108! I'm still pretty new to the whole ecosystem so when things break I'm a bit left out to dry. Really appreciate the tip.
I'm not running macOS but I get the same thing as @jmcclell in https://github.com/parsonsmatt/intero-neovim/issues/156#issuecomment-513516419
I tried removing ~/.stack
and .stack-work
but none of them helped.
This time I managed to first run stack
and find the issue.
But it is not always this simple without error message.
So I removed everything Stack-related, removed .local/bin/intero
and opened my Haskell file.
and my Intero
buffer
Using main module: 1. Package `haskell' component haskell:exe:haskell-exe with main-is file: /home/quintasan/sauce/haskell/app/Main.hs
The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
Configuring GHCi with the following packages: haskell
Executable named intero not found on path: ["/home/quintasan/sauce/haskell/.stack-work/install/x86_64-linux/c07acc1c86584cf66f3eb21aa3c3c3b37bc6d71f19197fd5187b9b38307375
d6/8.6.5/bin","/home/quintasan/.stack/snapshots/x86_64-linux/c07acc1c86584cf66f3eb21aa3c3c3b37bc6d71f19197fd5187b9b38307375d6/8.6.5/bin","/home/quintasan/.stack/compiler-
tools/x86_64-linux/ghc-8.6.5/bin","/home/quintasan/.stack/programs/x86_64-linux/ghc-8.6.5/bin","/home/quintasan/.rbenv/shims","/home/quintasan/.asdf/shims","/home/quintas
an/.asdf/shims","/home/quintasan/.asdf/bin","/home/quintasan/.fzf/bin","/home/quintasan/.rbenv/bin","/home/quintasan/.local/bin","/home/quintasan/bin","/usr/local/sbin","
/usr/local/bin","/usr/sbin","/usr/bin","/sbin","/bin","/usr/games","/usr/local/games"]
[Process exited 1]
I have no clue why this doesn't work. It looks for Intero in my .stack-work
where it doesn't exist and then looks in ~/.stack/snapshots
where it exists but under a different path
╭─quintasan@tyria ~/.stack ‹2.6.3›
╰─$ find . -type f | grep intero
./snapshots/x86_64-linux/5dc1e27c649062bc6151c505f41e139b34aa3b665d3e934a0880187f85230cac/8.6.5/bin/intero
@Quintasan Looks like you do not have intero
on your path. Need to install it?
(Message about incompatible options is a warning, and can be safely ignored.)
@mgajda See what I have written about, it's installed but to a different directory (I did not install it manually, I just opened up my Haskell file in vim) and neovim is looking in a different directory. I do not modify my PATH.
Experienced the same thing.
What worked on my end: stack build intero --copy-compiler-tool from the stack project root.
stack build intero
leads to "intero not found on path" errors (as noted above).
stack install intero
leads to "intero is installed in your PATH, which may cause problems..." errors (also noted above).
It seems that the --copy-compiler-tool
flag allows intero-neovim to stack exec -- intero
while having intero
live off the PATH.
Intero fails to start due to being taken from
~/.local/bin/intero
or due to having multiple executables in the package, but it gives no error message. Any attempt to use intero command gives message 'Intero is still compilingor worse
Intero is still starting`. Can we have user variable that keeps intero compilation/startup log, and shows when 'still compiling' happens?Current commit is
02289201c9b8316169fe5d54cf9c95fe6e563e7e
. NeoVim version is: