Skip to content
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

:GoInstallBinaries now installs godoc as well. #643

Closed
wants to merge 1 commit into from
Closed

:GoInstallBinaries now installs godoc as well. #643

wants to merge 1 commit into from

Conversation

smarnv
Copy link

@smarnv smarnv commented Dec 4, 2015

Otherwise the built-in :GoDoc command doesn't work if you try to bootstrap the necessary Go packages only by using :GoInstallBinaries from inside Vim.

@bhcleek
Copy link
Collaborator

bhcleek commented Dec 16, 2015

godoc is one of the commands that ships with Go and shouldn't need to be installed with :GoInstallBinaries.

@smarnv
Copy link
Author

smarnv commented Dec 29, 2015

Sure, I have go doc in the console after I installed the golang Debian package with its dependencies, but still, when I bootstrap vim-go and call :GoDoc from within Vim, I get the following error message:

godoc command not found.
  install with: go get golang.org/x/tools/cmd/godoc

... which basically renders its usage pointless if you don't want to manually create shell aliases. The very idea of :GoInstallBinaries should be to prevent such errors and to make vim-go self-sufficient, right?

@bhcleek
Copy link
Collaborator

bhcleek commented Dec 30, 2015

godoc is included in the tarballs in bin/. Unlike all the other tools installed by :GoInstallBinaries, it's included with the official distributions of Go. I don't have a Debian system readily available. Are you sure it didn't put godoc in dirname $(which go)?

@smarnv
Copy link
Author

smarnv commented Dec 31, 2015

Absolutely, the only Go-related executables I get after running ls $(dirname $(which go)) | grep ^go are go and gofmt. That's why I am saying that apparently godoc isn't necessarily part of the Go distribution itself as I thought previously – which made me do this pull request in the first place.

However, I am still quite new to the Go ecosystem, so I am not sure whether godoc and go doc are the same thing or not. When I do go help I get a suggestion that doc is a possible command for go command [arguments] and I can actually do go doc inside a folder with Go source files and it runs without an error (but no output since I don't know yet what am I supposed to enter in the source files, so that I get some output from it).

@simar7
Copy link

simar7 commented Dec 31, 2015

On aptitude this package is golang-go.tools

@smarnv
Copy link
Author

smarnv commented Jan 7, 2016

@MilkChunk, the package depends on golang-doc, so I obviously have it installed. As already said, I have go doc that works properly, but I didn't have godoc which I wasn't sure why Vim-go is calling since I didn't know it was included in the official binary packages; thanks for letting me know that!

However, I found out that even when installing from source, you have to install additional tools manually from the the go.tools repository, so that's why the Debian packages are separated. Thanks @simar7 for mentioning this; but the package golang-go.tools is transitional for golang-golang-x-tools (for future reference if others on Debian-based systems have to refer to this issue).

@smarnv smarnv closed this Jan 7, 2016
@smarnv smarnv deleted the fix-install-godoc branch January 7, 2016 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants