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: Date: Sun, 11 Dec 2022 14:24:00 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000005e653d05ef8d4db2" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2143"; mail-complaints-to="usenet@ciao.gmane.io" To: 59883@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 11 14:25:08 2022 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 1p4MKJ-0000OJ-F9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Dec 2022 14:25:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4MKF-0008P9-FY; Sun, 11 Dec 2022 08:25:03 -0500 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 1p4MKE-0008Oz-Mh for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 08:25:02 -0500 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 1p4MKE-00005I-ER for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 08:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4MKE-0004Pd-8U for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 08:25:02 -0500 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, 11 Dec 2022 13:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59883 X-GNU-PR-Package: emacs Original-Received: via spool by 59883-submit@debbugs.gnu.org id=B59883.167076505916943 (code B ref 59883); Sun, 11 Dec 2022 13:25:02 +0000 Original-Received: (at 59883) by debbugs.gnu.org; 11 Dec 2022 13:24:19 +0000 Original-Received: from localhost ([127.0.0.1]:46420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4MJX-0004PD-1e for submit@debbugs.gnu.org; Sun, 11 Dec 2022 08:24:19 -0500 Original-Received: from mail-oa1-f42.google.com ([209.85.160.42]:39623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4MJU-0004P6-SK for 59883@debbugs.gnu.org; Sun, 11 Dec 2022 08:24:17 -0500 Original-Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-1442977d77dso5482416fac.6 for <59883@debbugs.gnu.org>; Sun, 11 Dec 2022 05:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=yyUeuxmn/oK4Hy/NMigzS1UI9vujwW1uA9e4c60UcqY=; b=gLZxZPv4BrEfWtVxkyu1eQ2gKovOoT8EVzy+vXaIbgGJNslp6C7CPB7DDxfKqc37yo IGHXUiswU2BJt5K0rXBpmJK60tbbmiVBkOv/JEXCMXDZCBrKWzXHQICInLPvjh566Pnh wgx0mP5UuaHL3m1frBrr4HSEwiZR5cGvHryJFhtZsUaDRrC81BD87eAehPnD0V9HFixo f6ixnsBuBv+w6xwDiE8L78EVYUrGSlSGWC0s0iBDgTo4H0WJR/rlePUlGITmthXYqkcG LUp1I11H2FPvV6I+PRg6qxciPbF/z/Ifzzixd00zeeGJX+ZI46VZHFWwy18hgfnw73wt ktew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=yyUeuxmn/oK4Hy/NMigzS1UI9vujwW1uA9e4c60UcqY=; b=VaiUt2n8t1Ds8VOvRqsebjWCYQ6J9QTYD8eqGV+YTEFtU96WWw0gmVkWdd5TfGmOHb yFr/0yhq01Bqjdpc4XLRrFLX5IlMFi77xmZzfvvBS/UHOki8GJBPWHVNVziECaGXir7H Qra0qJoJLb6a5bMKEFMwoVx4uc6CcEHrncfTYcC9JOC5DwhivLiFrp79F5tqT/gMaCZd kLSPWS1seNrJ7SupDsFFynwmvuR+3vlNuL2sQW5IdUtQDWtSgO9AiuI3q5aoYhhn9aLH eA+nzqvVCpUGbu5EpypFACJVcVt/9mvHCFCLLqwzdIBmDvknGA7oz7JfGLEl58In8sqW URMw== X-Gm-Message-State: ANoB5plX1wV1o19Zm8uFYL4RrogeFNKEkR5Xqg/Hcu/GVHmiClpw327O WdFj+WI9JVcncyrtJOwWtgCfarxF5MXUw56rgouZVpI8kw== X-Google-Smtp-Source: AA0mqf7soZS3vJh7Ynley0HfDU09lQqu1bDVNg8KaSYnp1fRzIMUqp0ratzuATz7SdjQW+1NlnlTgkVG5Z0YJwt3/as= X-Received: by 2002:a05:6870:8985:b0:144:fa85:7a83 with SMTP id f5-20020a056870898500b00144fa857a83mr1569456oaq.24.1670765051010; Sun, 11 Dec 2022 05:24:11 -0800 (PST) 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:250606 Archived-At: --0000000000005e653d05ef8d4db2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I found a solution. Quick: For some reason when opening a go file using 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 actually 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/ec743893cd01c9423aaae4513b092c4c4c06= f0f4 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#unstable-= versions This bug report may be closed, reported for reference. Am So., 11. Dez. 2022 um 13:45 Uhr schrieb Johann H=C3=B6chtl < johann.hoechtl@gmail.com>: > 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 sta= ys > 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 is 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, ni= l > 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. > --0000000000005e653d05ef8d4db2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I found a solution. Quick: For some reason when opening a = go file using go-mode, Emacs/eglot generates a=C2=A0"textDocument/didOpen" server message. Now = the correct reaction of a LS upon such a message in a chase where the file = actually did not change remains disputable:


However, the gopls-team c= onsidered 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

To use the yet unreleased feature from gopls@HEAD which w= orks, follow


This bug report may be closed, reported for refer= ence.


Am So., 11. Dez. 2022 um 13:45=C2=A0Uhr schrieb J= ohann H=C3=B6chtl <johann.ho= echtl@gmail.com>:
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 proj= ect as gopls stays at a very small memory footprint.

When I uninstall go-mode OR find-file-literally *.go and later enable eg= lot,=C2=A0gopls=C2=A0 is correctly=C2=A0"directed" to load the pr= oject, because memory consumption is much higher. In this case it also repo= rts back to eglot "loading packages" and "finished loading p= ackages".

Sidenote: However I cannot interact= any further with the LS as eglot doens't=C2=A0consider any buffer as m= anaged:

cl-no-applicable-method: No applicable met= hod: eglot--managed-buffers, nil
eldoc error: (jsonrpc-error No current = JSON-RPC connection (jsonrpc-error-code . 32603) (jsonrpc-error-message . N= o current JSON-RPC connection))
mouse-minibuffer-check: Minibuffer windo= w is not active

but I guess this is because th= e buffer has no mode eglot considers to be supported.

<= div>Sidenote2: If I enable go-mode for this buffer (thus triggering eglot-e= nsure in .emacs) , a second gopls process is spawned yet without communicat= ion between=C2=A0eglot and gopls. --0000000000005e653d05ef8d4db2--