Import errors
maddyblue opened this issue · 4 comments
It seems that if my package imports a 3rd-party (i.e., not standard lib) package, the importer can't handle it:
$ cd $GOPATH/src/code.google.com/p/go.tools/imports
$ gen
error: fix.go:19:2: could not import code.google.com/p/go.tools/astutil (can't find import: code.google.com/p/go.tools/astutil)
Hmm, no repro in a quick test here. I wonder if there’s a version issue or something.
I was using 1.2.1 on a mac. May also be related to environment variables
and $GOPATH.
On Sat, Apr 19, 2014 at 4:30 PM, Matt Sherman notifications@github.comwrote:
Hmm, no repro in a quick test here. I wonder if there’s a version issue or
something.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/43#issuecomment-40879826
.
Could you go get -u github.com/clipperhouse/gen
and try again? At first I could not repro this (linux amd64 1.2), but after I updated both go and all the packages gen depends on, I could repro. Maybe a recent change in the go.tools library?
confirmed that it does not import with golang version 1.1.2. upgraded to 1.2.1 and no problems
$ go version
go version go1.1.2 linux/amd64
$ go get github.com/clipperhouse/gen
# code.google.com/p/go.tools/go/types
src/code.google.com/p/go.tools/go/types/exprstring.go:80: x.Slice3 undefined (type *ast.SliceExpr has no field or method Slice3)
src/code.google.com/p/go.tools/go/types/exprstring.go:82: x.Max undefined (type *ast.SliceExpr has no field or method Max)
src/code.google.com/p/go.tools/go/types/exprstring.go:83: x.Max undefined (type *ast.SliceExpr has no field or method Max)