Skip to content
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: no packages found for file #33549

Closed
vacheli opened this issue Aug 8, 2019 · 9 comments
Closed

x/tools/gopls: no packages found for file #33549

vacheli opened this issue Aug 8, 2019 · 9 comments
Labels
Documentation FrozenDueToAge gopls Issues related to the Go language server, gopls. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@vacheli
Copy link

vacheli commented Aug 8, 2019

What version of Go are you using (go version)?

$ go version

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

What did you expect to see?

image

image

@gopherbot gopherbot added this to the Unreleased milestone Aug 8, 2019
@gopherbot gopherbot added Documentation gopls Issues related to the Go language server, gopls. labels Aug 8, 2019
@vacheli
Copy link
Author

vacheli commented Aug 8, 2019

Also, there is no code completion, hint, or suggestion.

@stamblerre stamblerre added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Aug 8, 2019
@stamblerre
Copy link
Contributor

What is the output of gopls -rpc.trace -v check path/to/file.go?

@stamblerre stamblerre changed the title x/tools/gopls Request textDocument/documentLink failed. x/tools/gopls: no packages found for file Aug 8, 2019
@vacheli
Copy link
Author

vacheli commented Aug 10, 2019

What is the output of gopls -rpc.trace -v check path/to/file.go?

image

@vacheli
Copy link
Author

vacheli commented Aug 10, 2019

Also,No autocomplete suggestion
image

@stamblerre
Copy link
Contributor

@vacheli: Can you please share the full output of the gopls -rpc.trace -v check /path/to/file.go command? It's missing the top portion with the go env, which I need to see to investigate this. Are you using modules?

Also, autocompletion for unimported packages is not yet supported in gopls generally (#31906), but you will not see any language features because it seems gopls cannot type-check your package.

@vacheli
Copy link
Author

vacheli commented Aug 13, 2019

@vacheli: Can you please share the full output of the gopls -rpc.trace -v check /path/to/file.go command? It's missing the top portion with the go env, which I need to see to investigate this. Are you using modules?

Also, autocompletion for unimported packages is not yet supported in gopls generally (#31906), but you will not see any language features because it seems gopls cannot type-check your package.

gopls.log

@vacheli
Copy link
Author

vacheli commented Aug 13, 2019

@stamblerre THKS, I use go module, but no set GO111MODULE environment variable.

@stamblerre
Copy link
Contributor

Does the output of the gopls -rpc.trace -v check path/to/file.go change if you run export GO111MODULE=on?

Also can you cd into /Users/vachel/work/code/gitlab.cowelltech.com/cloud-pos-ssl and run go list -e -json -compiled -test /Users/vachel/work/code/gitlab.cowelltech.com/cloud-pos-ssl?

@vacheli
Copy link
Author

vacheli commented Aug 13, 2019

Sorry, It's no problem, I didn't use it properly.

@vacheli vacheli closed this as completed Aug 13, 2019
@golang golang locked and limited conversation to collaborators Aug 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge gopls Issues related to the Go language server, gopls. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants