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/stringer: compile error "undefined: defaultImporter" on go1.10 #27094

Closed
temoto opened this issue Aug 20, 2018 · 2 comments
Closed

Comments

@temoto
Copy link

temoto commented Aug 20, 2018

Please answer these questions before submitting your issue. Thanks!

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

go version go1.10.3 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/temoto/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/temoto"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10.3/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/5s/j0nv22m55090n3x2h_pc17s80000gn/T/go-build087445163=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

go get -u golang.org/x/tools/cmd/stringer && echo ok

What did you expect to see?

ok

What did you see instead?

# golang.org/x/tools/cmd/stringer
../../../../src/golang.org/x/tools/cmd/stringer/stringer.go:286:21: undefined: defaultImporter
@gopherbot gopherbot added this to the Unreleased milestone Aug 20, 2018
@mvdan
Copy link
Member

mvdan commented Aug 20, 2018

Are you positive that you're on Go 1.10 and you're building a clean checkout of stringer? It builds fine for me on both 1.10.3 and tip, with x/tools at commit 7d1dc997617fb662918b6ea95efc19faa87e1cf8.

@temoto
Copy link
Author

temoto commented Aug 20, 2018

Thank you. Fixed with rm -rf $GOPATH/src/golang.org

@temoto temoto closed this as completed Aug 20, 2018
@golang golang locked and limited conversation to collaborators Aug 20, 2019
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

3 participants