From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Johann =?UTF-8?Q?H=C3=B6chtl?= Newsgroups: gmane.emacs.bugs Subject: bug#59883: Eglot gopls failed to connect Date: Sun, 10 Sep 2023 21:29:42 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f3b0150605063b50" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34085"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , 59883@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 10 21:31:17 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 1qfQ9M-0008i6-VH for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Sep 2023 21:31:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfQ97-0007la-Sb; Sun, 10 Sep 2023 15:31:01 -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 1qfQ95-0007l3-6c for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2023 15:30:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfQ94-0001Pz-RT for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2023 15:30:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfQ98-00073g-Dj for bug-gnu-emacs@gnu.org; Sun, 10 Sep 2023 15:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Johann =?UTF-8?Q?H=C3=B6chtl?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Sep 2023 19:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 59883-submit@debbugs.gnu.org id=B59883.169437420918795 (code B ref 59883); Sun, 10 Sep 2023 19:31:02 +0000 Original-Received: (at 59883) by debbugs.gnu.org; 10 Sep 2023 19:30:09 +0000 Original-Received: from localhost ([127.0.0.1]:51364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfQ8H-0004rE-1M for submit@debbugs.gnu.org; Sun, 10 Sep 2023 15:30:09 -0400 Original-Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:51468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfQ8C-0004Q5-0P for 59883@debbugs.gnu.org; Sun, 10 Sep 2023 15:30:07 -0400 Original-Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-50079d148aeso6288819e87.3 for <59883@debbugs.gnu.org>; Sun, 10 Sep 2023 12:30:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694374194; x=1694978994; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Cvy/54pRQIb24/Wzsq8+eNTRd06kK6XDR0RXtex5roQ=; b=Pvzycmg/GMkHHpe/M3BduzJcpKabe0CUJ2JYWViYIMOhgGiVOUtR2gYGHQA6CqXaSP 7QjO9t4tNw2qR3q0VpbKrbvfMAjoZsAvXQ+iKksQqa/4RI8bXb7ixXNEOVw3ug9mEW8h uFbMdls53hL7wLXlybMVAXfKohxC3pNBJYlJLAR6B1vmv2PuGGax5gMnnmhtcaXcj6JQ Im57GzE7DR8EbEVWLOin3MBAnMf9n478GMKgNfgP/LodkRLHPXWyWcMxyilDXBDz/tUN 1UD5TQdDODInSX3TD4NQT1CpSHc+EtK3rWCWVXb6xIJrqIwPQInJexro1RrkDLg2TZt/ 8r3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694374194; x=1694978994; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Cvy/54pRQIb24/Wzsq8+eNTRd06kK6XDR0RXtex5roQ=; b=KMdjcuK9sWz/T4q3IGSO6OocUYGnubBsdSarcvtUsk7UgvYPesEWhsSGn0SImyfnFD j7KpjvhCeJWngf+H85Z5Z3/oJ+3cdLkj/mjZ1WJlQxPzA6w7I20LzxbmatxM9WdBrcLq 6jK8Xxv2pZCVLUapBNv89KZ7+rgkXMdf/cTu+VjOo/mfofIXyKje+LAgf0goiospgkjh ww/abuMz+boVgc2bGGfOdpob/TEz3IOpOThVJW/lcDdwqt99lJH0iHCWdV6ZvusFCPCu fAki1U5YyUDat7wmr0OB7Rd159mcv7ETouLrup084PDkEq6oDD+bhqwglzUWj3mtGG8M EK/A== X-Gm-Message-State: AOJu0YxZTWQKu9QfVqsDc0VM9HgQN5TtUgALOCnIUSNqcSRg9s8KyOVp 07yiINo19e594/NMEXA9L356ltqRps1mfRiBXA== X-Google-Smtp-Source: AGHT+IHLwM4Vtrlz/JIoFH+WMT1AwTr39sV0WOINp3Ih3Vi9ZOlQnmi0DUBCyzFftm58e1PtTyONGSuvDFQ+8GfjYEQ= X-Received: by 2002:a05:651c:b94:b0:2bc:e856:6208 with SMTP id bg20-20020a05651c0b9400b002bce8566208mr5936981ljb.33.1694374194031; Sun, 10 Sep 2023 12:29:54 -0700 (PDT) In-Reply-To: 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:270002 Archived-At: --000000000000f3b0150605063b50 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Stefan Kangas schrieb am So., 10. Sep. 2023, 21:21= : > Johann H=C3=B6chtl writes: > > > Sorry, this bug has to be re-opened. I was confident that the described > "work-around" is > > stable, yet it's not. Eglot was working consistently yesterday just to > find it non-working today > > with the same errors. > > Are you still seeing this? > No, for me it was fixed with an update to jsonrpc which was then included into emacs 29.1. > > > Am So., 11. Dez. 2022 um 14:24 Uhr schrieb Johann H=C3=B6chtl < > johann.hoechtl@gmail.com>: > > > > I found a solution. Quick: For some reason when opening a go file usin= g > go-mode, > > Emacs/eglot generates a "textDocument/didOpen" server message. Now the > correct > > reaction of a LS upon such a message in a chase where the file actuall= y > did not change > > remains disputable: > > > > https://github.com/golang/go/issues/50267 > > https://github.com/neovim/neovim/issues/16623 > > > > However, the gopls-team considered a "chatty" behavior of the language > server to be > > better anyhow. To always send diagnostics is now the default, yet not > released as of > > gopls 1.10.1 > > > > > https://github.com/golang/tools/commit/ec743893cd01c9423aaae4513b092c4c4c= 06f0f4 > > > > https://groups.google.com/g/golang-checkins/c/tt8Ig_UsKtE > > > > To use the yet unreleased feature from gopls@HEAD which works, follow > > > > > https://github.com/golang/tools/blob/master/gopls/doc/advanced.md#unstabl= e-versions > > > > > > This bug report may be closed, reported for reference. > > > > Am So., 11. Dez. 2022 um 13:45 Uhr schrieb Johann H=C3=B6chtl > > : > > > > I dug deeper into the problem: > > > > * When I open a very small golang-project, eglot interconnects > correctly with gopls > > * When I open a larger golang-project, eglot fails to communicate with > gopls. In fact, it > > fails to direct gopls to load the project as gopls stays at a very > small memory > > footprint. > > > > When I uninstall go-mode OR find-file-literally *.go and later enable > eglot, gopls is > > correctly "directed" to load the project, because memory consumption i= s > much > > higher. In this case it also reports back to eglot "loading packages" > and "finished > > loading packages". > > > > Sidenote: However I cannot interact any further with the LS as eglot > doens't consider > > any buffer as managed: > > > > cl-no-applicable-method: No applicable method: eglot--managed-buffers, > nil > > eldoc error: (jsonrpc-error No current JSON-RPC connection > (jsonrpc-error-code . > > 32603) (jsonrpc-error-message . No current JSON-RPC connection)) > > mouse-minibuffer-check: Minibuffer window is not active > > > > but I guess this is because the buffer has no mode eglot considers to > be supported. > > > > Sidenote2: If I enable go-mode for this buffer (thus triggering > eglot-ensure in .emacs) , > > a second gopls process is spawned yet without communication between > eglot and > > gopls. > --000000000000f3b0150605063b50 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Stefan Kangas <stefankangas@gmail.com> s= chrieb am So., 10. Sep. 2023, 21:21:
johann.hoechtl@gmail.com> = writes:

> Sorry, this bug has to be re-opened. I was confident that the describe= d "work-around" is
> stable, yet it's not. Eglot was working consistently yesterday jus= t to find it non-working today
> with the same errors.

Are you still seeing this?
No, for me it was fixed with an update to jsonrpc= which was then included into emacs 29.1.=C2=A0

> Am So., 11. Dez. 2022 um 14:24 Uhr schrieb Johann H=C3=B6chtl <johann.hoechtl@gmail.com>:
>
>=C2=A0 I found a solution. Quick: For some reason when opening a go fil= e using go-mode,
>=C2=A0 Emacs/eglot generates a "textDocument/didOpen" server = message. Now the correct
>=C2=A0 reaction of a LS upon such a message in a chase where the file a= ctually did not change
>=C2=A0 remains disputable:
>
>=C2=A0 https://github.com/golang/= go/issues/50267
>=C2=A0 https://github.com/neo= vim/neovim/issues/16623
>
>=C2=A0 However, the gopls-team considered a "chatty" behavior= of the language server to be
>=C2=A0 better anyhow. To always send diagnostics is now the default, ye= t not released as of
>=C2=A0 gopls 1.10.1
>
>=C2=A0 https://github.com/golang/tools/commit/ec743893cd01c9423aaae451= 3b092c4c4c06f0f4
>
>=C2=A0 https://gr= oups.google.com/g/golang-checkins/c/tt8Ig_UsKtE
>
>=C2=A0 To use the yet unreleased feature from gopls@HEAD which works, f= ollow
>
>=C2=A0 https://github.com/golang/tools/blob/master/gopls/doc/advan= ced.md#unstable-versions
>
>
>=C2=A0 This bug report may be closed, reported for reference.
>
>=C2=A0 Am So., 11. Dez. 2022 um 13:45 Uhr schrieb Johann H=C3=B6chtl >=C2=A0 <johann.hoechtl@gmail.com>:
>
>=C2=A0 I dug deeper into the problem:
>
>=C2=A0 * When I open a very small golang-project, eglot interconnects c= orrectly with gopls
>=C2=A0 * When I open a larger golang-project, eglot fails to communicat= e with gopls. In fact, it
>=C2=A0 fails to direct gopls to load the project as gopls stays at a ve= ry small memory
>=C2=A0 footprint.
>
>=C2=A0 When I uninstall go-mode OR find-file-literally *.go and later e= nable eglot, gopls=C2=A0 is
>=C2=A0 correctly "directed" to load the project, because memo= ry consumption is much
>=C2=A0 higher. In this case it also reports back to eglot "loading= packages" and "finished
>=C2=A0 loading packages".
>
>=C2=A0 Sidenote: However I cannot interact any further with the LS as e= glot doens't consider
>=C2=A0 any buffer as managed:
>
>=C2=A0 cl-no-applicable-method: No applicable method: eglot--managed-bu= ffers, nil
>=C2=A0 eldoc error: (jsonrpc-error No current JSON-RPC connection (json= rpc-error-code .
>=C2=A0 32603) (jsonrpc-error-message . No current JSON-RPC connection))=
>=C2=A0 mouse-minibuffer-check: Minibuffer window is not active
>
>=C2=A0 but I guess this is because the buffer has no mode eglot conside= rs to be supported.
>
>=C2=A0 Sidenote2: If I enable go-mode for this buffer (thus triggering = eglot-ensure in .emacs) ,
>=C2=A0 a second gopls process is spawned yet without communication betw= een eglot and
>=C2=A0 gopls.
--000000000000f3b0150605063b50--