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: missing unimported package candidates #35359
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. |
When I look at logs, I see a ton of "no file for" errors, which are coming from |
...I looked a little now. The problem is that |
Change https://golang.org/cl/205501 mentions this issue: |
Change https://golang.org/cl/205658 mentions this issue: |
Unimported completions now try to pull Packages from everywhere, not just the transitive dependencies of the current package. That confused the import formatting code, which only looked at deps. Pass the Package along with the import suggestion, and use it when it's present. Also change some error messages to be different for diagnostic purposes. Fixes golang/go#35359. Change-Id: Ia8ca923e46723e855ddd2da7611e6eb13c02bb4f Reviewed-on: https://go-review.googlesource.com/c/tools/+/205501 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> (cherry picked from commit 8185551) Reviewed-on: https://go-review.googlesource.com/c/tools/+/205658 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com>
Repro (assuming completeUnimported=true is configured):
rand.
. You should see suggestions from crypto/rand and math/rand.rand.Int
from "crypto/rand"rand.
again. Now you only see untyped completions from "crypto/rand". I expected to see typed completions from "crypto/rand" and completions from "math/rand".See https://youtu.be/VaOs1crVI4g
/cc @stamblerre @heschik
The text was updated successfully, but these errors were encountered: