all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 30.0.50; 'New' error message when using eglot
@ 2023-02-23  7:36 Pedro Andres Aranda Gutierrez
  2023-02-23 21:30 ` João Távora
  0 siblings, 1 reply; 6+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2023-02-23  7:36 UTC (permalink / raw)
  To: bug-gnu-emacs, emacs-devel

Steps to reproduce:

Install pylsp 1.7.1

emacs -Q -l micro-eglot.el <any python file>

----------- micro-eglot.el -----------------------
(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)

(eval-when-compile
  (require 'use-package))
(require 'bind-key)

(setq use-package-always-ensure t)
(unless (file-directory-p package-user-dir)
    (package-refresh-contents))

(use-package jsonrpc
  :ensure nil)

(defun my/eglot-mode-hook ()
  (interactive)
  (message "Adding yasnippets to eglot for %s" major-mode))

(use-package eglot
  :ensure nil
  :defines eglot-server-programs
  :hook ((eglot-managed-mode . my/eglot-mode-hook)
         (python-mode . eglot-ensure))
  :config
  (message "Configuring eglot")
  (setq eglot-server-programs '(;;(python-mode  . ("jedi-language-server"))
                                (python-mode . ("pylsp")))))
----------------------------------------------

You should see:

error in process filter: Wrong type argument: plistp, [] [2 times]

Repeatedly, once the LSP is running

In GNU Emacs 30.0.50 (build 1, x86_64-apple-darwin17.7.0, NS
 appkit-1561.61 Version 10.13.6 (Build 17G14042)) of 2023-02-23 built on
 paag.local
Repository revision: fad3665069740e002fcb7f9313f9eeec81ad9a0c
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1561
System Description:  Mac OS X 10.13.6

Configured using:
 'configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
 LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include CC=clang
 OBJC=clang 'CFLAGS=-g -O3''

Configured features:
ACL GMP GNUTLS JPEG JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM ZLIB

Important settings:
  value of $LC_COLLATE: es_ES.UTF-8
  value of $LC_CTYPE: es_ES.UTF-8
  value of $LC_MESSAGES: es_ES.UTF-8
  value of $LC_MONETARY: es_ES.UTF-8
  value of $LC_NUMERIC: es_ES.UTF-8
  value of $LC_TIME: es_ES.UTF-8
  value of $LANG: es_ES.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Python

Minor modes in effect:
  eglot--managed-mode: t
  flymake-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils time-date eglot external-completion array
filenotify xref flymake-proc flymake thingatpt compile
text-property-search imenu python rx project treesit comint ansi-osc
ring ansi-color jsonrpc ert pp ewoc debug backtrace find-func pcase
warnings icons cl-extra help-mode use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode use-package-core package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 99707 11890)
 (symbols 48 11573 0)
 (strings 32 33723 2299)
 (string-bytes 1 1028835)
 (vectors 16 23053)
 (vector-slots 8 316794 15593)
 (floats 8 68 15)
 (intervals 56 559 0)
 (buffers 976 14))

-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should
run a leader-deposed hook here, but we can't yet



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 30.0.50; 'New' error message when using eglot
  2023-02-23  7:36 Pedro Andres Aranda Gutierrez
@ 2023-02-23 21:30 ` João Távora
  0 siblings, 0 replies; 6+ messages in thread
From: João Távora @ 2023-02-23 21:30 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: emacs-devel

I don't know what that config is doing (why are you requiring jsonrpc?)
but you seem to be using eglot-ensure in python-mode-hook (maybe,
no idea what use-package is doing).

So in the latest emacs-29, I can't reproduce with this one-liner.  Can you
try it?

emacs -Q --eval '(add-hook (quote python-mode-hook) (function
eglot-ensure))' ~/tmp/coiso.py

This starts up pylsp for me (the only python server I have) and seems to work
normally.  After you try that and presumably reproduce it, try with
M-x toggle-debug-on-error so we can get a backtrace.

João

On Thu, Feb 23, 2023 at 7:37 AM Pedro Andres Aranda Gutierrez
<paaguti@gmail.com> wrote:
>
> Steps to reproduce:
>
> Install pylsp 1.7.1
>
> emacs -Q -l micro-eglot.el <any python file>
>
> ----------- micro-eglot.el -----------------------
> (require 'package)
> (add-to-list 'package-archives
>              '("melpa" . "https://melpa.org/packages/") t)
>
> (eval-when-compile
>   (require 'use-package))
> (require 'bind-key)
>
> (setq use-package-always-ensure t)
> (unless (file-directory-p package-user-dir)
>     (package-refresh-contents))
>
> (use-package jsonrpc
>   :ensure nil)
>
> (defun my/eglot-mode-hook ()
>   (interactive)
>   (message "Adding yasnippets to eglot for %s" major-mode))
>
> (use-package eglot
>   :ensure nil
>   :defines eglot-server-programs
>   :hook ((eglot-managed-mode . my/eglot-mode-hook)
>          (python-mode . eglot-ensure))
>   :config
>   (message "Configuring eglot")
>   (setq eglot-server-programs '(;;(python-mode  . ("jedi-language-server"))
>                                 (python-mode . ("pylsp")))))
> ----------------------------------------------
>
> You should see:
>
> error in process filter: Wrong type argument: plistp, [] [2 times]
>
> Repeatedly, once the LSP is running
>
> In GNU Emacs 30.0.50 (build 1, x86_64-apple-darwin17.7.0, NS
>  appkit-1561.61 Version 10.13.6 (Build 17G14042)) of 2023-02-23 built on
>  paag.local
> Repository revision: fad3665069740e002fcb7f9313f9eeec81ad9a0c
> Repository branch: master
> Windowing system distributor 'Apple', version 10.3.1561
> System Description:  Mac OS X 10.13.6
>
> Configured using:
>  'configure PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
>  LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include CC=clang
>  OBJC=clang 'CFLAGS=-g -O3''
>
> Configured features:
> ACL GMP GNUTLS JPEG JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG
> SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP XIM ZLIB
>
> Important settings:
>   value of $LC_COLLATE: es_ES.UTF-8
>   value of $LC_CTYPE: es_ES.UTF-8
>   value of $LC_MESSAGES: es_ES.UTF-8
>   value of $LC_MONETARY: es_ES.UTF-8
>   value of $LC_NUMERIC: es_ES.UTF-8
>   value of $LC_TIME: es_ES.UTF-8
>   value of $LANG: es_ES.UTF-8
>   locale-coding-system: utf-8-unix
>
> Major mode: Python
>
> Minor modes in effect:
>   eglot--managed-mode: t
>   flymake-mode: t
>   override-global-mode: t
>   tooltip-mode: t
>   global-eldoc-mode: t
>   eldoc-mode: t
>   show-paren-mode: t
>   electric-indent-mode: t
>   mouse-wheel-mode: t
>   tool-bar-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort mail-extr emacsbug message yank-media puny dired
> dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
> gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
> gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
> mail-prsvr mail-utils time-date eglot external-completion array
> filenotify xref flymake-proc flymake thingatpt compile
> text-property-search imenu python rx project treesit comint ansi-osc
> ring ansi-color jsonrpc ert pp ewoc debug backtrace find-func pcase
> warnings icons cl-extra help-mode use-package use-package-ensure
> use-package-delight use-package-diminish use-package-bind-key bind-key
> easy-mmode use-package-core package browse-url url url-proxy url-privacy
> url-expand url-methods url-history url-cookie generate-lisp-file
> url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
> eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv
> bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip
> cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
> elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util
> term/common-win tool-bar dnd fontset image regexp-opt fringe
> tabulated-list replace newcomment text-mode lisp-mode prog-mode register
> page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
> scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
> frame minibuffer nadvice seq simple cl-generic indonesian philippine
> cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
> korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
> european ethiopic indian cyrillic chinese composite emoji-zwj charscript
> charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
> cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
> files window text-properties overlay sha1 md5 base64 format env
> code-pages mule custom widget keymap hashtable-print-readable backquote
> threads kqueue cocoa ns multi-tty make-network-process emacs)
>
> Memory information:
> ((conses 16 99707 11890)
>  (symbols 48 11573 0)
>  (strings 32 33723 2299)
>  (string-bytes 1 1028835)
>  (vectors 16 23053)
>  (vector-slots 8 316794 15593)
>  (floats 8 68 15)
>  (intervals 56 559 0)
>  (buffers 976 14))
>
> --
> Fragen sind nicht da um beantwortet zu werden,
> Fragen sind da um gestellt zu werden
> Georg Kreisler
>
> Headaches with a Juju log:
> unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should
> run a leader-deposed hook here, but we can't yet
>


-- 
João Távora



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 30.0.50; 'New' error message when using eglot
@ 2023-02-28 11:05 mprodrigues
  2023-02-28 12:42 ` João Távora
  0 siblings, 1 reply; 6+ messages in thread
From: mprodrigues @ 2023-02-28 11:05 UTC (permalink / raw)
  To: joaotavora; +Cc: emacs-devel

Hello,

I have the same problem.

> emacs -Q --eval '(add-hook (quote python-mode-hook) (function
> eglot-ensure))' ~/tmp/coiso.py

If I use this it works, so maybe the bug is coming from interactions 
with other packages?
I did M-x toggle-debug-on-error so we can get a backtrace, and this is 
what I got:

Debugger entered--Lisp error: (wrong-type-argument plistp [])
   plist-member([] :signatures)
   #f(compiled-function (jsonrpc-lambda-elem10) #<bytecode 
0xdcf9bf12d010fe5>)([])
   jsonrpc-connection-receive(#<eglot-lsp-server 
eglot-lsp-server-186e364> (:jsonrpc "2.0" :id 44 :result []))
   jsonrpc--process-filter(#<process EGLOT (mprodrigues/(python-mode 
python-ts-mode))> "Content-Length: 37\15\nContent-Type: 
application/vsco...")

Best regards,
Mateus Rodrigues



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 30.0.50; 'New' error message when using eglot
  2023-02-28 11:05 30.0.50; 'New' error message when using eglot mprodrigues
@ 2023-02-28 12:42 ` João Távora
  2023-02-28 13:58   ` mprodrigues
  0 siblings, 1 reply; 6+ messages in thread
From: João Távora @ 2023-02-28 12:42 UTC (permalink / raw)
  To: mprodrigues; +Cc: emacs-devel

mprodrigues@posteo.net writes:

> Hello,
>
> I have the same problem.
>
>> emacs -Q --eval '(add-hook (quote python-mode-hook) (function
>> eglot-ensure))' ~/tmp/coiso.py
>
> If I use this it works, so maybe the bug is coming from interactions
> with other packages?

It would surely seem so, as eglot.el doesn't have very many plist-member
calls, and none of them for the ':signatures' key.

So someone is going to go throught the trouble of making a reproducible
error recipe (or bisecting a configuration), otherwise I can't be of
much help.

> I did M-x toggle-debug-on-error so we can get a backtrace, and this is
> what I got:
>
> Debugger entered--Lisp error: (wrong-type-argument plistp [])
>   plist-member([] :signatures)
>   #f(compiled-function (jsonrpc-lambda-elem10) #<bytecode
>    0xdcf9bf12d010fe5>)([])
>   jsonrpc-connection-receive(#<eglot-lsp-server
>   eglot-lsp-server-186e364> (:jsonrpc "2.0" :id 44 :result []))
>   jsonrpc--process-filter(#<process EGLOT (mprodrigues/(python-mode
>   python-ts-mode))> "Content-Length: 37\15\nContent-Type:
>   application/vsco...")

It would also help to see what the the client request for :id 44 was in
the first place.  You could find that in the buffer brought to you by
M-x eglot-events-buffer

João



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 30.0.50; 'New' error message when using eglot
  2023-02-28 12:42 ` João Távora
@ 2023-02-28 13:58   ` mprodrigues
  2023-02-28 14:28     ` João Távora
  0 siblings, 1 reply; 6+ messages in thread
From: mprodrigues @ 2023-02-28 13:58 UTC (permalink / raw)
  To: João Távora; +Cc: emacs-devel

So in my case the culprit was doom-modeline, I guess that is because it 
was trying
to call eglot--spinner, but that doesn't exist anymore. Anyway, I was 
expecting this
to be a warning on their side, not outright mess with eglot functioning. 
This has
already been reported on their side and I guess the fix is in the next 
release.

Thanks.

Best regards,
Mateus Rodrigues

On 28.02.2023 13:42, João Távora wrote:
> mprodrigues@posteo.net writes:
> 
>> Hello,
>> 
>> I have the same problem.
>> 
>>> emacs -Q --eval '(add-hook (quote python-mode-hook) (function
>>> eglot-ensure))' ~/tmp/coiso.py
>> 
>> If I use this it works, so maybe the bug is coming from interactions
>> with other packages?
> 
> It would surely seem so, as eglot.el doesn't have very many 
> plist-member
> calls, and none of them for the ':signatures' key.
> 
> So someone is going to go throught the trouble of making a reproducible
> error recipe (or bisecting a configuration), otherwise I can't be of
> much help.
> 
>> I did M-x toggle-debug-on-error so we can get a backtrace, and this is
>> what I got:
>> 
>> Debugger entered--Lisp error: (wrong-type-argument plistp [])
>>   plist-member([] :signatures)
>>   #f(compiled-function (jsonrpc-lambda-elem10) #<bytecode
>>    0xdcf9bf12d010fe5>)([])
>>   jsonrpc-connection-receive(#<eglot-lsp-server
>>   eglot-lsp-server-186e364> (:jsonrpc "2.0" :id 44 :result []))
>>   jsonrpc--process-filter(#<process EGLOT (mprodrigues/(python-mode
>>   python-ts-mode))> "Content-Length: 37\15\nContent-Type:
>>   application/vsco...")
> 
> It would also help to see what the the client request for :id 44 was in
> the first place.  You could find that in the buffer brought to you by
> M-x eglot-events-buffer
> 
> João



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 30.0.50; 'New' error message when using eglot
  2023-02-28 13:58   ` mprodrigues
@ 2023-02-28 14:28     ` João Távora
  0 siblings, 0 replies; 6+ messages in thread
From: João Távora @ 2023-02-28 14:28 UTC (permalink / raw)
  To: mprodrigues; +Cc: emacs-devel

On Tue, Feb 28, 2023 at 1:58 PM <mprodrigues@posteo.net> wrote:
>
> So in my case the culprit was doom-modeline, I guess that is because it
> was trying
> to call eglot--spinner, but that doesn't exist anymore. Anyway, I was
> expecting this

OK.  See the double '--' in there? That's a notice to third party
developers that the symbol is internal, an implementation detail, that
shouldn't be relied upon from packages outside the origin of the
symbol.  Unfortunately, this warning often goes unheeded.

João



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-28 14:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28 11:05 30.0.50; 'New' error message when using eglot mprodrigues
2023-02-28 12:42 ` João Távora
2023-02-28 13:58   ` mprodrigues
2023-02-28 14:28     ` João Távora
  -- strict thread matches above, loose matches on Subject: below --
2023-02-23  7:36 Pedro Andres Aranda Gutierrez
2023-02-23 21:30 ` João Távora

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.