Subject: bug#70036: a fix that

From: Theodor Thornhill <[email-masked]>
Date: Fri, 19 Apr 2024 20:13:57 +0200

João Távora <[email-masked]> writes:

> On Fri, Apr 19, 2024 at 12:12 PM Eli Zaretskii <[email-masked]> 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