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

Switch from godep to glide #319

Merged
merged 3 commits into from
Dec 16, 2016
Merged

Switch from godep to glide #319

merged 3 commits into from
Dec 16, 2016

Conversation

kadel
Copy link
Member

@kadel kadel commented Nov 30, 2016

fixed #314

I tried to use Glide instead of Godep, setting up was surprisingly easy.
With only one catch: You need to run glide update with --strip-vendor otherwise glide keeps vendor directories inside kompose vendor dir (/vendor/.../vendor/...) In some project this can be useful, but kompose can't be build whit this.
Overall I really like glide.

But (there is always but 😎 )
It looks like glide is not striping unused code from vendored dependencies , like godep does.
with glide vendor is 277M :-(
with godep it was 52M

https://github.com/sgotti/glide-vc might help with that. (haven't tried yet)
Or we can remove vendor from git as @ngtuna suggested here. But I expressed my view there. I think it is better to keep vendor in project repo.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 30, 2016
@surajssd
Copy link
Member

surajssd commented Dec 1, 2016

I am +1 on keeping vendor dir as it is and not removing it from kompose.

@ngtuna
Copy link
Contributor

ngtuna commented Dec 1, 2016

So with this PR should we delete the PR #297 ?

Copy link
Contributor

@ngtuna ngtuna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you could run glide-vc --only-code --no-tests. Vendor folder size was only 32MB left after running it. Built success.

@kadel
Copy link
Member Author

kadel commented Dec 2, 2016

So there is a reason why glide doesn't strip dependencies.
It is explained here http://engineeredweb.com/blog/2016/go-why-not-strip-unused-pkgs/
But I don't know if that is valid point or not.

Maybe @sebgoa has opinion on that?

@kadel
Copy link
Member Author

kadel commented Dec 5, 2016

updated this PR with glide-vc cleanup.
vendor is now 32M

@kadel
Copy link
Member Author

kadel commented Dec 5, 2016

I will add some docs to this PR explaining how to add and update dependencies

@ericchiang
Copy link

you'll probably want to squash those commits, or git will still track the removed objects.

@kadel
Copy link
Member Author

kadel commented Dec 6, 2016

@ericchiang yes that is the plan, I will definitely squash this before merge.

@ngtuna I'll add short docs and probably scripts that will wrap glide and glide-vc. Than I'll ping you for another review. 😉

@kadel kadel force-pushed the glide branch 4 times, most recently from cb99fa5 to 0cb9385 Compare December 7, 2016 12:09
@kadel kadel removed the in progress label Dec 7, 2016
@kadel
Copy link
Member Author

kadel commented Dec 7, 2016

I've added docs and scripts that validate if vendor is clean.

It is ready for another review.
ping @ngtuna

@sebgoa
Copy link
Contributor

sebgoa commented Dec 7, 2016

@technosophos could you advise us with this ?

kadel added 3 commits December 7, 2016 19:57
This checks vendor dir for nested vendors
and if vendor has been cleaned by glide-vc
@coveralls
Copy link

Coverage Status

Coverage remained the same at 35.01% when pulling a0ba435 on kadel:glide into 862419b on kubernetes-incubator:master.

@technosophos
Copy link

/cc @mattfarina (who volunteered to look at this on SIG-Apps).

This looks good to me. If you're checking in vendor, then glide-vc is a great way to manage that. And everything else looks great.

@surajssd
Copy link
Member

@technosophos so can we go ahead with merging this?

@technosophos
Copy link

I have no reason to object to merging this, though I'm not a core maintainer on this project.

@ngtuna
Copy link
Contributor

ngtuna commented Dec 15, 2016

@surajssd I think we can let it passed now. @kadel can you merge?

@cdrage
Copy link
Member

cdrage commented Dec 15, 2016

@ngtuna He's away until after the new year, so you'll have to merge or we could wait until he's back :)

@surajssd
Copy link
Member

@technosophos @ngtuna @cdrage thank you merging this in.

@surajssd surajssd merged commit 4dd31da into kubernetes:master Dec 16, 2016
@ngtuna
Copy link
Contributor

ngtuna commented Dec 16, 2016

oh I see. So could you also take a look into #317 @surajssd @cdrage ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace godep with glide
9 participants