Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Replace godef with guru #348

Closed

Conversation

ironcladlou
Copy link
Contributor

Replace the godef command with guru. The guru tool offers
improved definition lookups which are compatible with Go 1.5+
vendoring. Performance seems to be comparable.

This eliminates godef as a vscode-go dependency.

Replace the `godef` command with `guru`. The `guru` tool offers
improved definition lookups which are compatible with Go 1.5+
vendoring. Performance seems to be comparable.

This eliminates `godef` as a vscode-go dependency.
@ironcladlou
Copy link
Contributor Author

ironcladlou commented Jun 3, 2016

@lukehoban I was in a hurry to get this working. If you like the idea, please give the factoring some review- I'm sure it could be improved.

@lukehoban
Copy link
Member

lukehoban commented Jun 7, 2016

I love the idea of centralizing more of these features onto guru. However, currently, the results seem to be meaningfully less helpful.

For example - hovering a variable shows var p instead of p *Page. Hovering a function shows func renderTemplate instead of renderTemplate func(w http.ResponseWriter, tmp string, p *Page). And similar for many other kinds of Go objects. Oddly though, for types from the standard library, results are delivered slower, but are a lot richer - such as func net/http.Redirect(w net/http.ResponseWriter, r *net/http.Request, urlStr string, code int).

Not sure if these results are intentional for guru or something that will be improved. But I don't think we'd want to regress the common case of hovering behaviour in the current state.

@ironcladlou
Copy link
Contributor Author

I've also noticed that kind of stuff over the past few days but haven't investigated further. In the short term I prefer better go-to-definition support and so don't mind the hover regressions, but I agree we shouldn't switch without a solution. I'll see if I can come up with something.

@hickeng
Copy link

hickeng commented Jun 14, 2016

I honestly think I'd chose to have Find All References working again with Go 1.6 over the richer types, but maybe that's only because I've not experienced it. Do you know if there's a workaround to support that function in the interim?

@jboelter
Copy link

jboelter commented Jul 14, 2016

I"m encountering a bug with godef that also led me down this path. If guru is not as information rich vs godef we can ask Alan for some enhancements. Guru has some other features that look interesting also (whicherrors, implements, peers)

rogpeppe/godef#40 with godef.

@ironcladlou
Copy link
Contributor Author

I'd like to close this PR. godef now supports vendoring and is significantly faster.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants