FS#50147 - [go-tools] add godoc

Attached to Project: Community Packages
Opened by Andrew Gallant (burntsushi) - Monday, 25 July 2016, 11:12 GMT
Last edited by Alexander F. Rødseth (xyproto) - Friday, 29 July 2016, 22:18 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Pierre Neidhardt (Ambrevar)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

godoc was recently removed from the go-tools project: https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/go&id=9cb9b8a75bc2fc85aa8e707921f1daefccb07f95

I think godoc should be added back to the package. In particular, "godoc" and "go doc" are not the same tool. For example, "godoc" is capable of running an HTTP server that serves HTML documentation of all local packages. The "go doc" tool does not have a built-in HTTP server.
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Friday, 29 July 2016, 22:18 GMT
Reason for closing:  Fixed
Additional comments about closing:  Added godoc, but the godoc test still fails in a chroot.
Comment by Alexander F. Rødseth (xyproto) - Thursday, 28 July 2016, 09:38 GMT
Thanks for reporting. I fully agree.

The problem is that the test suite for go 1.6.3 stopped working (if godoc is included). The choice was between disabling all the tests or temporarily dropping godoc. Both choices are sub-optimal. It might have been better to disable the tests.

Since 1.6.3 is a security release, it was important to release it quickly, so a quick choice was made.

The ideal solution is that the go tests are fixed.
Comment by Andrew Gallant (burntsushi) - Thursday, 28 July 2016, 10:42 GMT
Oh interesting! I agree that there wasn't an obvious answer and thank you for the quick fix. :-) I do think though that godoc is a critical tool. Usually it would be easy to work around this with `go get`, but `godoc` is special cased in the go tool such that `go get`ing it tries to install it into GOROOT, which means you need to run it with sudo in a default Arch install. (This should be fixed in Go 1.7 with the removal of the special case, see: https://github.com/golang/go/commit/5b3e5766bcc5e1090d0512a5916886ffc24ab246)

I was able to build `go-tools` locally with `godoc` support added back in, though I don't remember seeing any failing tests. Is there a bug filed upstream for the failing tests?
Comment by Alexander F. Rødseth (xyproto) - Thursday, 28 July 2016, 11:25 GMT
The tests only fails when building in a chroot. I have not filed a bug upstream yet, please do so if you have the occasion.
Comment by Doug Newgard (Scimmia) - Friday, 29 July 2016, 03:47 GMT
Why not just use go doc in the mean time? You can't be that dependent on a pretty webpage to simply get documentation.

Loading...