New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: make -remote=auto resilient to changing TMPDIR #41266
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
Comments
gopherbot
added
Tools
This label describes issues relating to any tools in the x/tools repository.
gopls
Issues related to the Go language server, gopls.
labels
Sep 7, 2020
findleyr
changed the title
x/tools/gopls: make --remote=auto resilient to changing TMPDIR
x/tools/gopls: make -remote=auto resilient to changing TMPDIR
Sep 7, 2020
Change https://golang.org/cl/274272 mentions this issue: |
gopherbot
pushed a commit
to golang/tools
that referenced
this issue
Dec 1, 2020
If XDG_RUNTIME_DIR is set, it makes more sense as a location for the gopls daemon socket than TMPDIR. This avoids auto discovery issues when TMPDIR is overridden for certain editors. For golang/go#41266 Change-Id: I5a0a20c6185ca60d8ff03b8d948b17a636aa8404 Reviewed-on: https://go-review.googlesource.com/c/tools/+/274272 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org>
I think using XDG_RUNTIME_DIR was the correct fix, so I'll mark this closed. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Recently, each neovim/coc.nvim process has started assigning a unique
$TMPDIR
(e.g./tmp/nvimPuWNII
). This breaks the current daemon discovery (when using-remote=auto
), which looks for a deterministic unix domain socket path inside os.TempDir().We should either make
-remote=auto
behave independently of os.TempDir(), or (more feasibly) provide the means to work-around it without having to manage the daemon manually. Something like-remote.tempdir=/tmp
, though I may have to rethink the way that the remote is parameterized, as we already have a lot of-remote.*
flags.Reported here: https://groups.google.com/g/golang-tools/c/y3OQNIudLzQ/m/7JYRgEZSAgAJ
The text was updated successfully, but these errors were encountered: