Skip to content

x/tools/cmd/goimports: rewrites imports to include vendored folder in go1.7 #17034

@toli

Description

@toli

Please answer these questions before submitting your issue. Thanks!

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

go version go1.7.1 darwin/amd64

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

MacOSX 10.11.6
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/toli/dev/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/z2/gkdbnz8x0bd0yr2l93lny7c40000gn/T/go-build827522954=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
had an imports line that was rewritten to include same package from vendor directory

imports(
-       "gopkg.in/dancannon/gorethink.v2"
+       "github.com/docker/dhe-deploy/vendor/gopkg.in/dancannon/gorethink.v2"
)

What did you expect to see?

No imports rewrites i this case at all; and specifically not changing it to a /vendor/ location

What did you see instead?

  •   "github.com/docker/dhe-deploy/vendor/gopkg.in/dancannon/gorethink.v2"
    

This happens on a number of packages, not just the one above and in a number of files

Didn't see this until upgraded from go 1.6 to go 1.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions