-
Notifications
You must be signed in to change notification settings - Fork 646
go to declaration not working sometimes (ie f12, editor.action.goToDeclaration) #702
Comments
In such cases what do you see when you do a If the Peek Definition/Hover just says "Loading" and never shows anything, it might be because the operation to find the definition and docs never completed. Add You can also try running the |
Thanks for getting back to me. In response to your questions:
Here is an example of one of the offending expressions:
Finally, running the failed godef command with gogetdoc yields the proper results:
What is the best way to proceed? Should I file an issue against godef? Are there other debugging steps that I can take? |
Thanks for the clarification @josh-tepper |
@ramya-rao-a, Thank you in advance! |
@josh-tepper Can you share a sample code? We did have issues with godef and structs and certain packages. Do you see this issue for all code? Say a simple Unfortunately, I don't have any godef contact. But adding sample code in the issue you created in godef should help as well. Also, do try updating your |
@ramya-rao-a I dug into this a little as it was affecting me as well. It looks like godef has 2 current problems (one has an outstanding pull request).
|
@jwendel Your second note on the |
This is the code error: Notice it's an import in interface_bsd to the package: https://github.com/golang/net/tree/master/route |
@ramya-rao-a This is a generic problem with VSCode and not confined to the just the Go lang. This is happening to me in the Angular 2 Typescript code. So I would alert the VSCode team of this problem. Initially upon loading, it works a few times, and then it starts displaying 'Loading.' message. |
Typescript and javascript support comes out of the box in VS Code. Therefore, please do log an issue in the VS Code repo https://github.com/Microsoft/vscode for the issue you are seeing for the typescript code. For all other languages, features like Peek definition and Hover are implemented via extensions. The "loading.." is shown when the extension doesnt get back to VS Code in time with data for Hover or Peek Definition feature. |
Closing this issue, as multiple have been logged against We are looking at other options for implementing the features that depend on |
Same thing here, I am on latest |
@kuncevic Can you try using the new language server feature? Set |
@kuncevic What version of the Go extension are you using? |
I saw the same issue -- that go to def, find refs, etc. stop working after some period of time, and this behavior started when I switched go.useLanguageServer to true. Unlike kuncevic, I did not experience it beforehand (I was previously using gogetdoc). Restarting resolves, but this happens consistently and often. I'm running the 0.6.55 version of the extension on vscode 1.10.2. Let me know if there is anything else you need. The lang server was significantly faster than gogetdoc which I used because godef is broken. Nonetheless, when useLanguageServer is true, the tooling stops working after only 30min so I can't really use this configuration. |
Thanks for reporting @josh-tepper , we will track this in a separate issue #853 |
@ramya-rao-a ahhh, and I am not using the go extension, I have same issue with the |
Go to declaration/definition is in some cases not working. It's not clear to me when it does and does not work.
When it doesn't work, nothing happens when I press f12. It always seems to happen when I want to jump to a function in another package, but in some cases this does work. In the cases where it works, it always works, and in the cases where it doesn't, it never seems to work.
This seems to have started happening in the last couple of months.
What debug information is needed to diagnose this?
The text was updated successfully, but these errors were encountered: