GNU bug report logs - #70036
30.0.50; Move file-truename to the C level

Previous Next

Package: emacs;

Reported by: Theodor Thornhill <theo <at> thornhill.no>

Date: Wed, 27 Mar 2024 19:10:02 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Theodor Thornhill <theo <at> thornhill.no>
To: João Távora <joaotavora <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 70036 <at> debbugs.gnu.org, felician.nemeth <at> gmail.com
Subject: bug#70036: a fix that
Date: Fri, 19 Apr 2024 20:13:57 +0200
João Távora <joaotavora <at> gmail.com> writes:

> On Fri, Apr 19, 2024 at 12:12 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > > I _think_, but can't be 100% sure, that I explicitly decided that 6 years
>> > > ago, I just didn't document it  explicitly beyond typing in "file-truename".
>> > > Git archeology brings me to a commit in 2018 where I was reorganizing
>> > > code, and file-truename was already there.  I definitely knew about
>> > > expand-file-name in 2018 though.
>> >
>> > The fact that I chose find-buffer-visiting over get-file-buffer around
>> > the same time is another hint...
>>
>> Without proper commentary, this is a very weak hint.  It could, for
>> example, mean the problem you wanted to solve no longer exists, or
>> even that you were unsure about whether expand-file-name could do the
>> job.
>
> If I indeed _meant_ to solve the symlink problem, then it most definitely
> still exists.  I've demonstrated that.
>
> Intentional or not, the fact of the matter is that Eglot was usable
> from very early on projects with symlinks.   Not all clients can boast
> that, as seems to be evidenced some bug reports to the servers pertaining
> to some other clients.

FWIW this isn't true AFAICT.

Try this:

create foo.go:
```
package main

func foo () int {
	return 1
}
```

Then main.go
```
package main

func main () {
	foo()
}
```

now `ln -s main.go mainlink.go`

Open main.go in emacs and M-x eglot. Observe error:
```
compiler [DuplicateDecl]: main redeclared in this block (this error: other declaration of main)
```

This is from the revert commit. Same behavior from pre-my-fix, my-fix,
your first fix and the latest iteration. For now I'm guessing on the
register file watcher init for gopls not caring about symlinks.

>
> Regardless, foregoing this behaviour should be at a minimum documented
> and would need an extremely well-fundamented reason.  But there was not
> even sufficient awareness that the behaviour was being abandoned.  Which
> is, like, totally OK and common and normal, and doesn't bring into
> question the high  credentials of anyone  involved in this discussion.
>
> João

Theo




This bug report was last modified 1 year and 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.