From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70036: a fix that Date: Fri, 19 Apr 2024 21:42:50 +0200 Message-ID: <874jbxkukl.fsf@thornhill.no> References: <4e670617-6483-4159-a5cf-27a921764c38@email.android.com> <864jbxden1.fsf@gnu.org> <86le59bo7z.fsf@gnu.org> <877cgtkyoq.fsf@thornhill.no> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17732"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 70036@debbugs.gnu.org, felician.nemeth@gmail.com To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 19 21:44:03 2024 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 1rxu9S-0004N8-TZ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Apr 2024 21:44:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxu9I-00033w-5i; Fri, 19 Apr 2024 15:43:52 -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 1rxu9G-00033c-A5 for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2024 15:43:50 -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 1rxu9G-00036w-1J for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2024 15:43:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rxu9T-00035T-QV for bug-gnu-emacs@gnu.org; Fri, 19 Apr 2024 15:44:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Apr 2024 19:44:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70036 X-GNU-PR-Package: emacs Original-Received: via spool by 70036-submit@debbugs.gnu.org id=B70036.171355579911563 (code B ref 70036); Fri, 19 Apr 2024 19:44:03 +0000 Original-Received: (at 70036) by debbugs.gnu.org; 19 Apr 2024 19:43:19 +0000 Original-Received: from localhost ([127.0.0.1]:60018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxu8k-00030N-GN for submit@debbugs.gnu.org; Fri, 19 Apr 2024 15:43:19 -0400 Original-Received: from out-170.mta0.migadu.com ([2001:41d0:1004:224b::aa]:58242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxu8i-0002zO-I0 for 70036@debbugs.gnu.org; Fri, 19 Apr 2024 15:43:17 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1713555775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d5rtgIqcUSbMQicNGXMIELuSm8Cjw4SyAS623CyAwyU=; b=TEtiLRCKQDCFQ+A7a1tgYu4h697XT/zT9DSdbr+Yqa6vKhmEAVBy0bjVnMDf2dT0j4wdAX AA6MudB6Hdp71b/o62nlz8t3L/nGfPcw4WowsiqakixVZ1KRYe/Qn6vDulpiHNeeEk1YJE uXaVFz7fLpQ+EBOcZpca9Whw69liC/GWIfuhdE+jQ+M+LAGYVmM40upWM4IOXUTk9eDmcZ cE7Cp9MdzDITPK89lPHYViUms2GIDumZrpiLEg8QqW9qDkaT7E0DBdXyYg8oz/PTSJWapU WNsXFmTm4hKubQID1o4ZwWJ1jKbC7NYgDvTGo/X8fJVBmChbsPNXluhEYRV1gQ== In-Reply-To: X-Migadu-Flow: FLOW_OUT 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:283704 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > On Fri, Apr 19, 2024 at 7:14=E2=80=AFPM Theodor Thornhill wrote: >> >> Jo=C3=A3o T=C3=A1vora writes: >> >> Open main.go in emacs and M-x eglot. Observe error: >> ``` >> compiler [DuplicateDecl]: main redeclared in this block (this error: oth= er declaration of main) >> ``` > > Reproduced, but that's not Eglot's fault, couldn't be. Eglot told > gopls _nothing_ about mainlink.go. Check your events buffer! No > didOpen for mainlink.go! In fact you probably don't even need to didOpen > any file for that problem to be reported as a project-wide diagnostic. > A simple initialize will do, I bet. IOW, you barely need a client. > Gopls decided to do some out-of-band (meaning out-of-LSP) analysis > of the code, bumped into its own ignorance (or policy, who knows?) > re. symlinks, and decided to issue diagnostics. Seems something a > Go compiler would do. Maybe it does? Are symlinks even supported in > Go projects? > > Bottom line is Eglot wasn't ever the hindrance for this to work and it > should not suddenly become one. Not without a very good reason, which > this performance matter clearly isn't (not least because there are lots > of alternative solutions as we've seen) > Sure. I think it locates this file from the globbing in file watchers. Because it matches a pattern it is allowed to read it. But it's not important, mostly an example of how symlinks and lsps are difficult. As another point of reference, lsp-mode behaves the same as Eglot. Theo