From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#62694: 30.0.50; eglot-tests fails with recent pylsp Date: Fri, 07 Apr 2023 14:04:53 +0200 Message-ID: <871qkv6gpm.fsf@gmx.de> References: <87sfddibcn.fsf@gmx.de> <87o7o1tfvc.fsf@gmx.de> <87ile9t5uj.fsf@gmx.de> <87ttxssyef.fsf@gmx.de> <87o7o0rvax.fsf@gmx.de> <835ya8otvh.fsf@gnu.org> <83355cot57.fsf@gnu.org> <83wn2ondpe.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32113"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62694@debbugs.gnu.org, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 07 14:06:18 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pkkrC-00087N-PG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 Apr 2023 14:06:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pkkr2-00020s-P4; Fri, 07 Apr 2023 08:06:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pkkqx-0001uM-TI for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2023 08:06:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkkqw-0007XK-F9 for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2023 08:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pkkqv-00053O-PK for bug-gnu-emacs@gnu.org; Fri, 07 Apr 2023 08:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Apr 2023 12:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62694 X-GNU-PR-Package: emacs Original-Received: via spool by 62694-submit@debbugs.gnu.org id=B62694.168086910319327 (code B ref 62694); Fri, 07 Apr 2023 12:06:01 +0000 Original-Received: (at 62694) by debbugs.gnu.org; 7 Apr 2023 12:05:03 +0000 Original-Received: from localhost ([127.0.0.1]:55878 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkkpy-00051e-Kc for submit@debbugs.gnu.org; Fri, 07 Apr 2023 08:05:03 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:39039) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pkkpw-000518-Il for 62694@debbugs.gnu.org; Fri, 07 Apr 2023 08:05:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1680869094; i=michael.albinus@gmx.de; bh=1m7LRQ9uu+pBLbYVCdVtFNdvWfuRyIJ2EupCOF6apRA=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=V3zyCLocfhXvvoXzDm/VIMk3HPEPlyBkKb8BfbbVQySLrIJwfgMRnxsavNKqzpJqb +JvehXuXG2HDDsEL5BvhKba1pFOLB5AIXHZ9Xq+y20njEV+9uoX63NQGihMnUKW/Xl sh6wTwK3iRoEhLYbhBnXXfU6+oKoZmnKF4+z51viyJ8ef0VPqpBkpEm6O4+HxDDrZ4 UD5XKKntwPgKEB5eFrMNvtURxn+zIAEhUwvv994xcdmKRM9rLI9Q6dxS/rMv62+NKT r58bi5OPVETwugX7MPLr8c2+Tc5tECJmS78rgcVUa90AiQ91CcookAx10yuuJ0AhvY r+HBfl86Wnfeg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.0]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M1ps8-1pmxlF3Lz6-002DJp; Fri, 07 Apr 2023 14:04:53 +0200 In-Reply-To: <83wn2ondpe.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 07 Apr 2023 14:17:49 +0300") X-Provags-ID: V03:K1:0g7AkFUnKCGgNp2G+voB/4s1A86vBeZAkfghb1uMOl2mdd0GnbD SXX7RkoANlTJKfkuf8Ivube7diQS86U5No2+PUAkE0NDJOoL4pKjMDyKXXO6BMqFDYV2Z8R zQOhQVyb0uleJy0pZuGT+HaPe7Gi464ahORijh1EBdEdVVgUbs4U6ruJ9qd2+Xk+U1m9wAG dwjAOqtfKDFc+JA8HRLBg== UI-OutboundReport: notjunk:1;M01:P0:PXwN56Qo0DA=;Y/cNW32xgWgF47HPXk0Zv3ZPZ51 eKJlFCjoDgRMXkvGEFzM4RcLM0uQf8FbHdnuo9akygYqluOLtnbi2cLmeEG0VBvIFfdj1G5nu iNppWMYD6F23zrToCxJHnSF+icAgS7nfTW1Rez50v7NKVL9VtMIHxy9yy+VuMJloZNBue/31j SnL0NyH14WZysrLKq6pFb2sX0OcdR0uaMxSV6NIk7WvRlV59Esjs+GAt9gpoS4sy14O/aIRX6 rt/1GxPU0kUaef/Zi/CUWygGBHf9jmUp5PuvVnJ0AQPTuHCy9TjOOGIwoWGw0OmFjfKXKLvCj +Zy9DH123BhVF7IcArxKx0L2fZwXJrIegprV8wwwtRhzlptut8jQLBKaRw73I6SE4ww5fuou1 Fdj86np6vr7PjjUGj1QytlMoSm3FSqliO8w1p0YRI/+dKOOh71Cd4nf5/7JwXxtmBozHox2gd MvvvJWKB6hbNCZAeX6ZpegMqzWK0G7JThIyStqKnRllbG3cRABtAqRJA2GqZhxBkGHjOaI9eJ ct5xkb0vg9SUOu0Q97NeY65FetHzFsi26qNooBFvYaVSZ+1Xyj1rsxO19dppcZWy3a8ok8u5l k2xLpiAPkVC4G/1JsGXtwxH/DtfeC1IvuW4d2jkAX/TLvNVkHDGSdb0e+NuNqkpSNOMawsxOs Fxf/+gl4I+BRpjT2Ks5ZS1U15E7SK0EGykaGHvkxVmLMbb7tqD2gKOJ+uYBjry92dJ4nMOvZ7 V1HrjExGsIko3ICp4ffeWD4lHuK+kBKcQ+ojhMFGa1J18v3d2JYEfmcFBvVyfIR2SlRbV/Vd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259402 Archived-At: Eli Zaretskii 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.