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: undefined error running go get golang.org/x/tools #25872

Closed
aledbf opened this issue Jun 13, 2018 · 10 comments
Closed

x/tools: undefined error running go get golang.org/x/tools #25872

aledbf opened this issue Jun 13, 2018 · 10 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Soon This needs to be done soon. (regressions, serious bugs, outages)
Milestone

Comments

@aledbf
Copy link

aledbf commented Jun 13, 2018

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

go version go1.10.3 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

docker run golang:1.10.3 sh -c "go env "
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build620362171=/tmp/go-build -gno-record-gcc-switches"

What did you do?

docker run golang:1.10.3 sh -c "go get -u golang.org/x/tools/..."
# golang.org/x/tools/go/internal/gccgoimporter
src/golang.org/x/tools/go/internal/gccgoimporter/parser.go:605:9: undefined: types.NewInterface2
# golang.org/x/tools/go/internal/gcimporter
src/golang.org/x/tools/go/internal/gcimporter/bimport.go:541:8: undefined: types.NewInterface2
src/golang.org/x/tools/go/internal/gcimporter/iimport.go:540:10: undefined: types.NewInterface2
docker run golang:1.10.3 sh -c "go get -u golang.org/x/tools/..."
# golang.org/x/tools/go/internal/gccgoimporter
src/golang.org/x/tools/go/internal/gccgoimporter/parser.go:605:9: undefined: types.NewInterface2
# golang.org/x/tools/go/internal/gcimporter
src/golang.org/x/tools/go/internal/gcimporter/bimport.go:541:8: undefined: types.NewInterface2
src/golang.org/x/tools/go/internal/gcimporter/iimport.go:540:10: undefined: types.NewInterface2

What did you expect to see?

Successful go get execution

What did you see instead?

# golang.org/x/tools/go/internal/gccgoimporter
src/golang.org/x/tools/go/internal/gccgoimporter/parser.go:605:9: undefined: types.NewInterface2
# golang.org/x/tools/go/internal/gcimporter
src/golang.org/x/tools/go/internal/gcimporter/bimport.go:541:8: undefined: types.NewInterface2
src/golang.org/x/tools/go/internal/gcimporter/iimport.go:540:10: undefined: types.NewInterface2
@aledbf aledbf changed the title x/tools undefined error running go get golang.org/x/tools x/tools: undefined error running go get golang.org/x/tools Jun 13, 2018
@gopherbot gopherbot added this to the Unreleased milestone Jun 13, 2018
@aledbf
Copy link
Author

aledbf commented Jun 13, 2018

I think this change was introduced here https://go-review.googlesource.com/#/c/114317/ and here golang/tools@9a70f1f

aledbf added a commit to aledbf/ingress-nginx that referenced this issue Jun 13, 2018
aledbf added a commit to aledbf/ingress-nginx that referenced this issue Jun 13, 2018
aledbf added a commit to aledbf/ingress-nginx that referenced this issue Jun 13, 2018
aledbf added a commit to aledbf/ingress-nginx that referenced this issue Jun 13, 2018
aledbf added a commit to aledbf/ingress-nginx that referenced this issue Jun 13, 2018
mdittmer added a commit to web-platform-tests/wpt.fyi that referenced this issue Jun 13, 2018
@dballard
Copy link

dballard commented Jun 13, 2018

Our automated build system is now also breaking on import

+ go get -u github.com/golang/lint/golint
# golang.org/x/tools/go/internal/gcimporter
src/golang.org/x/tools/go/internal/gcimporter/bimport.go:541:8: undefined: types.NewInterface2
src/golang.org/x/tools/go/internal/gcimporter/iimport.go:540:10: undefined: types.NewInterface2

@agnivade
Copy link
Contributor

Confirmed. /cc @griesemer.

@achew22
Copy link
Contributor

achew22 commented Jun 13, 2018

I'm also getting a failure on this

$ go get github.com/golang/lint/golint
# golang.org/x/tools/go/internal/gcimporter
../../../golang.org/x/tools/go/internal/gcimporter/bimport.go:541:8: undefined: types.NewInterface2
../../../golang.org/x/tools/go/internal/gcimporter/iimport.go:540:10: undefined: types.NewInterface2

@agnivade agnivade added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Soon This needs to be done soon. (regressions, serious bugs, outages) labels Jun 13, 2018
@b5
Copy link

b5 commented Jun 13, 2018

Given that a number of us are coming across the same problem, let's be nice to the maintainers and not post confirmations unless we have constructive info that'll help them put out the fire 😄. Also, it's great to see so many of us are using golint!

@rameshthoomu
Copy link

Same issue here. Any ETA on the fix?

00:01:41.677 # golang.org/x/tools/go/internal/gcimporter
00:01:41.677 /opt/gotools/obj/src/golang.org/x/tools/go/internal/gcimporter/bimport.go:541:8: undefined: types.NewInterface2
00:01:41.677 /opt/gotools/obj/src/golang.org/x/tools/go/internal/gcimporter/iimport.go:540:10: undefined: types.NewInterface2
00:01:41.729 gotools.mk:53: recipe for target 'gotool.golint' failed

@griesemer
Copy link
Contributor

working on it

@griesemer griesemer self-assigned this Jun 13, 2018
@griesemer
Copy link
Contributor

See golang/lint#402.

@griesemer griesemer added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Jun 13, 2018
@griesemer
Copy link
Contributor

All: Apologies for all this.

Post-mortem: Late last night (with emphasis on "late") I created a larger CL in an attempt to finally update x/tools with all the latest fixes and changes that we've made to the various importers in the std lib. This also included fixes to go/types and new tests. The CL was approved and passed all (1.11) tests and I submitted it somewhat in a rush this morning while running out of the door, not thinking abut pre-1.11 builds. As we all saw, the non-1.11 builds failed quickly, and with it tools such as lint that depend on go/types. It was "obvious" what needed to be fixed (the go/types.NewInterface2 call is missing pre-1.11). While submitting that fix, I missed a couple of places (sigh), and also the fact that Interface.EmbeddedType was new as well. Finally, some of the new tests don't pass at all pre-1.11 due to larger fixes in go/types. I've split up the code into version-tagged files and I believe it works now. The primary reason for having these problems in the first place (and not fixing it all with a single CL) is that I relied on the builders to test non-1.11 versions for "expediency" (I hoped to get around installing a pre-1.11 setup on my new laptop while on the go.) Lesson (re-)learned.

I still see a build failure for 1.9 but it is unrelated to the importers.

Please confirm this is now working again and close if so. Thanks.

@griesemer
Copy link
Contributor

golang/lint#402 has been confirmed as fixed; this is the same issue. Closing.

fmejia97 pushed a commit to Shopify/ingress that referenced this issue Jun 18, 2018
@golang golang locked and limited conversation to collaborators Jul 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Soon This needs to be done soon. (regressions, serious bugs, outages)
Projects
None yet
Development

No branches or pull requests

8 participants