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

x/tools/cmd/guru: describe on os/file.go fails #18992

Closed
darren opened this issue Feb 8, 2017 · 2 comments
Closed

x/tools/cmd/guru: describe on os/file.go fails #18992

darren opened this issue Feb 8, 2017 · 2 comments

Comments

@darren
Copy link

darren commented Feb 8, 2017

What version of Go are you using (go version)?

go version go1.7.5 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/darren/Sources/go"
GORACE=""
GOROOT="/Users/darren/.local/go1.7.5"
GOTOOLDIR="/Users/darren/.local/go1.7.5/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/s0/xbktqfg94z35r7hf01wx11dc0000gn/T/go-build825769959=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

$ cd /usr/local/go
$ git show
commit 0c9325e
$ guru describe src/os/file.go:#4115

What did you expect to see?

should print the the syntax at offset 4115

What did you see instead?

/usr/local/go/src/os/file.go:120.11-120.17: selector of type invalid type

@bradfitz bradfitz added this to the Unreleased milestone Feb 8, 2017
@bradfitz bradfitz changed the title guru: describe on os/file.go fails x/tools/cmd/guru: describe on os/file.go fails Feb 8, 2017
@darren
Copy link
Author

darren commented Feb 9, 2017

I see what the problem is: it's because GOROOT does not point to /usr/local/go!

@darren darren closed this as completed Feb 9, 2017
@alandonovan
Copy link
Contributor

FYI: Go users rarely need to set GOROOT. When you build the Go standard library, the runtime package embeds the value of $GOROOT, so the 'go' command and other tools can find the source tree without further information, so long as you didn't move it.

Glad you solved your problem.

@golang golang locked and limited conversation to collaborators Feb 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants