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

Change from glide to dep #5355

Closed
wants to merge 46 commits into from

Conversation

zhexuany
Copy link
Contributor

@zhexuany zhexuany commented Dec 10, 2017

Not sure which version should I add to Gopkg.toml. Please comment in this PR, so I can change it later. Now dep supports prune operation which allow use prune test files and non-go files. In future, this could be absorbed into ensure operation. But this is still in progress. As for now, we have to run dep prune after dep ensure.


This change is Reviewable

@zhexuany
Copy link
Contributor Author

Before:
If we run find _vendor/ -type f | wc -l, only 799 files are vended.
After:
If we run find vendor -type f | wc -l, 1555 files are vended.

Not sure is it worth to change to dep.

@zhexuany
Copy link
Contributor Author

just come up with a script call clean_vendor.sh in directory hack. We can execute it and delete all irrelevant files. By do this, only 800 files in vendor.

trying to fix jekins failure
@coocood
Copy link
Member

coocood commented Dec 11, 2017

@zhexuany
What's the difference between manual delete tests file and [prune] in gopkg.toml?

@zhexuany
Copy link
Contributor Author

zhexuany commented Dec 11, 2017

dep prune only deletes some *_test.go but not all of them.
Here is the guide for reproducing:

  1. run dep ensure
  2. find vendor/ -name "*_test.go" | wc -l gives us 851.
  3. run dep prune
  4. find vendor/ -name "*_test.go" | wc -l gives us 374.

The number means how many *_test.go is still in vendor.

@coocood
Copy link
Member

coocood commented Dec 11, 2017

@zhexuany
Can you find the reason why those test files are not deleted?

@zhexuany
Copy link
Contributor Author

@coocood

Check this issue golang/dep#944
It is on progress. dep prune should have full functionality after closing this issue. dep team is currently working on this.

@coocood
Copy link
Member

coocood commented Dec 11, 2017

@zhexuany
The assembly files should not be deleted.
So I think manually delete files is not safe.

@zhexuany
Copy link
Contributor Author

@coocood
agreed.
Maybe can change it to just delete certain files like *_test.go and .gitignore and etc.

@zhexuany zhexuany closed this Jan 4, 2018
@zhexuany zhexuany deleted the change_from_glide_to_dep branch January 4, 2018 09:37
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

Successfully merging this pull request may close these issues.

None yet

2 participants