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

Build tags breaks go to definition and other features #1024

Closed
inancgumus opened this issue Jun 8, 2017 · 11 comments
Closed

Build tags breaks go to definition and other features #1024

inancgumus opened this issue Jun 8, 2017 · 11 comments
Labels

Comments

@inancgumus
Copy link

When I add a build tag on top of a file, vscode-go go to definition and mouse over peak functionality breaks.

When I remove it, it works again.

// +build integration

See this:

vscodegobug

@inancgumus inancgumus changed the title Build tags breakes go to definition and others functionality Build tags breaks go to definition and others functionality Jun 8, 2017
@inancgumus inancgumus changed the title Build tags breaks go to definition and others functionality Build tags breaks go to definition and other features Jun 8, 2017
@ramya-rao-a
Copy link
Contributor

@inancgumus Do you have the language server turned on?

@inancgumus
Copy link
Author

inancgumus commented Jun 9, 2017

Do you mean this? If so, I'll try it.

What do you think about why this happens when I add a build tag? Even because of the lang-server. Because, it works w/out build tags.

@ramya-rao-a
Copy link
Contributor

We have 3 different ways of providing the definition information

  • go.docsTool is set to godoc (default)
  • go.docsTool is set to gogetdoc
  • go.useLanguageServeris set totrue`

I was trying to see which one of the above categories does your scenario fall into.

I can repro this issue in the second and third case but not the first.

cc @zmb3 for gogetdoc and @slimsag for the language server

@zmb3
Copy link
Contributor

zmb3 commented Jun 9, 2017

This makes a lot of sense. Feel free to file an issue at github.com/zmb3/gogetdoc for build tag support and I will look to add a way to provide build tags to the tool.

I can repro this issue in the second and third case but not the first.

In the first case, how are you actually getting definition information? I wasn't aware that godoc spits that out.

@ramya-rao-a
Copy link
Contributor

@zmb3 its godef that gives the definition info

When I added the setting to choose between default implementation (godef + godoc) and gogetdoc, I couldnt come up with a better name than go.docsTool and since it says "docstool", the options were godoc and gogetdoc :)

@ramya-rao-a
Copy link
Contributor

Logged an issue for gogetdoc and the language server and closing this issue

@ramya-rao-a
Copy link
Contributor

Re-opening to absorb the changes done in gogetdoc

@inancgumus
Copy link
Author

@ramya-rao-a I couldn't see the absorbed changes from gogetdoc?

@ramya-rao-a
Copy link
Contributor

I am yet to release an update (should be out in the next few days).
You will see the changes then.

@ramya-rao-a
Copy link
Contributor

go.buildTags will now be honored when using the Go to definition feature in the latest update (0.6.63) to the Go extension

@inancgumus
Copy link
Author

@ramya-rao-a That's perfect, thanks!

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants