x/tools/gopls: file paths in symlinked dirs not resolved when running remote-mode #51825
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
On macOS (where the temp directory is a symlink):
Open
main.go
using-remote=auto
so that a new server is spawned.What did you expect to see?
The diagnostic message referring to a resolved path (i.e. not symlinked directory).
What did you see instead?
Diagnostics (and code edits) reported by gopls are using the unresolved path, despite the LSP client sending resolved paths to gopls (see gopls.log below) e.g.:
The root casue seems to be #51823. As the Forwarder intercepts the
initialize
message and adds the local env (i.e. setsGOWORK
env in session options), all package loading afterwards will get unresolved paths.gopls log
The text was updated successfully, but these errors were encountered: