Comments (10)
I do have the same issue.
I'm using:
- lsp-mode 20190113.1050
- lsp-haskell 20190602.825
- emacs 26.1
- hie 0.11.0.0
- NixOS 19.03
Here is the hie log:
2019-07-13 18:35:41.014912492 [ThreadId 4] - run entered for hie-wrapper(hie-wrapper) Version 0.11.0.0 x86_64 ghc-8.6.4
2019-07-13 18:35:41.015122289 [ThreadId 4] - Current directory:/home/patrick/vcs/bkp
2019-07-13 18:35:42.297005785 [ThreadId 4] - Cradle directory:/home/patrick/vcs/bkp
2019-07-13 18:35:42.297223256 [ThreadId 4] - Using stack GHC version
2019-07-13 18:35:43.526792138 [ThreadId 4] - Project GHC version:8.6.5
2019-07-13 18:35:43.526901252 [ThreadId 4] - hie exe candidates :["hie-8.6.5","hie-8.6","hie"]
2019-07-13 18:35:43.527206213 [ThreadId 4] - found hie exe at:/nix/store/vvbm3f10ysrqqjgba966s9j38hds45ni-haskell-ide-engine-combined/libexec/bin/hie
2019-07-13 18:35:43.527262112 [ThreadId 4] - args:["--lsp","-d","-l","/tmp/hie.log"]
2019-07-13 18:35:43.527311266 [ThreadId 4] - launching ....
And the *Messages* buffer:
LSP :: Connected to [hie:13296 status:starting].
LSP :: hie has exited (exited abnormally with code 1)
Server hie:13296 status:starting exited with status exit. Do you want to restart it? (y or n) n
Is there something I can do to debug this further?
from lsp-haskell.
@Krantz-XRF there should be an hie
and hie::stderr
buffer that may contain further information about your problem.
In my case hie was built with GHC 8.6.4 and I was working on an 8.6.5 project. Once I switched to the 8.6.5 build of hie it worked.
from lsp-haskell.
Unfortunately, the hie
and hie::stderr
buffer are both empty. I tested in a stack project using GHC 8.6.5, this time no prompt at all, only an LSP(Disconnected)
on the status bar. I guess that this error has something to do with the hie
executable, but strangely enough, VSCode managed to work pretty well.
I have hie-8.6.4.exe
, hie-8.6.5.exe
and hie-wrapper.exe
(from HIE-8.6.5) all in PATH
.
from lsp-haskell.
I had this issue, emacs wasn't using the correct path. I renamed hie-wrapper to hie-wrapper-int and replaced hie-wrapper with a script that contained this:
#!/bin/bash
export PATH=$PATH:/Users/bitmapper/.ghcup/bin:/Users/bitmapper/.local/bin
hie-wrapper-int $@
adjust as needed.
from lsp-haskell.
This fixed the same issue for me
(setenv "PATH" (concat (getenv "PATH") ":/home/dc/.local/bin"))
from lsp-haskell.
same deal I'm trying lsp-haskell
on spacemacs
my config:
(haskell :variables
haskell-enable-hindent-style "johan-tibell"
haskell-completion-backend 'lsp
haskell-enable-shm-support t
haskell-process-type 'stack-ghci)
....
(defun dotspacemacs/user-config ()
(add-to-list 'exec-path "/Users/cmdv/.local/bin/")
(setq lsp-haskell-process-path-hie "/Users/cmdv/.local/bin/hie-wrapper")
(require 'lsp-haskell)
(add-hook 'haskell-mode-hook #'lsp)
)
I have a mass amount of hie
in /Users/cmdv/.local/bin/
error:
LSP :: Connected to [hie:1670 status:starting]. [2 times]
LSP :: hie has exited (finished)
Server hie:1670 status:starting exited with status exit. Do you want to restart it? (y or n) y
I found that I can start the server directly in the terminal which is odd!!
from lsp-haskell.
I had the same issue, tried running the server outside of emacs (just hie.exe) & it worked fine. Note if you find the process crashes after hitting return, that's normal. I'm not sure why stdin is used, but that's to be expected. If you think it's not, try running hie-wrapper.exe with -d flag and it'll be more verbose on crash.
Getting to the main point, I found that for me, hie.exe crashed because the log file /tmp/hie.log
doesn't exist... and more importantly, can't exist because I'm on windows. The default value for lsp-haskell-process-args-hie
is ("-d" "-l" "/tmp/hie.log")
a hardcoded unix filename was the problem. We should probably keep it system agnostic if we can, but otherwise adding this to my config fixed it (setq lsp-haskell-process-args-hie (list "-d" "-l" (make-temp-file "hie." nil ".log")))
from lsp-haskell.
This error occurs not because it can't find hie, but because it can't find the correct version of Haskell. It was quite annoying to debug this.
from lsp-haskell.
I managed to fix my problem thanks to @mohkale's advice. I suggest the hard-coded temp file path should be warned in the README for Windows users.
For me, this issue is ready to be closed, but I noticed some other people here suffering from similar problems. (Though it seems that their problems happen on UNIX-like systems instead of Windows.) Should I keep this issue open for now?
from lsp-haskell.
I also had this problem, but was able to hack through it by creating a symlink from /usr/bin/hie-xxx, to /usr/bin/hie
Hope this helps anyone who needs it.
from lsp-haskell.
Related Issues (20)
- Symbol’s function definition is void: lsp-haskell-completion-in-comments HOT 1
- Installation issue HOT 3
- Document (?) how to change the `eldoc` signature HOT 10
- Headscratching class plugin experience HOT 9
- haskell-language-server-wrapper from emacs behaviors is different from command line HOT 3
- Hlint HOT 3
- (void-variable lsp-haskell-formatting-provider) HOT 2
- lsp haskell incredibly slow on latest emacs git HOT 12
- lsp-server exits with status 'exit' HOT 1
- Error in $.params.processId: parsing Int32 failed, expected Number, but encountered Object HOT 5
- README missing a step? HOT 3
- Symbol’s value as variable is void: haskell-debug-mode-map HOT 6
- Question: how can I get rid of "Processing" message from modeline HOT 3
- Timeout while waiting for response Method: textDocument/codeAction HOT 2
- Activate on haskell-cabal mode also HOT 1
- Try both `haskell-language-server-wrapper` and `haskell-language-server` by default
- Lisp error: (void-variable fourmolu) HOT 10
- [QUESTION] Line breaker after constraints for type lenses HOT 1
- Don't use the debug flag by default. HOT 3
- How to make lsp-haskell more loosely tied to haskell-mode? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp-haskell.