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

Strange error after eglot start server #199

Closed
Crandel opened this issue Jan 6, 2019 · 14 comments
Closed

Strange error after eglot start server #199

Crandel opened this issue Jan 6, 2019 · 14 comments

Comments

@Crandel
Copy link

Crandel commented Jan 6, 2019

Hi,
I`m using GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05 on Arch Linux. I want to use eglot together with Python pyls. After I open python buffer I got strange message

[eglot] Connected! Server `EGLOT (test/python-mode)' now managing `python-mode' buffers in project
; this is the error message
error in process filter: Wrong number of arguments: (5 . 5), 6

Flymake mode disabled, because I use Flycheck

This is my settings, related to eglot

(add-hook 'eglot--managed-mode-hook (lambda () 
    (flymake-mode -1)))
(add-hook 'python-mode-hook '(lambda()
    (eglot-ensure)
    (setq-default flymake-diagnostic-functions nil)))

When I try to type anything emacs freezing and this error appears again and again

@joaotavora
Copy link
Owner

Can you rerun after M-x toggle-debug-on-error? Also, how are you installing eglot exactly?

@Crandel
Copy link
Author

Crandel commented Jan 6, 2019

Hi @joaotavora ,
Thank you for quick answer
I create a receipt for el-get to install eglot (jsonrpc package I installed using package-install command)

I turn on toggle-debug-on-error and get this debug message

Debugger entered--Lisp error: (wrong-number-of-arguments (5 . 5) 6)
  eglot--make-diag(#<buffer urls.py> 2 6 eglot-error "mypy: No library stub file for module 'django.urls'" ((eglot-lsp-diag :source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "No library stub file for module 'django.urls'" :severity 1)))
  #f(compiled-function () #<bytecode 0x19bb73d>)()
  eglot--call-with-interface((Diagnostic (:range :message) (:severity :code :source :relatedInformation)) (:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "No library stub file for module 'django.urls'" :severity 1) #f(compiled-function () #<bytecode 0x19bb73d>))
  #f(compiled-function (arg1 arg2 &rest rest) "Handle notification publishDiagnostics" #<bytecode 0x1934519>)(#<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics :uri "file:///home/crandel/projects/python/bank/apps/accounts/urls.py" :diagnostics [(:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "No library stub file for module 'django.urls'" :severity 1) (:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "(Stub files are from https://github.com/python/typeshed)" :severity 2) (:source "mypy" :range (:start (:line 2 :character 1) :end (:line 2 :character 5)) :message "No library stub file for module 'django.conf'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "Cannot find module named 'accounts'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports" :severity 2) (:source "pycodestyle" :range (:start (:line 11 :character 8) :end (:line 11 :character 68)) :message "E128 12" :code "E128" :severity 2)])
  apply(#f(compiled-function (arg1 arg2 &rest rest) "Handle notification publishDiagnostics" #<bytecode 0x1934519>) #<eglot-lsp-server eglot-lsp-server> (textDocument/publishDiagnostics :uri "file:///home/crandel/projects/python/bank/apps/accounts/urls.py" :diagnostics [(:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "No library stub file for module 'django.urls'" :severity 1) (:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "(Stub files are from https://github.com/python/typeshed)" :severity 2) (:source "mypy" :range (:start (:line 2 :character 1) :end (:line 2 :character 5)) :message "No library stub file for module 'django.conf'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "Cannot find module named 'accounts'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports" :severity 2) (:source "pycodestyle" :range (:start (:line 11 :character 8) :end (:line 11 :character 68)) :message "E128 12" :code "E128" :severity 2)]))
  #f(compiled-function (arg &rest args) #<bytecode 0x19ad2f9>)(#<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics :uri "file:///home/crandel/projects/python/bank/apps/accounts/urls.py" :diagnostics [(:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "No library stub file for module 'django.urls'" :severity 1) (:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "(Stub files are from https://github.com/python/typeshed)" :severity 2) (:source "mypy" :range (:start (:line 2 :character 1) :end (:line 2 :character 5)) :message "No library stub file for module 'django.conf'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "Cannot find module named 'accounts'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports" :severity 2) (:source "pycodestyle" :range (:start (:line 11 :character 8) :end (:line 11 :character 68)) :message "E128 12" :code "E128" :severity 2)])
  apply(#f(compiled-function (arg &rest args) #<bytecode 0x19ad2f9>) #<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics (:uri "file:///home/crandel/projects/python/bank/apps/accounts/urls.py" :diagnostics [(:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "No library stub file for module 'django.urls'" :severity 1) (:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "(Stub files are from https://github.com/python/typeshed)" :severity 2) (:source "mypy" :range (:start (:line 2 :character 1) :end (:line 2 :character 5)) :message "No library stub file for module 'django.conf'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "Cannot find module named 'accounts'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports" :severity 2) (:source "pycodestyle" :range (:start (:line 11 :character 8) :end (:line 11 :character 68)) :message "E128 12" :code "E128" :severity 2)]))
  eglot-handle-notification(#<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics :uri "file:///home/crandel/projects/python/bank/apps/accounts/urls.py" :diagnostics [(:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "No library stub file for module 'django.urls'" :severity 1) (:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "(Stub files are from https://github.com/python/typeshed)" :severity 2) (:source "mypy" :range (:start (:line 2 :character 1) :end (:line 2 :character 5)) :message "No library stub file for module 'django.conf'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "Cannot find module named 'accounts'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports" :severity 2) (:source "pycodestyle" :range (:start (:line 11 :character 8) :end (:line 11 :character 68)) :message "E128 12" :code "E128" :severity 2)])
  apply(eglot-handle-notification #<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics (:uri "file:///home/crandel/projects/python/bank/apps/accounts/urls.py" :diagnostics [(:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "No library stub file for module 'django.urls'" :severity 1) (:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "(Stub files are from https://github.com/python/typeshed)" :severity 2) (:source "mypy" :range (:start (:line 2 :character 1) :end (:line 2 :character 5)) :message "No library stub file for module 'django.conf'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "Cannot find module named 'accounts'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports" :severity 2) (:source "pycodestyle" :range (:start (:line 11 :character 8) :end (:line 11 :character 68)) :message "E128 12" :code "E128" :severity 2)]))
  #f(compiled-function (server method params) #<bytecode 0x199e49d>)(#<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics (:uri "file:///home/crandel/projects/python/bank/apps/accounts/urls.py" :diagnostics [(:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "No library stub file for module 'django.urls'" :severity 1) (:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "(Stub files are from https://github.com/python/typeshed)" :severity 2) (:source "mypy" :range (:start (:line 2 :character 1) :end (:line 2 :character 5)) :message "No library stub file for module 'django.conf'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "Cannot find module named 'accounts'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports" :severity 2) (:source "pycodestyle" :range (:start (:line 11 :character 8) :end (:line 11 :character 68)) :message "E128 12" :code "E128" :severity 2)]))
  jsonrpc-connection-receive(#<eglot-lsp-server eglot-lsp-server> (:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params (:uri "file:///home/crandel/projects/python/bank/apps/accounts/urls.py" :diagnostics [(:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "No library stub file for module 'django.urls'" :severity 1) (:source "mypy" :range (:start (:line 0 :character 1) :end (:line 0 :character 5)) :message "(Stub files are from https://github.com/python/typeshed)" :severity 2) (:source "mypy" :range (:start (:line 2 :character 1) :end (:line 2 :character 5)) :message "No library stub file for module 'django.conf'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "Cannot find module named 'accounts'" :severity 1) (:source "mypy" :range (:start (:line 3 :character 1) :end (:line 3 :character 5)) :message "See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports" :severity 2) (:source "pycodestyle" :range (:start (:line 11 :character 8) :end (:line 11 :character 68)) :message "E128 12" :code "E128" :severity 2)])))
  jsonrpc--process-filter(#<process EGLOT (bank/python-mode)> "Content-Length: 1265\015\nContent-Type: application/vscode-jsonrpc; charset=utf8\015\n\015\n{\"jsonrpc\": \"2.0\", \"method\": \"textDocument/publishDiagnostics\", \"params\": {\"uri\": \"file:///home/crandel/projects/python/bank/apps/accounts/urls.py\", \"diagnostics\": [{\"source\": \"mypy\", \"range\": {\"start\": {\"line\": 0, \"character\": 1}, \"end\": {\"line\": 0, \"character\": 5}}, \"message\": \"No library stub file for module 'django.urls'\", \"severity\": 1}, {\"source\": \"mypy\", \"range\": {\"start\": {\"line\": 0, \"character\": 1}, \"end\": {\"line\": 0, \"character\": 5}}, \"message\": \"(Stub files are from https://github.com/python/typeshed)\", \"severity\": 2}, {\"source\": \"mypy\", \"range\": {\"start\": {\"line\": 2, \"character\": 1}, \"end\": {\"line\": 2, \"character\": 5}}, \"message\": \"No library stub file for module 'django.conf'\", \"severity\": 1}, {\"source\": \"mypy\", \"range\": {\"start\": {\"line\": 3, \"character\": 1}, \"end\": {\"line\": 3, \"character\": 5}}, \"message\": \"Cannot find module named 'accounts'\", \"severity\": 1}, {\"source\": \"mypy\", \"range\": {\"start\": {\"line\": 3, \"character\": 1}, \"end\": {\"line\": 3, \"character\": 5}}, \"message\": \"See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports\", \"severity\": 2}, {\"source\": \"pycodestyle\", \"range\": {\"start\": {\"line\": 11, \"character\": 8}, \"end\": {\"line\": 11, \"character\": 68}}, \"message\": \"E128 12\", \"code\": \"E128\", \"severity\": 2}]}}")

@joaotavora
Copy link
Owner

@Crandel, currently, even if you don't use Flymake, you must install the latest version from GNU ELPA (not MELPA). The easiest way to do this is to also install Eglot from GNU ELPA (or also MELPA).

So your el-get recipe must probably be updated, or just install Eglot from GNU ELPA using package.el, or finally, use the latest Emacs master.

@Crandel
Copy link
Author

Crandel commented Jan 6, 2019

Thanks, I update flymake from ELPA and it disappear.

@tomjaguarpaw
Copy link

Could eglot perhaps check the version of flymake and report this as the error rather than something mysterious about "wrong number of arguments"?

@joaotavora
Copy link
Owner

Could eglot perhaps check the version of flymake and report this as the error rather than something mysterious about "wrong number of arguments"?

No. Programs in emacs lisp don't usually check each other versions in real time. And suggesting solutions without a clear understanding of the problem is getting quite ahead of ourselves.

@tomjaguarpaw did you really run into this very problem or another one? How? This problem has been solved for almost a year. How did you install Eglot? If you did it in Emacs 25, it must have been through some strange installation mechanism, and it won't work Flymake or no Flymake.

@tomjaguarpaw
Copy link

I installed it by hand in Emacs 25. If you're wondering about my rationale for this, see #191 (comment)

@blackgnezdo
Copy link

I'm running

GNU Emacs 26.3 (build 1, x86_64-unknown-openbsd, GTK+ Version 3.24.12) of 2019-10-12

I have these in list-packages:

  eglot              1.5           installed             Client for Language Server Protocol (LSP) servers
  haskell-mode       16.1          installed             A Haskell editing mode
  use-package        2.4           installed             A configuration macro for simplifying your 
  flymake            1.0.8         dependency            A universal on-the-fly syntax checker

I got eglot by following the recipe from ghcide page. I don't really know that I'm using the version of flymake from GNU ELPA, but the numbers match up.

Still, I'm hitting this error:

Debugger entered--Lisp error: (wrong-number-of-arguments (5 . 5) 6)
  eglot--make-diag(#<buffer Cabal.hs> 6032 6035 eglot-error "typecheck: /home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\n    • Couldn't match type ‘Char’ with ‘[Char]’\n      Expected type: String\n        Actual type: Char\n    • In the expression: ' '\n      In an equation for ‘printB’: printB op InclusiveBound = ' '" ((eglot-lsp-diag :severity 1 :range (:start (:line 160 :character 27) :end (:line 160 :character 30)) :source "typecheck" :message "/home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\n    • Couldn't match type ‘Char’ with ‘[Char]’\n      Expected type: String\n        Actual type: Char\n    • In the expression: ' '\n      In an equation for ‘printB’: printB op InclusiveBound = ' '")))
  #f(compiled-function () #<bytecode 0xa9319389>)()
  eglot--call-with-interface((Diagnostic (:range :message) (:severity :code :source :relatedInformation)) (:severity 1 :range (:start (:line 160 :character 27) :end (:line 160 :character 30)) :source "typecheck" :message "/home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\n    • Couldn't match type ‘Char’ with ‘[Char]’\n      Expected type: String\n        Actual type: Char\n    • In the expression: ' '\n      In an equation for ‘printB’: printB op InclusiveBound = ' '") #f(compiled-function () #<bytecode 0xa9319389>))
  #f(compiled-function (arg1 arg2 &rest rest) "Handle notification publishDiagnostics" #<bytecode 0xaf6c7731>)(#<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics :uri "file:///home/greg/s/rhpwk/Cabal/Cabal.hs" :diagnostics [(:severity 1 :range (:start (:line 160 :character 27) :end (:line 160 :character 30)) :source "typecheck" :message "/home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\n    • Couldn't match type ‘Char’ with ‘[Char]’\n      Expected type: String\n        Actual type: Char\n    • In the expression: ' '\n      In an equation for ‘printB’: printB op InclusiveBound = ' '")])
  apply(#f(compiled-function (arg1 arg2 &rest rest) "Handle notification publishDiagnostics" #<bytecode 0xaf6c7731>) #<eglot-lsp-server eglot-lsp-server> (textDocument/publishDiagnostics :uri "file:///home/greg/s/rhpwk/Cabal/Cabal.hs" :diagnostics [(:severity 1 :range (:start (:line 160 :character 27) :end (:line 160 :character 30)) :source "typecheck" :message "/home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\n    • Couldn't match type ‘Char’ with ‘[Char]’\n      Expected type: String\n        Actual type: Char\n    • In the expression: ' '\n      In an equation for ‘printB’: printB op InclusiveBound = ' '")]))
  #f(compiled-function (arg &rest args) #<bytecode 0xb9310795>)(#<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics :uri "file:///home/greg/s/rhpwk/Cabal/Cabal.hs" :diagnostics [(:severity 1 :range (:start (:line 160 :character 27) :end (:line 160 :character 30)) :source "typecheck" :message "/home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\n    • Couldn't match type ‘Char’ with ‘[Char]’\n      Expected type: String\n        Actual type: Char\n    • In the expression: ' '\n      In an equation for ‘printB’: printB op InclusiveBound = ' '")])
  apply(#f(compiled-function (arg &rest args) #<bytecode 0xb9310795>) #<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics (:uri "file:///home/greg/s/rhpwk/Cabal/Cabal.hs" :diagnostics [(:severity 1 :range (:start (:line 160 :character 27) :end (:line 160 :character 30)) :source "typecheck" :message "/home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\n    • Couldn't match type ‘Char’ with ‘[Char]’\n      Expected type: String\n        Actual type: Char\n    • In the expression: ' '\n      In an equation for ‘printB’: printB op InclusiveBound = ' '")]))
  eglot-handle-notification(#<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics :uri "file:///home/greg/s/rhpwk/Cabal/Cabal.hs" :diagnostics [(:severity 1 :range (:start (:line 160 :character 27) :end (:line 160 :character 30)) :source "typecheck" :message "/home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\n    • Couldn't match type ‘Char’ with ‘[Char]’\n      Expected type: String\n        Actual type: Char\n    • In the expression: ' '\n      In an equation for ‘printB’: printB op InclusiveBound = ' '")])
  apply(eglot-handle-notification #<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics (:uri "file:///home/greg/s/rhpwk/Cabal/Cabal.hs" :diagnostics [(:severity 1 :range (:start (:line 160 :character 27) :end (:line 160 :character 30)) :source "typecheck" :message "/home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\n    • Couldn't match type ‘Char’ with ‘[Char]’\n      Expected type: String\n        Actual type: Char\n    • In the expression: ' '\n      In an equation for ‘printB’: printB op InclusiveBound = ' '")]))
  #f(compiled-function (server method params) #<bytecode 0x9aa43791>)(#<eglot-lsp-server eglot-lsp-server> textDocument/publishDiagnostics (:uri "file:///home/greg/s/rhpwk/Cabal/Cabal.hs" :diagnostics [(:severity 1 :range (:start (:line 160 :character 27) :end (:line 160 :character 30)) :source "typecheck" :message "/home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\n    • Couldn't match type ‘Char’ with ‘[Char]’\n      Expected type: String\n        Actual type: Char\n    • In the expression: ' '\n      In an equation for ‘printB’: printB op InclusiveBound = ' '")]))
  jsonrpc-connection-receive(#<eglot-lsp-server eglot-lsp-server> (:jsonrpc "2.0" :params (:uri "file:///home/greg/s/rhpwk/Cabal/Cabal.hs" :diagnostics [(:severity 1 :range (:start (:line 160 :character 27) :end (:line 160 :character 30)) :source "typecheck" :message "/home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\n    • Couldn't match type ‘Char’ with ‘[Char]’\n      Expected type: String\n        Actual type: Char\n    • In the expression: ' '\n      In an equation for ‘printB’: printB op InclusiveBound = ' '")]) :method "textDocument/publishDiagnostics"))
  jsonrpc--process-filter(#<process EGLOT (rhpwk/haskell-mode)> "Content-Length: 530\015\n\015\n{\"jsonrpc\":\"2.0\",\"params\":{\"uri\":\"file:///home/greg/s/rhpwk/Cabal/Cabal.hs\",\"diagnostics\":[{\"severity\":1,\"range\":{\"start\":{\"line\":160,\"character\":27},\"end\":{\"line\":160,\"character\":30}},\"source\":\"typecheck\",\"message\":\"/home/greg/s/rhpwk/Cabal/Cabal.hs:161:28: error:\\n    • Couldn't match type ‘Char’ with ‘[Char]’\\n      Expected type: String\\n        Actual type: Char\\n    • In the expression: ' '\\n      In an equation for ‘printB’: printB op InclusiveBound = ' '\"}]},\"method\":\"textDocument/publishDiagnostics\"}")

@tomjaguarpaw
Copy link

@blackgnezdo: For ghcide I had much more success using lsp than eglot. See https://www.reddit.com/r/haskell/comments/dwkehu/thoughts_on_hie/f7nj2e1/

@joaotavora
Copy link
Owner

@blackgnezdo as you suspect, you're possibly still running an old version of Flymake somewhere. Can you C-h f RET flymake-make-diagnostic RET follow the resulting link, and tell me where that lands you?

@tomjaguarpaw your comment has no relevance to this particular issue. I've already registered your aggravation from your difficulties in discovering the versions of Emacs supported by Eglot.

@Crandel
Copy link
Author

Crandel commented Nov 28, 2019

@blackgnezdo You using an old build-in version of Flymake. You need to install it explicitly and manually from elpa or melpa

@blackgnezdo
Copy link

Yes, you are right. I did have the old version of flymake that came with Emacs active.

My mistake was to install eglot (which did pull in the right version of flymake) and then not restart Emacs. The old version of flymake was already loaded so the new one didn't have any effect until I used the old solution: unplug it and plug back in.

I verified with flymake-make-diagnostic that it took me to the old version before and the new one after restart. Thanks @joaotavora and @Crandel.

@tomjaguarpaw
Copy link

Dear @joaotavora, I'm sorry my aggravation leaked enough to annoy you. I cannot deny that it has been a very frustrating experience trying to get an LSP setup working on Emacs (despite having used an -- admittedly simple -- Emacs setup for a couple of decades).

You may be aware that a Haskell LSP server called ghcide has recently been published and its README explicitly suggests eglot. The configuration sample suggested for eglot is much simpler than the one suggested for lsp-ui so I suspect you will get the bigger half of the new ghcide Emacs users. If it's really that easy to use eglot with ghcide then that's great! Unfortunately, like me, some users will struggle. Their struggle may indeed be their fault for not reading the docs, like it was my fault, but users do what users do and struggle they will.

As an open source software maintainer myself I know there's never enough time or energy to make the UX of our software as good as it could be. My observations are intended to be constructive, and I hope ultimately they make some tiny contribution to the software ecosystem we rely on. I have sent a PR to ghcide to make it clear that no one should try eglot with Emacs 25 (which unfortunately includes all users on Ubuntu 18.04 LTS). Hopefully this will reduce frustration in the future.

@joaotavora
Copy link
Owner

Dear @joaotavora, I'm sorry my aggravation leaked enough to annoy you. I cannot deny that

Oh, don't worry, It's not particularly annoying, it's just irrelevant, as is the rest of your intervention. In this issue's context, at least, open a new issue is you'd like to discuss such broader matters. Thanks in advance.

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

No branches or pull requests

4 participants