syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.71k stars 4.9k forks source link

Haskell hie lsp starting exited with status exit #13416

Closed CanftIn closed 3 years ago

CanftIn commented 4 years ago

Description :octocat:

Haskell hie lsp starting exited with status exit

hie server couldn't start normally. image

Error Message:

LSP :: Connected to [hie:11784 status:starting]. [2 times]
LSP :: hie has exited (exited abnormally with code 1)
Server hie:11784 status:starting exited with status exit. Do you want to restart it? (y or n) y
LSP :: Restarting LSP in buffer Main.hs
LSP :: Connected to [hie:19144 status:starting].
LSP :: hie has exited (exited abnormally with code 1)
Server hie:19144 status:starting exited with status exit. Do you want to restart it? (y or n) y
LSP :: Restarting LSP in buffer Main.hs
LSP :: Connected to [hie:7124 status:starting].
LSP :: hie has exited (exited abnormally with code 1)
Server hie:7124 status:starting exited with status exit. Do you want to restart it? (y or n) n

relative configuration:

   dotspacemacs-configuration-layers
   '(
      (haskell :variables haskell-completion-backend 'lsp haskell-enable-hindent t haskell-enable-hindent-style "johan-tibell")
      ...
    )
(defun dotspacemacs/user-config ()
   ...
  (defun haskell-indentation-advice ()
    (when (and (< 1 (line-number-at-pos))
               (save-excursion
                 (forward-line -1)
                 (string= "" (s-trim (buffer-substring (line-beginning-position) (line-end-position))))))
      (delete-region (line-beginning-position) (point))))

  (advice-add 'haskell-indentation-newline-and-indent
              :after 'haskell-indentation-advice)

  (setq lsp-haskell-process-args-hie '("exec" "ghcide" "--" "--lsp")
        lsp-haskell-process-path-hie "stack"
        lsp-haskell-process-wrapper-function (lambda (argv) (cons (car argv) (cddr argv)))
        )
  (add-hook 'haskell-mode-hook
            #'lsp)
  (setq lsp-haskell-process-args-hie (list "-d" "-l" (make-temp-file "hie." nil ".log")))
  ...
)

Already installed relative hie binary files:

hie.exe
hie-8.6.5.exe
hie-8.6.exe
hie-wrapper.exe

hie::stderr buffer message:

Invalid option `-d'

Did you mean one of these?
    -v
    -j
    ide
    ls

Usage: stack.exe [--help] [--version] [--numeric-version]
                 [--hpack-numeric-version] [--docker*] [--nix*]
                 ([--verbosity VERBOSITY] | [-v|--verbose] | [--silent])
                 [--[no-]time-in-log] [--stack-root STACK-ROOT]
                 [--work-dir WORK-DIR] [--[no-]system-ghc] [--[no-]install-ghc]
                 [--arch ARCH] [--ghc-variant VARIANT] [--ghc-build BUILD]
                 [-j|--jobs JOBS] [--extra-include-dirs DIR]
                 [--extra-lib-dirs DIR] [--with-gcc PATH-TO-GCC]
                 [--with-hpack HPACK] [--[no-]skip-ghc-check] [--[no-]skip-msys]
                 [--local-bin-path DIR] [--[no-]modify-code-page]
                 [--[no-]allow-different-user] [--[no-]dump-logs]
                 [--color|--colour WHEN] [--resolver RESOLVER]
                 [--compiler COMPILER] [--[no-]terminal]
                 [--stack-colors|--stack-colours STYLES] [--terminal-width INT]
                 [--stack-yaml STACK-YAML] [--lock-file ARG] COMMAND|FILE

Process hie stderr finished

stack resolver: lts-14.10 stack version: Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: LSP doesn't connect to hie server.

Expected behaviour: :heart: :smile: LSP connect to hie server.

System Info :computer:

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

lebensterben commented 3 years ago

hie is superseded by haskell-language-server. Please take a try.