emacs-lsp / lsp-haskell

lsp-mode :heart: haskell
https://emacs-lsp.github.io/lsp-haskell
GNU General Public License v3.0
227 stars 56 forks source link

HLS exit with code 1 #132

Closed yaitskov closed 2 years ago

yaitskov commented 2 years ago

lsp-haskell cannot open src/Lib.hs in a simple project (generated with stack new hello-world).

stack new hello
cd hello
wget https://raw.githubusercontent.com/emacs-lsp/lsp-mode/master/scripts/lsp-start-plain.el
emacs -q -l $PWD/lsp-start-plain.el src/Lib.hs 

meanwhile atom editor is working with the same HLS

haskell-language-server version: 1.2.0.0 (GHC: 8.10.4) (PATH: /home/dan/.local/bin/haskell-language-server) (GIT hash: b032d50b8d0ecdbfa2e47b06d26c57498eab7995)
Tool versions found on the $PATH
cabal:      3.2.0.0
stack:      2.7.1
ghc:        8.10.4

*Compile-log*:


In toplevel form:
origami-parsers.el:33:1:Warning: Package cl is deprecated
origami-parsers.el:33:1:Warning: cl package required at runtime

In end of data:
origami-parsers.el:267:1:Warning: the following functions are not known to be
    defined: s-match, s-blank?, s-trim, origami-fold-children,
    origami-fold-shallow-merge, origami-fold-root-node, python-subparser

In toplevel form:
origami.el:98:1:Warning: Unused lexical argument `l'
origami.el:98:1:Warning: Unused lexical argument `e'
origami.el:98:1:Warning: Unused lexical argument `b'
origami.el:160:1:Warning: Unused lexical argument `ov'

In origami-setup-local-vars:
origami.el:438:26:Warning: assignment to free variable `origami-history'
origami.el:439:32:Warning: assignment to free variable `origami-tree-tick'

In origami-store-cached-tree:
origami.el:451:30:Warning: assignment to free variable `origami-tree-tick'
origami.el:452:43:Warning: reference to free variable `origami-history'
origami.el:452:59:Warning: assignment to free variable `origami-history'

In origami-update-history:
origami.el:459:38:Warning: reference to free variable `origami-history'
origami.el:459:38:Warning: assignment to free variable `origami-history'

In origami-get-fold-tree:
origami.el:497:9:Warning: reference to free variable `origami-mode'
origami.el:502:1:Warning: Unused lexical argument `buffer'

In toplevel form:
lsp-origami.el:36:1:Warning: Package cl is deprecated

In lsp-origami-mode:
lsp-origami.el:87:17:Warning: assignment to free variable `origami-fold-style'

In end of data:
clojure-mode.el:3017:1:Warning: the function `seq-every-p' is not known to be
    defined.

In font-lock-test:
typescript-mode-test-utilities.el:51:4:Warning: `font-lock-fontify-buffer' is
    for interactive use only; use `font-lock-ensure' or `font-lock-flush'
    instead.

In typescript--flyspell-mode-predicate:
typescript-mode.el:1886:8:Warning: `font-lock-fontify-buffer' is for
    interactive use only; use `font-lock-ensure' or `font-lock-flush' instead.

In typescript-mode:
typescript-mode.el:2969:39:Warning: `syntax-begin-function' is an obsolete
    variable (as of 25.1).

In end of data:
typescript-mode.el:2986:1:Warning: the function
    `flyspell-generic-progmode-verify' is not known to be defined.

*Messages*

LSP :: Connected to [lsp-haskell:6361/starting].
LSP :: lsp-haskell has exited (exited abnormally with code 1)
Server lsp-haskell:6361/starting exited with status exit(check corresponding stderr buffer for details). Do you want to restart it? (y or n) n

*lsp-log*:

Command "haskell-language-server-wrapper --lsp -d -l /tmp/hls.log" is present on the path.
Command "haskell-language-server-wrapper --lsp -d -l /tmp/hls.log" is present on the path.
Found the following clients for /home/dan/demo/haskell/stack/s/src/Lib.hs: (server-id lsp-haskell, priority 0)
The following clients were selected based on priority: (server-id lsp-haskell, priority 0)

*lsp-stderr*:

No 'hie.yaml' found. Try to discover the project type!
haskell-language-server-wrapper: /home/dan/.cabal: openFile: inappropriate type (is a directory)

Process lsp-haskell stderr finished

file /tmp/hls.log is not created.

GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.16.0)

Installed packages in /home/dan/.emacs.d/lsp-tmp-elpa7WUuWJ:

  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 ace-window-20200606.1259
  drwxr-xr-x  4 dan dan 4096 Sep  6 20:14 archives
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 async-20210823.528
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 avy-20201226.1734
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 bui-20210108.1141
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 cfrs-20210609.1805
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 clojure-mode-20210821.2010
  drwxr-xr-x  3 dan dan 4096 Sep  6 20:15 company-20210826.2148
  drwxr-xr-x  3 dan dan 4096 Sep  6 20:14 dap-mode-20210904.2033
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 dart-mode-20210830.0
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 dash-20210826.1149
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 epl-20180205.2049
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 f-20210624.1103
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 flycheck-20210825.1804
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 haskell-mode-20210816.716
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 helm-20210906.651
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 helm-core-20210906.557
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 helm-lsp-20210419.2014
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 ht-20210119.741
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 hydra-20201115.1055
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 lsp-dart-20210829.27
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 lsp-haskell-20210813.1040
  drwxr-xr-x  3 dan dan 4096 Sep  6 20:14 lsp-java-20210806.1842
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 lsp-mode-20210905.1124
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 lsp-origami-20210126.843
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 lsp-pyright-20210513.1022
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 lsp-python-ms-20210513.1019
  drwxr-xr-x  3 dan dan 4096 Sep  6 20:14 lsp-treemacs-20210904.2039
  drwxr-xr-x  3 dan dan 4096 Sep  6 20:14 lsp-ui-20210904.2037
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 lv-20200507.1518
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 markdown-mode-20210904.733
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 origami-20200331.1019
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 pfuture-20200425.1357
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 php-mode-20210808.1745
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 pkg-info-20150517.1143
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 popup-20210625.400
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 posframe-20210617.42
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 request-20210816.200
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 rust-mode-20210423.1157
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 s-20210616.619
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 scala-mode-20210414.1126
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 spinner-1.7.4
  -rw-r--r--  1 dan dan  154 Sep  6 20:14 spinner-1.7.4.signed
  drwxr-xr-x  3 dan dan 4096 Sep  6 20:14 treemacs-20210906.1653
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:15 typescript-mode-20210830.1858
  drwxr-xr-x  2 dan dan 4096 Sep  6 20:14 yasnippet-20200604.246
michaelpj commented 2 years ago

haskell-language-server-wrapper: /home/dan/.cabal: openFile: inappropriate type (is a directory)

This sounds like an HLS issue, I suggest you open an issue over there.