-
Notifications
You must be signed in to change notification settings - Fork 798
No autocompletion for project #1612
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
Comments
Hi, could you please fill out the bug report template (edit: here is a link to the template, if you need it)? I do not have enough information to diagnose the behavior you are experiencing. Assuming you are using gopls, it would be helpful to see the gopls logs, which can be collected as described here: https://github.com/golang/vscode-go/blob/master/docs/troubleshooting.md#collect-gopls-information |
go version go1.15.12 windows/amd64 I put these lines into setting.json
Outbut is the next
List of hints during Go code typing are the same as I wrote above |
Hi findleyr go version go1.15.12 windows/amd64 My settings.json { // ==========================================================================
} |
Hi findleyr Regards |
I've upgraged Go to Nothing was changed :( |
Could you please provide the |
Please look at the log below
|
@ivanburak: Can you please share the full content of the log, starting from the very top (you will see an |
I've added 2 completion settings into setting.json Nothing was changed it's full log of gopls (server) [Trace - 23:18:46.824 PM] Sending request 'initialize - (0)'. [Trace - 23:18:46.858 PM] Received response 'initialize - (0)' in 33ms. [Trace - 23:18:46.861 PM] Sending notification 'initialized'. [Trace - 23:18:46.861 PM] Received request 'window/workDoneProgress/create - (1)'. [Trace - 23:18:46.861 PM] Sending response 'window/workDoneProgress/create - (1)' in 0ms. [Trace - 23:18:46.861 PM] Received notification '$/progress'. [Trace - 23:18:46.861 PM] Received request 'workspace/configuration - (2)'. [Trace - 23:18:46.866 PM] Sending response 'workspace/configuration - (2)' in 4ms. [Trace - 23:18:48.539 PM] Received notification 'window/logMessage'. [Info - 23:18:48] 2021/07/12 23:18:48 go env for C:\GoTogether\src\ivanburak\parsing [Trace - 23:18:49.063 PM] Received notification 'window/logMessage'. [Info - 23:18:49] 2021/07/12 23:18:49 1.0550817s for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE=off GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -e -f {{context.ReleaseTags}} -- unsafe [Trace - 23:18:49.589 PM] Received notification 'window/logMessage'. [Info - 23:18:49] 2021/07/12 23:18:49 1.5816692s for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -f "{{context.GOARCH}} {{context.Compiler}}" -- unsafe [Trace - 23:18:58.125 PM] Received notification 'window/logMessage'. [Info - 23:18:58] 2021/07/12 23:18:58 9.0627066s for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -e -json -compiled=true -test=true -export=false -deps=true -find=false -- ./... builtin [Trace - 23:18:58.394 PM] Sending notification 'textDocument/didOpen'. [Trace - 23:18:58.397 PM] Sending request 'textDocument/documentLink - (1)'. [Trace - 23:18:58.399 PM] Sending request 'textDocument/codeAction - (2)'. [Trace - 23:18:58.400 PM] Sending request 'textDocument/documentSymbol - (3)'. [Trace - 23:18:58.401 PM] Sending request 'textDocument/documentHighlight - (4)'. [Trace - 23:18:58.403 PM] Sending notification '$/cancelRequest'. [Trace - 23:18:58.403 PM] Sending request 'textDocument/codeAction - (5)'. [Trace - 23:18:58.404 PM] Sending request 'textDocument/codeLens - (6)'. [Trace - 23:18:58.405 PM] Sending request 'textDocument/foldingRange - (7)'. [Trace - 23:18:58.695 PM] Received notification 'window/logMessage'. [Info - 23:18:58] 2021/07/12 23:18:58 559.4453ms for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go env -json GOMOD GOPATH [Trace - 23:18:58.737 PM] Received notification 'window/logMessage'. [Trace - 23:18:58.737 PM] Received notification 'window/logMessage'. [Info - 23:18:58] 2021/07/12 23:18:58 go/packages.Load [Info - 23:18:58] 2021/07/12 23:18:58 go/packages.Load [Trace - 23:18:58.896 PM] Received notification 'window/logMessage'. [Info - 23:18:58] 2021/07/12 23:18:58 go/packages.Load [Trace - 23:18:58.904 PM] Received notification 'window/logMessage'. [Info - 23:18:58] 2021/07/12 23:18:58 go/packages.Load [Trace - 23:18:58.905 PM] Received notification 'window/logMessage'. [Info - 23:18:58] 2021/07/12 23:18:58 go/packages.Load [Trace - 23:18:58.907 PM] Received notification 'window/logMessage'. [Trace - 23:18:58.907 PM] Received notification 'window/logMessage'. [Info - 23:18:58] 2021/07/12 23:18:58 go/packages.Load [Info - 23:18:58] 2021/07/12 23:18:58 go/packages.Load [Trace - 23:18:59.068 PM] Received notification 'window/logMessage'. [Trace - 23:18:59.068 PM] Received notification '$/progress'. [Info - 23:18:59] 2021/07/12 23:18:59 go/packages.Load [Trace - 23:18:59.074 PM] Received request 'client/registerCapability - (3)'. [Trace - 23:18:59.079 PM] Sending response 'client/registerCapability - (3)' in 4ms. [Trace - 23:18:59.084 PM] Received request 'client/registerCapability - (4)'. [Trace - 23:18:59.086 PM] Sending response 'client/registerCapability - (4)' in 2ms. [Trace - 23:18:59.356 PM] Received notification 'window/logMessage'. [Info - 23:18:59] 2021/07/12 23:18:59 discovered missing identifiers: map[memRecordCycle:true pageBits:true] [Trace - 23:18:59.721 PM] Received notification 'window/logMessage'. [Info - 23:18:59] 2021/07/12 23:18:59 576.1751ms for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -f "{{context.GOARCH}} {{context.Compiler}}" -- unsafe [Trace - 23:19:00.202 PM] Sending request 'textDocument/completion - (8)'. [Trace - 23:19:00.218 PM] Received notification 'window/logMessage'. [Info - 23:19:00] 2021/07/12 23:19:00 1.0725151s for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE=off GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -e -f {{context.ReleaseTags}} -- unsafe [Trace - 23:19:00.742 PM] Received notification 'window/logMessage'. [Info - 23:19:00] 2021/07/12 23:19:00 1.5950398s for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -f "{{context.GOARCH}} {{context.Compiler}}" -- unsafe [Trace - 23:19:01.273 PM] Received notification 'window/logMessage'. [Info - 23:19:01] 2021/07/12 23:19:01 2.1260625s for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE=off GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -e -f {{context.ReleaseTags}} -- unsafe [Trace - 23:19:01.749 PM] Received notification 'window/logMessage'. [Info - 23:19:01] 2021/07/12 23:19:01 2.0711154s for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -f "{{context.GOARCH}} {{context.Compiler}}" -- unsafe [Trace - 23:19:02.284 PM] Received notification 'window/logMessage'. [Info - 23:19:02] 2021/07/12 23:19:02 2.6066277s for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE=off GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -e -f {{context.ReleaseTags}} -- unsafe [Trace - 23:19:10.294 PM] Received notification 'window/logMessage'. [Info - 23:19:10] 2021/07/12 23:19:10 10.0735049s for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -e -json -compiled=true -test=true -export=false -deps=true -find=false -- "C:\GoTogether\src\ivanburak\fibo" [Trace - 23:19:10.780 PM] Received notification 'window/logMessage'. [Info - 23:19:10] 2021/07/12 23:19:10 9.5061031s for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -e -json -compiled=true -test=true -export=false -deps=true -find=false -- "C:\GoTogether\src\ivanburak\fibo" [Trace - 23:19:10.842 PM] Received notification 'window/logMessage'. [Info - 23:19:10] 2021/07/12 23:19:10 541.5575ms for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go env -json GOMOD GOPATH [Trace - 23:19:10.877 PM] Received notification 'window/logMessage'. [Trace - 23:19:10.877 PM] Received notification 'window/logMessage'. [Trace - 23:19:10.877 PM] Received notification 'window/logMessage'. [Info - 23:19:10] 2021/07/12 23:19:10 go/packages.Load [Info - 23:19:10] 2021/07/12 23:19:10 go/packages.Load [Info - 23:19:10] 2021/07/12 23:19:10 go/packages.Load [Trace - 23:19:11.359 PM] Received notification 'window/logMessage'. [Trace - 23:19:11.359 PM] Received notification 'window/logMessage'. [Info - 23:19:11] 2021/07/12 23:19:11 569.259ms for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go env -json GOMOD GOPATH [Info - 23:19:11] 2021/07/12 23:19:11 9.07281s for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go list -e -json -compiled=true -test=true -export=false -deps=true -find=false -- "C:\GoTogether\src\ivanburak\fibo" [Trace - 23:19:11.391 PM] Received notification 'window/logMessage'. [Trace - 23:19:11.391 PM] Received notification 'window/logMessage'. [Trace - 23:19:11.392 PM] Received notification 'window/logMessage'. [Info - 23:19:11] 2021/07/12 23:19:11 go/packages.Load [Info - 23:19:11] 2021/07/12 23:19:11 go/packages.Load [Info - 23:19:11] 2021/07/12 23:19:11 go/packages.Load [Error - Received] 23:19:11.393 PM #2 JSON RPC cancelled [Trace - 23:19:11.394 PM] Received response 'textDocument/documentLink - (1)' in 12997ms. [Trace - 23:19:11.394 PM] Received response 'textDocument/documentSymbol - (3)' in 12994ms. [Trace - 23:19:11.395 PM] Received response 'textDocument/documentHighlight - (4)' in 12994ms. [Trace - 23:19:11.396 PM] Received notification 'window/logMessage'. [Trace - 23:19:11.397 PM] Received response 'textDocument/codeLens - (6)' in 12992ms. [Trace - 23:19:11.397 PM] Received response 'textDocument/codeAction - (5)' in 12994ms. [Trace - 23:19:11.397 PM] Received response 'textDocument/foldingRange - (7)' in 12992ms. [Trace - 23:19:11.398 PM] Received response 'textDocument/completion - (8)' in 11196ms. [Info - 23:19:11] 2021/07/12 23:19:11 fixImports(filename="C:\GoTogether\src\ivanburak\fibo\main.go"), abs="C:\GoTogether\src\ivanburak\fibo\main.go", srcDir="C:\GoTogether\src\ivanburak\fibo" ... [Trace - 23:19:11.941 PM] Received notification 'window/logMessage'. [Info - 23:19:11] 2021/07/12 23:19:11 572.1813ms for GOROOT=C:\Program Files\Go GOPATH=C:\GoTogether GO111MODULE= GOPROXY=https://proxy.golang.org,direct PWD=C:\GoTogether\src\ivanburak\parsing go env -json GOMOD GOPATH [Trace - 23:19:11.975 PM] Received notification 'window/logMessage'. [Trace - 23:19:11.975 PM] Received notification 'window/logMessage'. [Trace - 23:19:11.975 PM] Received notification 'window/logMessage'. [Info - 23:19:11] 2021/07/12 23:19:11 go/packages.Load [Info - 23:19:11] 2021/07/12 23:19:11 go/packages.Load [Info - 23:19:11] 2021/07/12 23:19:11 go/packages.Load |
It looks like there is only 1 completion request in the attached log, and it returns correct results, but it just takes a very long time to complete. It seems like the first code action request gets stuck and is canceled, backing up all of the subsequent requests. Is These error messages may indicate some problem with the goimports logic:
Does the |
The file go list -e -compiled -test -json ./... |
@stamblerre gopls is suggesting only
@ivanburak Can you try to open the vscode from My current guess is this heppens because the file the user is editing ( |
Ah, I see, thank you for catching that @hyangah--I'm sorry I missed it. Since this is in GOPATH mode, I don't think we will invest time in resolving the issue. @ivanburak: Can you switch to using modules instead? |
Thank you guys for investigation. Compatibility is the good feature of all software technologies and Go is a brilliant example of it. |
@ivanburak You don't have to use modules, just as I suggested open the vscode from C:\GoTogether\src\ivanburak\fibo folder when you want to edit the file in the folder, or add the folder explicitly to the workspace by using "File > Add Folder To Workspace" menu. Even when you use modules, I expect you will encounter issues if you are editing random files outside your main or workspace module. Closing because there is nothing we plan to do here, but recommending users to configure their workspace |
Thanks a lot Huang-Ah :) |
Hints during coge typing are stopped now for Golang.
It worked before but after some VS Code upgrades id stopped to work.
When I type code I just see these hints:
const
func
import
type
var
The text was updated successfully, but these errors were encountered: