-
Notifications
You must be signed in to change notification settings - Fork 18k
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: panic printing version info when using shimmed Go executable #38101
Comments
Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here. |
Change https://golang.org/cl/225817 mentions this issue: |
I checked out the commit with the fix ( The bug reproduces following the same steps in the issue description, or swapping the tools version |
Thanks for following up! Just mailed https://golang.org/cl/226257, which I hope might do the trick? If you could try it out before I merge it that'd be really helpful. The steps do so are: $ git clone https://go.googlesource.com/tools
$ cd tools
$ git fetch "https://go.googlesource.com/tools" refs/changes/57/226257/3 && git cherry-pick FETCH_HEAD
$ cd gopls
$ go install |
Change https://golang.org/cl/226257 mentions this issue: |
I can confirm that that change fixes the panic. Thanks for the quick response! |
This was causing crashes by setting the working directory to be empty. Fixes golang/go#38062 Fixes golang/go#38101 Change-Id: I6d679ee1d5dcab914df3d565d83aa6de0dd74cb4 Reviewed-on: https://go-review.googlesource.com/c/tools/+/225817 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
My fix in CL 225817 introduced another bug :) Fixes golang/go#38101 Change-Id: I3de1a051d3e86474c6aa0fb0e427a590438e2172 Reviewed-on: https://go-review.googlesource.com/c/tools/+/226257 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
What did you do?
On my machine I use the asdf version manager to manage my Go installation, which wraps the
go
executable with a shim. Using this setup, the latest version ofgopls
panics on several commands, such asgopls check
.I realize having to set up a version manager to debug is probably a pain, so I've managed to reproduce reliably in docker using
docker run --rm -it debian:latest
and the following steps:What did you expect to see?
No panic, the command runs normally
What did you see instead?
A panic:
Build info
Go info
Other Information
6fc5d0bc36fc9f0458937704b7b40bbcf4ea46bc
.gopls format
andgopls bug
fail with the same error.asdf
uses a bash script as a shim to managego
rather than directly calling the executable. That script looks like this:The text was updated successfully, but these errors were encountered: