-
Notifications
You must be signed in to change notification settings - Fork 10
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
If glide.lock package has empty subpackages, glide-vc cleans subdirs of the repo. #20
Comments
@chancez Thinking about this I'm not sure that no subpackages in glide.lock means that all the subpackages should be kept. I think that only the root packages should be kept (like glide-vc is doing now) and the glide.lock should always contain every needed subpackage. Sorry but I'm a little bit in an hurry and hadn't time to verify/test this. Do you have a simple reproducer? (or I'll try it tomorrow). |
@sgotti If no subpackages are listed, glide includes the entire repo into the vendor directory. This is easy, add the following snippets above to any glide.lock and run glide.install, you'll see it installs all of the packages within github.com/coreos/pkg into vendor. If you use glide-vc you'll see nothing is kept. |
@chancez glide always includes the full repository in the vendor directory (see also the glide-vc readme and this post: http://engineeredweb.com/blog/2016/go-why-not-strip-unused-pkgs/), that's the reason why glide-vc was born (to remove unneeded packages). So (but will verify this tomorrow) if a subpackage is not listed in glide.lock this means that glide doesn't consider it as needed. If you have a specific problem and a simple repository with a glide.yaml I could test it. You can also use |
Hmm let me think about this more. |
Ex given a glide.lock (not complete, trimmed to demonstrate):
Glide-vc will clean all things that are not
github.com/coreos/pkg/flagutil
as expected:Given the following glide.lock I would expect every subpackage in
github.com/coreos/pkg
to be retained:However, it won't keep any packages within
github.com/coreos/pkg
in this case:Using
--keep
has no useful effect here.The text was updated successfully, but these errors were encountered: