-
Notifications
You must be signed in to change notification settings - Fork 645
"Go to Definition" not working with gogetdoc for stdlib in Go module mode #2213
Comments
It works as expected for me though in my setup I have a Can you ensure you have the latest version of If you still have issues, also do try running cc @zmb3 |
Seems like Input: Output: |
And yeah, I confirm that Input: Output:
|
I've created new issue in the |
@ramya-rao-a related question - does Go extension autodetect the presence of |
@nezorflame Great findings! I'll close this issue as we have an upstream one in the gogetdoc repo to track the problem.
Yes. |
When the fix makes it into the gogetdoc repo, remember to update your version of the tool by using the |
Note that there isn't a separate module-aware version of gogetdoc - it should just work with both modules and the traditional GOPATH setup. A few follow up questions for you @ramya-rao-a. The thing that's new now is the working directory absolutely matters, as the go tool will use this to look for the go.mod. Does vs-code set the working directory to the project directory when invoking gogetdoc? Is vs-code explicitly setting Edit: discovered that |
Not yet. We do this for
No. Do we need to? |
Pushed a commit to set the current project as working directory when calling gogetdoc |
Perfect, this should work as soon as I get an update for gogetdoc out. 👍 |
@ramya-rao-a @zmb3 it seems that the issue is resolved now with the latest beta of extension and latest |
Thanks @nezorflame, @zmb3! |
Still not working. I deleted my Go plugin and $HOME/go folder then re-installed the plugin and analysis tools. The tool works once or twice and then seems to get lost in the directory structure. There is an easy fix, just copy a version of the gogetdoc binary from November into $HOME/go/bin and then everything is fine after killing old gogetdoc processes |
@leakyshoe Please log a new issue with exact repro steps with a sample code, so that we can investigate the problem. |
Go to Definition
feature seems to be broken while browsing inside the stdlib while usinggogetdoc
as thedocsTool
.This doesn't happen with
godoc
, but sincegodoc
doesn't show the description, would be nice to getgogetdoc
working.Setup:
GO111MODULE=on
(system-wide)"go.docsTool": "gogetdoc"
set in VSCode settingsExample code
Steps to Reproduce:
Println
->Go to Definition
Expected: IDE should redirect you to the
fmt/print.go:263
lineGot: Redirected successfully (although kinda slow).
Fprintln
->Go to Definition
Expected: IDE should redirect you to the
fmt/print.go:252
lineGot: Error
Definition for "Fprintln" not found
The text was updated successfully, but these errors were encountered: