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/goimports: rewrites imports to include vendored folder in go1.7 #17034

Closed
toli opened this issue Sep 9, 2016 · 2 comments
Closed

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

toli opened this issue Sep 9, 2016 · 2 comments

Comments

@toli
Copy link

@toli toli commented Sep 9, 2016

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

@toli toli changed the title Goimports tool rewrites imports to include vendored folder instead in 1.7 Goimports tool rewrites imports to include vendored folder in go1.7 Sep 9, 2016
@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Sep 9, 2016

Goimports doesn't come with Go, and has nothing to do with Go 1.6 vs Go 1.7.

Can you update your goimports binary and confirm you still see this behavior?

@bradfitz bradfitz changed the title Goimports tool rewrites imports to include vendored folder in go1.7 x/tools/cmd/goimports: rewrites imports to include vendored folder in go1.7 Sep 9, 2016
@bradfitz bradfitz added this to the Unreleased milestone Sep 9, 2016
@toli
Copy link
Author

@toli toli commented Sep 9, 2016

Update fixed everything. guess lots changed in the past X months since i installed it.

thanks a lot for pointing me to (obviously, i should've done it myself first) the solution

@toli toli closed this Sep 9, 2016
@golang golang locked and limited conversation to collaborators Sep 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.