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
x/tools/cmd/godoc: not populating Standard Library section #27162
Comments
Got it. This only happens when the resolved GOROOT is not equal to the But unfortunately, my code which splits the package listing to standard library and others still use |
Change https://golang.org/cl/130796 mentions this issue: |
Change https://golang.org/cl/131035 mentions this issue: |
The logic to determine whether a filesystem root was in GOROOT or GOPATH still relied on runtime.GOROOT(), whereas cmd/godoc was updated to copy the goroot finding logic from standard library. Hence, godoc is unable to determine if a filesystem is in GOROOT or not when the binary is outside runtime.GOROOT(). So we expose a new variable and set that from cmd/godoc to avoid copying the logic again for the 3rd time. Fixes golang/go#27162 Change-Id: I160dcdbdd262e671f09f7bf01c329be5eac280ad Reviewed-on: https://go-review.googlesource.com/130796 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> (cherry picked from commit b43ba4d) Reviewed-on: https://go-review.googlesource.com/131035 Reviewed-by: Agniva De Sarker <agniva.quicksilver@gmail.com>
This does not appear to be fixed: https://godoc-test.golang.org/pkg/ |
Never mind. Our GAE instance is not running the version we want :/ |
What version of Go are you using (
go version
)?go version go1.11rc1 linux/amd64
Does this issue reproduce with the latest release?
Have not tried on tip
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jmwendel/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jmwendel/go"
GOPROXY=""
GORACE=""
GOROOT="/home/jmwendel/bin/go"
GOTMPDIR=""
GOTOOLDIR="/home/jmwendel/bin/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build346682857=/tmp/go-build -gno-record-gcc-switches"
What did you do?
Ran this command:
$ godoc -http=":6060"
When I visit http://localhost:6060/pkg/, the "Standard Library" section is empty.
I completely cleared out my $GOPATH to be sure nothing in there got in the way.
output from godoc -v when loaded:
$ godoc -http=":6060" -v
2018/08/22 22:57:01 Go Documentation Server
2018/08/22 22:57:01 version = go1.11rc1
2018/08/22 22:57:01 address = :6060
2018/08/22 22:57:01 goroot = /home/jmwendel/bin/go
2018/08/22 22:57:01 tabwidth = 4
2018/08/22 22:57:01 search index disabled
name space {
/:
gated(os(/home/jmwendel/bin/go), 20) /
/lib/godoc:
mapfs /
/src:
gated(os(/home/jmwendel/bin/go), 20) /src
gated(os(/home/jmwendel/go), 20) /src
}
2018/08/22 22:57:01 starting HTTP server
2018/08/22 22:57:01 Error parsing /test/fixedbugs/bug050.go: /test/fixedbugs/bug050.go:7:1: expected 'package', found 'func'
2018/08/22 22:57:01 Error parsing /test/fixedbugs/bug088.go: /test/fixedbugs/bug088.go:7:1: expected 'package', found ignored
2018/08/22 22:57:01 Error parsing /test/fixedbugs/bug106.go: /test/fixedbugs/bug106.go:7:1: expected 'package', found ignored
2018/08/22 22:57:01 Error parsing /test/fixedbugs/bug222.go: /test/fixedbugs/bug222.go:7:1: expected 'package', found ignored
2018/08/22 22:57:01 Error parsing /test/fixedbugs/bug282.go: /test/fixedbugs/bug282.go:7:1: expected 'package', found ignored
2018/08/22 22:57:01 Error parsing /test/fixedbugs/bug306.go: /test/fixedbugs/bug306.go:7:1: expected 'package', found ignored
2018/08/22 22:57:01 Error parsing /test/fixedbugs/issue13266.go: /test/fixedbugs/issue13266.go:10:8: expected 'IDENT', found '%'
2018/08/22 22:57:01 Error parsing /test/fixedbugs/issue14164.go: /test/fixedbugs/issue14164.go:7:1: expected 'package', found ignored
2018/08/22 22:57:01 Error parsing /test/fixedbugs/issue24801.go: /test/fixedbugs/issue24801.go:5:51: expected 'package', found 'EOF'
2018/08/22 22:57:01 Error parsing /test/fixedbugs/issue4776.go: /test/fixedbugs/issue4776.go:9:1: expected 'package', found 'type'
What did you expect to see?
I'd expect to see all of the standard library docs listed there. When testing with godoc 1.10.3, the standard library docs are shown.
What did you see instead?
None of the standard library docs.
The text was updated successfully, but these errors were encountered: