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

gopkgs should also list the dependencies in the vendor directory #10

Closed
untra opened this issue Sep 27, 2018 · 2 comments
Closed

gopkgs should also list the dependencies in the vendor directory #10

untra opened this issue Sep 27, 2018 · 2 comments

Comments

@untra
Copy link

untra commented Sep 27, 2018

Feature Request:
Certain go package management systems such as dep or glide have a vendor directory in the project repo which will contain the dependencies relevant to a project.

In order to address this vscode-go bug , gopkgs should be able to list the contents of the local vendor directory, if it exists.

User Story

As a user of vscode
I would like my vendor dependencies to be listed as available imports
when I run gopkgs in a repo with a vendor folder
dependencies in the vendor folder should be included in the listed output.

@uudashr
Copy link
Owner

uudashr commented Sep 27, 2018

It is already supported.

If you have some project/package contains vendor on the GOPATH, try to execute

gopkgs |grep vendor

It should shows some of the vendor dependencies

@untra
Copy link
Author

untra commented Sep 27, 2018

I tested this on a few other different repos and saw it does indeed pick up the repos in the vendor folder, but not in my own personal project.

after some research I believe this might be the issue for me:

https://github.com/uudashr/gopkgs/blob/master/gopkgs.go#L120-L123

My repo with a vendor directory is stored by symlink in my gopath, and yeah, following symlinks with golang is tricky. That is likely why gopkgs can't find my vendor'd resources then 🤔

but if I cd into my repo (not through the symlink in my gopath), I can't seem to use gopkgs -workDir={"echo pwd"} to tell it to look there for my working dir. Maybe I'm getting the syntax wrong on the -workDir parameter?

thanks for your help 👍

@uudashr uudashr closed this as completed Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants