Skip to content

Commit

Permalink
remove subpackage vendor (#222)
Browse files Browse the repository at this point in the history
Add the vendor directory to the repository.

* Checking in vendor is a common convention. For example, a variety of projects in kubernetes check in vendor.

   * This should help developers by allowing them to skip updating the deps and doing the manual step of fixing some of the dependencies.

* remove subpackage vendor from .gitignore

Examples of checking in vendor
https://github.com/kubernetes/kubernetes
https://github.com/kubernetes/client-go/tree/master/vendor
https://github.com/ksonnet/ksonnet
https://github.com/kubernetes/test-infra

Some counter examples
https://github.com/grpc/grpc-go
https://github.com/GoogleCloudPlatform/google-cloud-go
https://github.com/google/glog
https://github.com/kubernetes/helm

It looks like our total repo size is ~125 MB and ~110 MB of this vendor.
But you have to download all 125 MB if you want to fully build it; so a smaller repo size doesn't really make cloning and building the code any faster.

So following the K8s convention and checking in vendor makes sense.
  • Loading branch information
zhengjiajin authored and jlewi committed Dec 18, 2017
1 parent eb0fd5f commit c8bcb9d
Show file tree
Hide file tree
Showing 5,275 changed files with 2,302,994 additions and 17 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# pkg and bin directories currently contain build artifacts
# only so we exclude them.
bin/
vendor/

.vscode/

Expand Down
8 changes: 2 additions & 6 deletions developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@ ln -sf ${GIT_TRAINING} ${GOPATH}/src/github.com/tensorflow/k8s

Resolve dependencies (if you don't have glide install, check how to do it [here](https://github.com/Masterminds/glide/blob/master/README.md#install))

install dependencies, `-v` will ignore subpackage vendor
```sh
glide install
rm -rf vendor/k8s.io/apiextensions-apiserver/vendor
glide install -v
```

* The **rm** is needed to remove the vendor directory of dependencies
that also vendor dependencies as these produce conflicts
with the versions vendored by mlkube

Build it

```sh
Expand Down
20 changes: 10 additions & 10 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions vendor/cloud.google.com/go/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions vendor/cloud.google.com/go/AUTHORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

126 changes: 126 additions & 0 deletions vendor/cloud.google.com/go/CONTRIBUTING.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions vendor/cloud.google.com/go/CONTRIBUTORS

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c8bcb9d

Please sign in to comment.