-
Notifications
You must be signed in to change notification settings - Fork 18k
x/tools/cmd/goimports: support vendor directories #13644
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
Comments
Also disabling goimports for now. See golang/go#13644.
excited about this feature landing :) (trying to move a bunch of code to subpackages) |
just mirroring here in case people don't look at the gerrit review, here's a patch on top of that review that gets goimports and vim-go working together again https://gist.github.com/termie/34326bd29e89565c95fa |
Thanks for the patch @termie it works fine for me. |
This may be a duplicate of #10339. |
@pwaller not quite. #10339 predates the vendoring support in the Go tool; it is about choosing Once CL 17728 is merged both this issue and #10339 should probably be closed. |
I think this is fixed by https://go-review.googlesource.com/#/c/17728/ |
Regarding this issue I think I found another code path that wasn't considering packages inside The problem happens when the vendored package name is different from the base import path. |
@cezarsa what else need to be done to have your patch merged? |
Please, any news on this ? |
Looks to me it was fixed by the mentioned CL, which was merged.
|
This was fixed some time ago. |
#12278 was originally about this, but was changed to be about go/build.
go/build and x/tools/go/loader now know about vendor directories, but there is more work to do to make goimports add the correct paths.
When working on
$GOPATH/src/a
that vendorsb
, instead of adding the (disallowed) import"a/vendor/b"
, goimports should add"b"
.The text was updated successfully, but these errors were encountered: