-
Notifications
You must be signed in to change notification settings - Fork 9
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
Enhancement: purge unused dependencies #6
Comments
Thanks for the suggestion, seems like a good feature to have. I'll see if I can get something going soon. |
This turned out to be a bit tricky, since currently wgo doesn't really differentiate between code in W/vendor/src/ and W/src/, it just happens that one of those is listed first, and therefore gets things that are fetched with 'wgo get' or 'wgo save/restore'. I'm planning on making the roles of vendor/src and src more explicit. To do so, I'm in the process of hashing out a standalone "workspace spec" with dave cheney. Once that's set, I'll move it into wgo and address this issue. |
Any updates on that feature? |
Thanks for the ping. I took another look today. The issue remaining for me is how to handle internal vendor dirs... Now that the location of the source you import depends on the location of the source importing it, things become a lot harder to deal with :( It looks like I need to recursively trace through all the imports myself (or wgo's self) instead of the simple "go list -f '{{.Deps}}' ./...". Blargh. |
Ok, added the feature. Let me know what you think, and if everything looks good I'll close this issue. |
That was quick! Seems to work. I vendored a package that itself has subpackages. Added a couple more that I don't use. That's a productivity boost. Thanks! |
I recently evaluated gb and
wgo
for a new Go project at my company (our first). We chosewgo
due to thewgo restore
command (we wanted to.gitignore
thevendor/src
folder).One thing I really liked about
gb
was thegb vendor purge
command, which "purges all unreferenced dependencies". As we're feeling our way through learning the ecosystem and evaluating competing libraries, I've already had to manually purge a couple of dependencies fromvendor.json
. It's easy enough to do manually, but it would be a nice addition towgo
.Thanks!
The text was updated successfully, but these errors were encountered: