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: Mon, 12 Dec 2022 08:13:42 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e6fe8a05ef9c3e98" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38873"; 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 Mon Dec 12 08:15:22 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 1p4d22-0009xJ-3E for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Dec 2022 08:15:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4d1k-0006Sk-Cg; Mon, 12 Dec 2022 02:15:04 -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 1p4d1i-0006S2-Jk for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 02:15: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 1p4d1i-0003Sw-8n for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 02:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4d1h-0001N8-Td for bug-gnu-emacs@gnu.org; Mon, 12 Dec 2022 02:15:01 -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: Mon, 12 Dec 2022 07:15:01 +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.16708292425239 (code B ref 59883); Mon, 12 Dec 2022 07:15:01 +0000 Original-Received: (at 59883) by debbugs.gnu.org; 12 Dec 2022 07:14:02 +0000 Original-Received: from localhost ([127.0.0.1]:51014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4d0j-0001MJ-Vf for submit@debbugs.gnu.org; Mon, 12 Dec 2022 02:14:02 -0500 Original-Received: from mail-oi1-f172.google.com ([209.85.167.172]:43554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4d0i-0001Lv-6v for 59883@debbugs.gnu.org; Mon, 12 Dec 2022 02:14:00 -0500 Original-Received: by mail-oi1-f172.google.com with SMTP id s187so10400263oie.10 for <59883@debbugs.gnu.org>; Sun, 11 Dec 2022 23:14:00 -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=yBTzfVPgVyFjZFVwyYbjrzO0oMs04DFL9L7YF40iVZE=; b=q0SO081UnGxsyfJbNdh3pj6oqF+g5p4ThreNPsmZl/fmaCkA90v3bAJf9dxKem48+Y BeJKl6yh0ij4bjiKzlUj82a5teXXSuJxtqGESuqTP0naHSBfvLF901DPeZzcCVpgUCYM EjsJymIlkbiqv+2gTEVn47x0hZioNpSpz8VqwM4FiKlw+NnPQ14oc+gVhzuRRnC++Npb aNinpAT2mhBqtQ1dik3VN5+8xc8afc8nwlG9cYS1yeBXyzpRRjO2AFy97sFPKEgdQVXn SBJScFa+d6kxV4HMiK9W3Y9RcHsLPwGw+PsmYublL1E/0pH/1rDTFepu5Rt8hnd6GR8p vP0Q== 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=yBTzfVPgVyFjZFVwyYbjrzO0oMs04DFL9L7YF40iVZE=; b=qKvpJjVSogtDmyr52zcmi77Srt+IUC13gwSyJHpvSWBED1TVxyP0pY2VXYeAtLMeEz jfR73OHcxvU6ZCoarf1+4mzHi+9pfL7xQjAZ3ZAXG1TKXqu/7ainzZJ1H+DgiRdmCWAr W7GNV/2G2/4saJfpLnpX4MJfnZ0OGrXW/NCSiqjHAImlRW/dy0x7SoItT1ToZfpUzTUp Her/MrxIJAli7hBpzZlH4vYdKSsUj9Q78P0iupqUWK9n5NcHqAJQHNpXuwkFM9S8xHIQ AlEZ+pFKdMwcM+oVSYJ3IB58wF2R7+FHTN3hKjPK6QMqInnRDFAvY0VL1sZs49NWThuT HPUg== X-Gm-Message-State: ANoB5pm9X5MxwiC/Eh8x0/qkfOr4DDTcdtfPAxmO0EGwM+5DU2kdCicl KFzP8PPWgms+tnLn7picZkER11ZnI2RJJBa8KbJeJI8= X-Google-Smtp-Source: AA0mqf7rZoHwSfR4XeHpPRtJqwOv6XdMbwUzeRTAtoy0okwYtw0mHhzLKYgXsZYnIIn940tAsuCGr5e9k6QKiV6w3P8= X-Received: by 2002:a54:4612:0:b0:35b:cebf:b078 with SMTP id p18-20020a544612000000b0035bcebfb078mr19304367oip.24.1670829232814; Sun, 11 Dec 2022 23:13:52 -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:250677 Archived-At: --000000000000e6fe8a05ef9c3e98 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. 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 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/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 < > 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 st= ays >> 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 memor= y >> 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, n= il >> eldoc error: (jsonrpc-error No current JSON-RPC connection >> (jsonrpc-error-code . 32603) (jsonrpc-error-message . No current JSON-RP= C >> 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. >> > --000000000000e6fe8a05ef9c3e98 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry, this bug has to be re-opened. I was confident that = the described "work-around" is stable, yet it's not. Eglot wa= s working consistently yesterday just to find it non-working today with the= same errors.

Am So., 11. Dez. 2022 um 14:24=C2=A0Uhr schrieb Johann H=C3=B6= chtl <johann.hoechtl@gmail.c= om>:
I found a solution. Quick: For some reason when opening a go f= ile 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 actu= ally did not change remains disputable:

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

<= a href=3D"https://github.com/golang/tools/commit/ec743893cd01c9423aaae4513b= 092c4c4c06f0f4" target=3D"_blank">https://github.com/golang/tools/commit/ec= 743893cd01c9423aaae4513b092c4c4c06f0f4

=
To use the yet unreleased feature from gopls@HEAD which works, f= ollow


This bug report may be closed, reporte= d for reference.


<= div dir=3D"ltr" class=3D"gmail_attr">Am So., 11. Dez. 2022 um 13:45=C2=A0Uh= r schrieb Johann H=C3=B6chtl <johann.hoechtl@gmail.com>:
I dug deeper into th= e problem:

* When I open a very small golang-project, eg= lot interconnects correctly with gopls
* When I open a larger gol= ang-project, eglot fails to communicate with gopls. In fact, it fails to di= rect gopls to load the project as gopls stays at a very small memory footpr= int.

When I uninstall go-mode OR find-file-literal= ly *.go and later enable eglot,=C2=A0gopls=C2=A0 is correctly=C2=A0"di= rected" to load the project, because memory consumption is much higher= . In this case it also reports back to eglot "loading packages" a= nd "finished loading packages".

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

cl-no-applicabl= e-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-minibuf= fer-check: Minibuffer window is not active

but= I guess this is because the buffer has no mode eglot considers to be suppo= rted.

Sidenote2: If I enable go-mode for this buff= er (thus triggering eglot-ensure in .emacs) , a second gopls process is spa= wned yet without communication between=C2=A0eglot and gopls.
--000000000000e6fe8a05ef9c3e98--