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

Migrate to dep #4

Merged
merged 5 commits into from
Oct 8, 2017
Merged

Migrate to dep #4

merged 5 commits into from
Oct 8, 2017

Conversation

nicksardo
Copy link
Contributor

@nicksardo nicksardo commented Oct 6, 2017

Ran:

dep init
dep ensure
dep prune

Dep does not do a great job at pruning, yet. Some dep users are depending on .gitignore to remove unneeded files, especially _test.go

https://github.com/golang/dep/issues/944
https://github.com/golang/dep/issues/1113
https://github.com/golang/dep/issues/120#issuecomment-306518546

Resulting dep status:

➜  dep status
PROJECT                                           CONSTRAINT          VERSION             REVISION  LATEST   PKGS USED
cloud.google.com/go                               *                                       3b1ae45            2   
github.com/PuerkitoBio/purell                     *                   v1.0.0              8a29053   0bcb03f  1   
github.com/PuerkitoBio/urlesc                     *                                       5bd2802            1   
github.com/beorn7/perks                           *                                       3ac7bf7            1   
github.com/davecgh/go-spew                        *                                       782f496            1   
github.com/dgrijalva/jwt-go                       *                                       01aeca5            1   
github.com/docker/distribution                    *                                       edc3ab2            2   
github.com/emicklei/go-restful                    *                                       ff4f55a            2   
github.com/emicklei/go-restful-swagger12          *                   1.0.1               dcef7f5   dcef7f5  1   
github.com/ghodss/yaml                            *                                       73d445a            1   
github.com/go-openapi/jsonpointer                 *                                       46af16f            1   
github.com/go-openapi/jsonreference               *                                       13c6e35            1   
github.com/go-openapi/spec                        *                                       6aced65            1   
github.com/go-openapi/swag                        *                                       1d0bd11            1   
github.com/gogo/protobuf                          *                                       c0656ed            2   
github.com/golang/glog                            *                                       44145f0            1   
github.com/golang/groupcache                      *                                       02826c3            1   
github.com/golang/protobuf                        *                                       4bd1920            5   
github.com/google/btree                           *                                       7d79101            1   
github.com/google/gofuzz                          *                                       44d8105            1   
github.com/googleapis/gnostic                     *                                       0c51083            3   
github.com/gorilla/websocket                      *                                       6eb6ad4            1   
github.com/gregjones/httpcache                    *                                       787624d            2   
github.com/hashicorp/golang-lru                   *                                       a0d98a5            2   
github.com/howeyc/gopass                          *                   branch master       bf9dde6   bf9dde6  1   
github.com/imdario/mergo                          *                                       6633656            1   
github.com/json-iterator/go                       *                   1.0.0               36b1496   6ed2715  1   
github.com/juju/ratelimit                         *                   branch master       5b9ff86   5b9ff86  1   
github.com/mailru/easyjson                        *                                       d5b7844            3   
github.com/matttproud/golang_protobuf_extensions  *                                       fc2b8d3            1   
github.com/opencontainers/go-digest               *                                       a6d0ee4            1   
github.com/pborman/uuid                           *                                       ca53cad            1   
github.com/petar/GoLLRB                           *                   branch master       53be0d3   53be0d3  1   
github.com/peterbourgon/diskv                     *                   v2.0.1              5f041e8   5f041e8  1   
github.com/prometheus/client_golang               *                                       e7e9030            2   
github.com/prometheus/client_model                *                                       fa8ad6f            1   
github.com/prometheus/common                      *                                       13ba4dd            3   
github.com/prometheus/procfs                      *                                       65c1f6f            2   
github.com/spf13/pflag                            *                                       9ff6c69            1   
golang.org/x/crypto                               *                                       81e9090            4   
golang.org/x/net                                  *                                       1c05540            6   
golang.org/x/oauth2                               *                                       a6bd8ce            5   
golang.org/x/sys                                  *                                       7ddbeae            2   
golang.org/x/text                                 *                                       b19bf47            16  
google.golang.org/api                             *                                       98825bb            8   
google.golang.org/appengine                       *                   v1.0.0              150dc57   150dc57  10  
gopkg.in/gcfg.v1                                  *                   v1.2.0              27e4946   27e4946  4   
gopkg.in/inf.v0                                   *                   v0.9.0              3887ee9   3887ee9  1   
gopkg.in/warnings.v0                              *                   v0.1.1              8a33156   8a33156  1   
gopkg.in/yaml.v2                                  *                                       53feefa            1   
k8s.io/api                                        branch release-1.8  branch release-1.8  fe29995   fe29995  24  
k8s.io/apiextensions-apiserver                    *                                       e15e93d            1   
k8s.io/apimachinery                               branch release-1.8  branch release-1.8  9d38e20   9d38e20  50  
k8s.io/apiserver                                  *                   branch release-1.8  f9b476d   c1e53d7  11  
k8s.io/client-go                                  *                   branch master       82aa063   d92e849  79  
k8s.io/kube-openapi                               *                                       868f2f2            1   
k8s.io/kubernetes                                 ^1.8.0              v1.8.0              0b9efae   0b9efae  33  
k8s.io/utils                                      *                                       9fdc871            1   

Note: I'm purposely preventing github auto-linking so we're not spamming the golang/dep repo.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 6, 2017
@bowei bowei merged commit fb07122 into kubernetes:master Oct 8, 2017
@@ -28,3 +28,11 @@ Session.vim
# coverage artifacts
.coverprofile
/gover.coverprofile

# Ignore everything in vendor/, except for *.go files,
Copy link
Member

Choose a reason for hiding this comment

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

Why? what specifically are we avoiding? I am worried about other variants of license information, and who knows what else we might hit..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Godep pruned vendored repos as well and found license information based off a series of prefixes.
https://github.com/tools/godep/blob/a9cd0561f946ccbdbfdee5b9226659f9919a1ca8/license.go#L9-L17

I'd like to avoid vendoring the _test.go files. I'll modify the file to allow back everything else.

Copy link
Member

Choose a reason for hiding this comment

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

Probably ok to have the *_test.go files?

@thockin
Copy link
Member

thockin commented Oct 9, 2017 via email

@nicksardo
Copy link
Contributor Author

For the purpose of migrating to dep, I wanted to show that not much changed in the vendor dir, which meant mimicking the same pruning done by godep. Dep itself is also moving towards pruning as much as possible https://github.com/golang/dep/issues/944.

I'll remove the gitignore restrictions.

@thockin
Copy link
Member

thockin commented Oct 9, 2017 via email

@nicksardo nicksardo deleted the migrate-to-dep branch October 9, 2017 18:08
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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants