-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: FindFileInPackage nil pointer dereference #38100
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. |
Can you please share your full |
Directory structure:
gopls logs
|
Does the My guess is that this might be an issue with vim-go, which is causing |
the entire directory tree exists on disk.
I've filed fatih/vim-go#2787 with the full config.vim used to repro and a gif.
I can confirm gopls doesn't crash when running
oh for reference, I'm also using neovim instead of vim
More reliably, I am able to trigger the bug upon opening vim with
|
Change https://golang.org/cl/225777 mentions this issue: |
As part of investigating golang/go#38100, I noticed a few things that I wanted to clean up. Mostly, for renames, we were calling qualifiedObjAtProtocolPos twice, so I factored out a shared helper function. I also added an error return for builtins so that callers don't have to check. Change-Id: I28c75c801cbec1611736af931cfa72befd219201 Reviewed-on: https://go-review.googlesource.com/c/tools/+/225777 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rohan Challa <rohan@golang.org>
Vim-go sends
I can duplicate the issue, but I don't see how this is a vim-go issue. Running
|
At current master, gopls does not panic
|
Change https://golang.org/cl/227030 mentions this issue: |
Thanks for bearing with me! I've figured out the cause of this issue, and it should be fixed by the CL linked above. |
Not sure why gopherbot didn't close this. |
We need to search all transitive dependencies of a package, not just its immediate imports. Fixes golang/go#38100 Change-Id: I15b4dbe226ba851691ca0c95460c3648ede32f04 Reviewed-on: https://go-review.googlesource.com/c/tools/+/227030 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Rohan Challa <rohan@golang.org>
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?
https://play.golang.org/p/SrULcmi-Xbb
Hovering over
b.Baz
in test.go will cause gopls to panic and crash.bar.pb.go was generated with
What did you expect to see?
gopls not to panic. Vim-go to highlight all references to the same variable.
What did you see instead?
gopls panic
The text was updated successfully, but these errors were encountered: