-
Notifications
You must be signed in to change notification settings - Fork 798
jump to define wrong #1070
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
@Kurt-Shiwz Thanks for the report. Do you have any public repos we can use to repro the issue? |
[Error - 3:36:55 PM] 2021/01/06 15:36:55 warning: diagnose package: no package for git.mypkg.com/framework/framework/driver [Info - 3:37:04 PM] 2021/01/06 15:37:04 background imports cache refresh starting [Info - 3:37:07 PM] 2021/01/06 15:37:07 background refresh finished after 3.49399579s |
@Kurt-Shiwz: We will need either a publicly accessible repro case or a complete |
[Trace - 11:17:19.488 AM] Sending request 'textDocument/hover - (8)'. [Trace - 11:17:19.490 AM] Received response 'textDocument/hover - (8)' in 2ms. [Trace - 11:17:20.020 AM] Sending request 'textDocument/codeAction - (9)'. [Trace - 11:17:20.022 AM] Received response 'textDocument/codeAction - (9)' in 1ms. [Trace - 11:17:22.264 AM] Sending request 'textDocument/codeLens - (10)'. [Trace - 11:17:22.264 AM] Received response 'textDocument/codeLens - (10)' in 0ms. [Trace - 11:17:22.880 AM] Sending request 'textDocument/definition - (11)'. [Trace - 11:17:22.882 AM] Received response 'textDocument/definition - (11)' in 1ms. [Trace - 11:17:23.258 AM] Sending notification 'textDocument/didOpen'. [Trace - 11:17:23.270 AM] Sending request 'textDocument/documentLink - (12)'. [Trace - 11:17:23.270 AM] Sending request 'textDocument/codeAction - (13)'. [Trace - 11:17:23.270 AM] Sending request 'textDocument/documentSymbol - (14)'. [Trace - 11:17:23.273 AM] Sending request 'textDocument/foldingRange - (15)'. [Trace - 11:17:23.276 AM] Sending request 'textDocument/codeLens - (16)'. [Trace - 11:17:23.277 AM] Sending request 'textDocument/codeAction - (17)'. [Trace - 11:17:23.277 AM] Sending notification '$/cancelRequest'. [Trace - 11:17:23.319 AM] Received notification 'window/logMessage'. [Error - 11:17:23 AM] 2021/01/07 11:17:23 warning: diagnose package: no package for git.mypkg.com/framework/driver [Trace - 11:17:23.324 AM] Received response 'textDocument/documentLink - (12)' in 53ms. [Error - Received] 11:17:23.324 AM #13 JSON RPC cancelled [Trace - 11:17:23.325 AM] Received response 'textDocument/documentSymbol - (14)' in 54ms. [Trace - 11:17:23.336 AM] Received response 'textDocument/codeLens - (16)' in 59ms. [Trace - 11:17:23.336 AM] Received response 'textDocument/foldingRange - (15)' in 63ms. [Trace - 11:17:23.380 AM] Received response 'textDocument/codeAction - (17)' in 102ms. [Trace - 11:17:30.150 AM] Received notification 'window/logMessage'. [Info - 11:17:30 AM] 2021/01/07 11:17:30 background imports cache refresh starting |
Can you share the log from the initialization of the language server (the very start of the file)? You should see an initialize request at the top. Alternatively, you can try using the From the log, it looks like the definition request returned a response in the module cache. Are you opening the workspace at the root of the module (the directory that contains the |
yes
[Trace - 17:40:39.685 PM] Sending request 'initialize - (0)'. [Trace - 17:40:39.687 PM] Received response 'initialize - (0)' in 1ms. [Trace - 17:40:39.907 PM] Sending notification 'initialized'. [Trace - 17:40:39.907 PM] Received request 'window/workDoneProgress/create - (1)'. [Trace - 17:40:39.908 PM] Sending notification 'textDocument/didOpen'. [Trace - 17:40:39.964 PM] Sending response 'window/workDoneProgress/create - (1)' in 56ms. [Trace - 17:40:39.964 PM] Received notification '$/progress'. [Trace - 17:40:39.964 PM] Received request 'workspace/configuration - (2)'. [Trace - 17:40:40.461 PM] Sending response 'workspace/configuration - (2)' in 496ms. [Trace - 17:40:40.634 PM] Received notification 'window/logMessage'. [Info - 5:40:41 PM] 2021/01/07 17:40:40 go env for myproject [Trace - 17:40:42.550 PM] Sending request 'textDocument/documentSymbol - (1)'. [Trace - 17:40:42.729 PM] Sending request 'textDocument/documentLink - (2)'. [Trace - 17:40:43.357 PM] Sending request 'textDocument/foldingRange - (3)'. [Trace - 17:40:43.357 PM] Sending request 'textDocument/codeLens - (4)'. [Trace - 17:40:43.684 PM] Sending notification '$/cancelRequest'. [Trace - 17:40:43.684 PM] Sending request 'textDocument/documentSymbol - (5)'. [Trace - 17:40:44.008 PM] Received notification 'window/logMessage'. [Trace - 17:40:44.011 PM] Sending request 'textDocument/documentLink - (6)'. [Info - 5:40:44 PM] 2021/01/07 17:40:44 go/packages.Load [Trace - 17:40:44.059 PM] Sending notification '$/cancelRequest'. [Trace - 17:40:44.344 PM] Sending request 'textDocument/codeLens - (7)'. [Trace - 17:40:44.344 PM] Sending notification '$/cancelRequest'. [Trace - 17:40:44.346 PM] Sending request 'textDocument/documentSymbol - (8)'. [Trace - 17:40:44.346 PM] Sending notification '$/cancelRequest'. [Trace - 17:40:44.346 PM] Sending request 'textDocument/documentLink - (9)'. [Trace - 17:40:44.346 PM] Sending notification '$/cancelRequest'. [Trace - 17:40:44.541 PM] Sending request 'textDocument/foldingRange - (10)'. [Trace - 17:40:45.069 PM] Sending notification '$/cancelRequest'. [Trace - 17:40:45.070 PM] Sending request 'textDocument/documentSymbol - (11)'. [Trace - 17:40:45.725 PM] Received notification '$/progress'. [Trace - 17:40:45.776 PM] Received request 'client/registerCapability - (3)'. [Trace - 17:40:45.835 PM] Sending response 'client/registerCapability - (3)' in 59ms. [Trace - 17:40:45.850 PM] Received request 'client/registerCapability - (4)'. [Trace - 17:40:45.854 PM] Sending response 'client/registerCapability - (4)' in 3ms. [Error - Received] 17:40:45.918 PM #1 JSON RPC cancelled [Trace - 17:40:48.492 PM] Received response 'textDocument/documentLink - (2)' in 5763ms. [Error - Received] 17:40:48.506 PM #3 JSON RPC cancelled [Error - Received] 17:40:48.506 PM #4 JSON RPC cancelled [Error - Received] 17:40:48.506 PM #5 JSON RPC cancelled [Error - Received] 17:40:48.506 PM #6 JSON RPC cancelled [Trace - 17:40:48.506 PM] Received response 'textDocument/codeLens - (7)' in 4162ms. [Error - Received] 17:40:48.506 PM #8 JSON RPC cancelled [Trace - 17:40:48.511 PM] Received response 'textDocument/documentLink - (9)' in 4165ms. [Trace - 17:40:48.515 PM] Received response 'textDocument/foldingRange - (10)' in 3973ms. [Trace - 17:40:48.517 PM] Received response 'textDocument/documentSymbol - (11)' in 3446ms. [Trace - 17:40:51.908 PM] Sending request 'textDocument/hover - (12)'. [Trace - 17:40:51.909 PM] Received response 'textDocument/hover - (12)' in 1ms. [Trace - 17:40:52.182 PM] Sending request 'textDocument/documentHighlight - (13)'. [Trace - 17:40:52.183 PM] Received response 'textDocument/documentHighlight - (13)' in 0ms. [Trace - 17:40:52.428 PM] Sending request 'textDocument/codeAction - (14)'. [Trace - 17:40:52.431 PM] Received response 'textDocument/codeAction - (14)' in 2ms. [Trace - 17:40:53.974 PM] Sending request 'textDocument/definition - (15)'. [Trace - 17:40:53.975 PM] Received response 'textDocument/definition - (15)' in 0ms. [Trace - 17:40:54.352 PM] Sending notification 'textDocument/didOpen'. [Trace - 17:40:54.381 PM] Sending request 'textDocument/documentLink - (16)'. [Trace - 17:40:54.382 PM] Sending request 'textDocument/codeAction - (17)'. [Trace - 17:40:54.382 PM] Sending request 'textDocument/documentSymbol - (18)'. [Trace - 17:40:54.390 PM] Sending request 'textDocument/foldingRange - (19)'. [Trace - 17:40:54.392 PM] Sending request 'textDocument/codeLens - (20)'. [Trace - 17:40:54.409 PM] Sending request 'textDocument/codeAction - (21)'. [Trace - 17:40:54.411 PM] Sending notification '$/cancelRequest'. [Trace - 17:40:54.417 PM] Received notification 'window/logMessage'. [Trace - 17:40:54.424 PM] Received response 'textDocument/documentLink - (16)' in 42ms. [Error - Received] 17:40:54.425 PM #17 JSON RPC cancelled [Error - 5:40:54 PM] 2021/01/07 17:40:54 warning: diagnose package: no package for git.qutoutiao.net/rec/engine_framework/framework/driver [Trace - 17:40:54.426 PM] Received response 'textDocument/documentSymbol - (18)' in 44ms. [Trace - 17:40:54.435 PM] Received response 'textDocument/codeLens - (20)' in 42ms. [Trace - 17:40:54.435 PM] Received response 'textDocument/foldingRange - (19)' in 44ms. [Trace - 17:40:54.485 PM] Received response 'textDocument/codeAction - (21)' in 75ms. gopls definition myproject/ad/ad.go |
For the To confirm, does your vendor directory contain the |
gopls definition myproject/ad/ad.go:170 ?
yes Is that module mentioned in your
Is that module in your |
@Kurt-Shiwz: Are you able to provide a minimal public repro of the problem? That would be the easiest way for us to investigate. |
I fix this problem! |
Great, glad that's resolved! I'll close this issue now. |
os: macos 11.1 (20C69)
vscode:1.52.1
go: go version go1.15.6 darwin/amd64
I have two project, same conf, use go mod, and run
go mod vendor
(i like to see the pkg files in left explorer, if dont rungo mod vendor
cnat see it on explorer), but jump to define is different, one jump to ./vender/... , another jump to $HOME/go/pkg/mod/...i want to know why this happend?
The text was updated successfully, but these errors were encountered: