From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 62694@debbugs.gnu.org, "João Távora" <joaotavora@gmail.com>
Subject: bug#62694: 30.0.50; eglot-tests fails with recent pylsp
Date: Fri, 07 Apr 2023 14:04:53 +0200 [thread overview]
Message-ID: <871qkv6gpm.fsf@gmx.de> (raw)
In-Reply-To: <83wn2ondpe.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 07 Apr 2023 14:17:49 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
Hi,
> A version test doesn't have to mean literally testing the version. It
> can be a different test, specifically for the problematic behavior.
> If we understand the problematic behavior, we can test for it. (If we
> don't understand the problem, how do we know it is in the server and
> not in Eglot or elsewhere in Emacs?)
I have done the homework (not mine!) and compared passing and failing
eglot-tests. For that I have compared the failing tests from Emba, and
the passing tests on my laptop, running Fedora 37. I have compared test
case eglot-test-basic-completions.
The initialization handshake is identical, except the server info. On
Emba, the server reports
--8<---------------cut here---------------start------------->8---
[server-reply] (id:1) Fri Apr 7 01:05:39 2023:
(:jsonrpc "2.0" :id 1 :result
(:capabilities
(:codeActionProvider t :codeLensProvider
(:resolveProvider :json-false)
:completionProvider
(:resolveProvider t :triggerCharacters
["."])
:documentFormattingProvider t :documentHighlightProvider t :documentRangeFormattingProvider t :documentSymbolProvider t :definitionProvider t :executeCommandProvider
(:commands
[])
:hoverProvider t :referencesProvider t :renameProvider t :foldingRangeProvider t :signatureHelpProvider
(:triggerCharacters
["(" "," "="])
:textDocumentSync
(:change 2 :save
(:includeText t)
:openClose t)
:workspace
(:workspaceFolders
(:supported t :changeNotifications t))
:experimental nil)
:serverInfo
(:name "pylsp" :version "1.7.1")))
--8<---------------cut here---------------end--------------->8---
On my laptop, there is an older server version:
--8<---------------cut here---------------start------------->8---
[server-reply] (id:1) Fri Apr 7 13:30:45 2023:
(:jsonrpc "2.0" :id 1 :result
(:capabilities
(:codeActionProvider t :codeLensProvider
(:resolveProvider :json-false)
:completionProvider
(:resolveProvider t :triggerCharacters
["."])
:documentFormattingProvider t :documentHighlightProvider t :documentRangeFormattingProvider t :documentSymbolProvider t :definitionProvider t :executeCommandProvider
(:commands
[])
:hoverProvider t :referencesProvider t :renameProvider t :foldingRangeProvider t :signatureHelpProvider
(:triggerCharacters
["(" "," "="])
:textDocumentSync
(:change 2 :save
(:includeText t)
:openClose t)
:workspace
(:workspaceFolders
(:supported t :changeNotifications t))
:experimental nil)
:serverInfo
(:name "pylsp" :version "1.4.1")))
--8<---------------cut here---------------end--------------->8---
The interesting difference is the following dialogue. The client request
is identical on both machines (expcept the temporary file name):
--8<---------------cut here---------------start------------->8---
[client-request] (id:2) Fri Apr 7 13:30:45 2023:
(:jsonrpc "2.0" :id 2 :method "textDocument/completion" :params
(:textDocument
(:uri "file:///tmp/eglot--fixturepBX5M9/project/something.py")
:position
(:line 1 :character 7)
:context
(:triggerKind 1)))
--8<---------------cut here---------------end--------------->8---
The server reply on my laptop is
--8<---------------cut here---------------start------------->8---
[server-reply] (id:2) Fri Apr 7 13:30:46 2023:
(:jsonrpc "2.0" :id 2 :result
(:isIncomplete :json-false :items
[(:label "exit(status)" :kind 3 :sortText "aexit" :insertText "exit" :data
(:doc_uri "file:///tmp/eglot--fixturepBX5M9/project/something.py"))]))
[client-notification] Fri Apr 7 13:30:46 2023:
(:jsonrpc "2.0" :method "textDocument/didChange" :params
(:textDocument
(:uri "file:///tmp/eglot--fixturepBX5M9/project/something.py" :version 1)
:contentChanges
[(:range
(:start
(:line 1 :character 7)
:end
(:line 1 :character 7))
:rangeLength 0 :text "t")]))
--8<---------------cut here---------------end--------------->8---
But on Emba, we see only
--8<---------------cut here---------------start------------->8---
[server-reply] (id:2) Fri Apr 7 01:05:39 2023:
(:jsonrpc "2.0" :id 2 :result
(:isIncomplete :json-false :items
[]))
[server-notification] Fri Apr 7 01:05:40 2023:
(:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params
(:uri "file:///tmp/eglot--fixture5UoqLl/project/something.py" :diagnostics
[]))
--8<---------------cut here---------------end--------------->8---
So a different reply, with less information.
> Well, how about coding the test Michael asked, and I seconded, then?
> I agree that it will be a much better use of our time than keeping
> arguing about it.
I have absolutely no idea about the language server protocol, and
whether both server replies are valid communication. If both are valid,
eglot shall support this.
If not, I believe eglot shall raise an error like "protocol mismatch",
and eglot-tests could catch this error and use it as indication that the
test has to be skipped, with a respective skip message.
> TIA
Best regards, Michael.
next prev parent reply other threads:[~2023-04-07 12:04 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 9:55 bug#62694: 30.0.50; eglot-tests fails with recent pylsp Michael Albinus
2023-04-06 10:54 ` João Távora
2023-04-06 11:22 ` Michael Albinus
2023-04-06 12:49 ` João Távora
2023-04-06 14:58 ` Michael Albinus
2023-04-06 16:59 ` João Távora
2023-04-06 17:39 ` Michael Albinus
2023-04-06 19:50 ` João Távora
2023-04-07 7:44 ` Michael Albinus
2023-04-07 10:20 ` João Távora
2023-04-07 10:29 ` Michael Albinus
2023-04-07 10:47 ` João Távora
2023-04-07 10:50 ` Michael Albinus
2023-04-07 10:57 ` João Távora
2023-04-07 11:04 ` Gregory Heytings
2023-04-07 11:10 ` João Távora
2023-04-07 11:11 ` Eli Zaretskii
2023-04-07 11:20 ` João Távora
2023-04-07 12:20 ` Michael Albinus
2023-04-07 10:43 ` Eli Zaretskii
2023-04-07 10:51 ` João Távora
2023-04-07 10:53 ` Michael Albinus
2023-04-07 10:59 ` Eli Zaretskii
2023-04-07 11:06 ` João Távora
2023-04-07 11:17 ` Eli Zaretskii
2023-04-07 11:23 ` João Távora
2023-04-07 11:37 ` João Távora
2023-04-07 11:41 ` Michael Albinus
2023-04-07 11:47 ` João Távora
2023-04-07 11:53 ` João Távora
2023-04-07 12:07 ` Eli Zaretskii
2023-04-07 12:13 ` Michael Albinus
2023-04-07 12:22 ` Eli Zaretskii
2023-04-07 12:40 ` João Távora
2023-04-07 12:58 ` Gregory Heytings
2023-04-07 13:02 ` João Távora
2023-04-07 13:57 ` Eli Zaretskii
2023-04-07 12:59 ` Michael Albinus
2023-04-07 13:48 ` Eli Zaretskii
2023-04-07 13:57 ` Michael Albinus
2023-04-07 14:00 ` Eli Zaretskii
2023-04-07 14:04 ` João Távora
2023-04-07 14:33 ` Eli Zaretskii
2023-04-07 15:06 ` Michael Albinus
2023-04-07 19:05 ` João Távora
2023-04-09 13:49 ` Michael Albinus
2023-04-07 12:04 ` Michael Albinus [this message]
2023-04-07 12:24 ` João Távora
2023-04-07 12:47 ` Michael Albinus
2023-04-07 13:01 ` João Távora
2023-04-07 13:04 ` Michael Albinus
2023-04-09 11:24 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-09 11:22 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-09 12:41 ` João Távora
2023-04-09 13:21 ` Basil Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-09 14:45 ` João Távora
2023-04-09 15:32 ` Michael Albinus
2023-04-09 15:48 ` João Távora
2023-04-09 16:08 ` Michael Albinus
2023-04-09 18:17 ` João Távora
2023-04-09 19:04 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qkv6gpm.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=62694@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=joaotavora@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.